{"uid":"cap_EtFagTghZDFQD8kewnFOI","slug":"extract-page-code-elements-as-text-5efb30f4","name":"Extract Page Code Elements as Text","description":"Extract the page's code as text: fetches the URL, pulls every code 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/code/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_TUyd1-13VzIk5Q7QzSmFF","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 code elements as plain text lines with a count, requiring no browser.","exampleAgentPrompt":"Can you fetch the page at https://example.com/tutorial and extract all the code blocks as plain text lines so I can see what code snippets are on it?","exampleUseCases":[{"title":"Audit code examples on docs page","prompt":"Go to https://docs.mylib.io/getting-started and pull out every code block on the page as plain text — I want to see all the code snippets listed out with a count of how many there are."},{"title":"Monitor tutorial code snippets","prompt":"Fetch https://realpython.com/python-decorators/ and extract all the code elements as text lines so I can review what code examples the article contains."},{"title":"Compare code samples across pages","prompt":"Pull all the code blocks from https://api.stripe.com/docs/charges as plain text — I need to see every code snippet on that page to compare the examples they provide."}],"resultDescription":"Returns all code elements found on the fetched page as plain text lines, along with a count of how many code elements were extracted. The response is structured for programmatic use by agents and pipelines.","failureModes":["URL is unreachable or returns non-200 status — extraction fails with an error","Page has no code elements — returns empty list with count of 0","URL is malformed or missing — request is rejected","Page blocks automated fetchers (e.g. bot protection) — may return empty or error","Payment not processed — endpoint returns 402 Payment Required"],"whenToPreferThis":"Choose this endpoint when you need to extract only the code elements from a web page as plain text, without needing a full browser environment. It is ideal for agent pipelines that need structured, lightweight extraction of code blocks from documentation, tutorials, or technical pages at low cost ($0.01/page).","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-20T18:51:54.854Z","isFirstParty":false,"canonicalSlug":"extract-page-code-elements-as-text-5efb30f4"}