{"uid":"cap_MpM6UrPvmtnSuzVKEyh2L","slug":"extract-scripts-as-text-fef05856","name":"extract-scripts-as-text","description":"Extract the page's scripts as text: fetches the URL, pulls every scripts element and returns them as plain lines, 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/text?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_R1J2MrYxeDeVhLl786xoX","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 plain text lines with a count","exampleAgentPrompt":"Can you fetch the page at https://example.com and extract all of its script elements as plain text so I can see what JavaScript is loaded there?","exampleUseCases":[{"title":"Audit third-party scripts on a site","prompt":"Go to https://shop.mybrand.com and pull all the script elements as text — I want to see every third-party script that's being loaded on that page."},{"title":"Security review of page scripts","prompt":"Fetch https://suspicious-site.com and extract all its script tags as plain text so I can review them for malicious or obfuscated JavaScript."},{"title":"Pipeline extraction of page scripts","prompt":"I'm building an automated pipeline — grab https://news.ycombinator.com and return all its script elements as plain text lines with a count so I can process them downstream."}],"resultDescription":"A plain-text list of all script element contents found on the fetched page, returned as individual lines, along with a total count of script elements extracted.","failureModes":["URL is unreachable or returns a non-200 status — extraction fails with an error","Page has no script elements — returns empty result with count of 0","Dynamically injected scripts (added via JavaScript after load) may not be captured since no browser is used","Malformed or extremely large pages may cause timeouts or truncated results","Scripts behind authentication walls won't be accessible"],"whenToPreferThis":"Choose this endpoint when you need a lightweight, serverless extraction of all raw script elements from a page as plain text, without spinning up a browser. It is ideal for pipelines or agents that need structured, line-by-line script content with a count, at low cost ($0.01/page). Prefer this over full-page scrapers when you only need script content, and over browser-based tools when JavaScript rendering of the page itself is not required.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-20T12:43:46.030Z","isFirstParty":false,"canonicalSlug":"extract-scripts-as-text-fef05856"}