{"uid":"cap_x_YX01vl7WP710ge0-QoI","slug":"extract-scripts-as-json-bf55e7e3","name":"extract-scripts-as-json","description":"Extract the page's scripts as json: fetches the URL, pulls every scripts element and returns them as a JSON array, with a count. Structured, one-element-type extraction for agents and pipelines; no browser needed. $0.01 per page.","url":"https://page.intel.rallylive.ca/page/scripts/json?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","properties":{}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_IWrXBCkrZimHcx4zadktR","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Fetches a web page URL and extracts all script elements, returning them as a structured JSON array with a count","exampleAgentPrompt":"Can you extract all the script elements from https://example.com and give me the full list as JSON so I can see what scripts the page is loading?","exampleUseCases":[{"title":"Audit third-party scripts on a site","prompt":"Pull all the script tags from https://mycompany.com/checkout and return them as JSON — I want to audit what third-party scripts are running on our checkout page."},{"title":"Detect tracking or analytics scripts","prompt":"Fetch https://competitor.com and extract every script element as JSON so I can see what analytics or ad-tracking scripts they're using."},{"title":"Security review of page scripts","prompt":"Extract all scripts from https://thirdpartysite.io as a JSON array — I need to review exactly what JavaScript is being loaded before we embed their widget on our site."}],"resultDescription":"A JSON array containing every script element found on the fetched page, along with a count of how many scripts were found. Each array entry represents one script element (inline or external src reference) extracted from the page's HTML.","failureModes":["URL is unreachable or returns a non-200 status — endpoint may return empty array or error","Page blocks server-side fetches (e.g. bot protection) — scripts may be missing or incomplete","Dynamically injected scripts (added by JavaScript at runtime) will not be captured since no browser is used","Malformed or invalid URL input causes request failure","Page with no script elements returns an empty array with count 0"],"whenToPreferThis":"Choose this endpoint when you need a fast, structured JSON extraction of all script elements from a static or server-rendered web page without spinning up a headless browser. Ideal for pipelines and agents that need machine-readable output at low cost ($0.01/page). Prefer this over full-page scrapers when you only need script tags and want a clean, focused JSON array rather than raw HTML.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-23T00:46:41.630Z","isFirstParty":false,"canonicalSlug":"extract-scripts-as-json-bf55e7e3"}