{"uid":"cap_cNM9CiYljFALMdlD-5hWO","slug":"extract-code-as-markdown-af66997a","name":"extract-code-as-markdown","description":"Extract the page's code as markdown: fetches the URL, pulls every code element and returns them as a Markdown list, 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/markdown?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_-okc2cNCDZpLwrJccWwZv","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 URL and extracts all code elements from the page, returning them as a Markdown list with a count","exampleAgentPrompt":"Can you extract all the code blocks from https://docs.example.com/quickstart and return them as a Markdown list?","exampleUseCases":[{"title":"Scraping code from documentation","prompt":"Grab all the code snippets from https://docs.stripe.com/payments/quickstart and give them to me as a markdown list so I can review the examples."},{"title":"Auditing code on a tutorial page","prompt":"Pull every code element from https://css-tricks.com/snippets/css/a-guide-to-flexbox and format them as markdown — I want to see how many code blocks that page has."},{"title":"Pipeline ingestion of code samples","prompt":"For my data pipeline, fetch the code elements from https://realpython.com/python-decorators and return them as a structured markdown list with the count."}],"resultDescription":"A Markdown-formatted list of all code elements found on the fetched page, along with a count of how many code elements were extracted. The response is structured and agent-friendly, requiring no browser.","failureModes":["URL is unreachable or returns a non-200 status — extraction fails with an error","Page has no code elements — returns an empty list with a count of zero","URL is behind authentication or a paywall — content may be inaccessible","Page uses JavaScript-rendered code blocks — server-side fetch may miss dynamically injected content","Malformed or invalid URL input — request fails with a validation error"],"whenToPreferThis":"Choose this endpoint when you specifically need to extract code elements (<code> tags and similar) from a web page as a structured Markdown list, without running a browser. It is ideal for agent pipelines that need a lightweight, cost-effective ($0.01/page) way to collect and enumerate code snippets from documentation, tutorials, or blog posts. Prefer it over full-page scrapers when only code elements are needed, and over browser-based tools when headless execution is not required.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-20T18:56:31.651Z","isFirstParty":false,"canonicalSlug":"extract-code-as-markdown-af66997a"}