{"uid":"cap_gbltPlmRcuUb2hUoMuJNA","slug":"extract-code-as-csv-c4ca7936","name":"extract-code-as-csv","description":"Extract the page's code as csv: fetches the URL, pulls every code element and returns them as CSV rows, 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/csv?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_FRAxDEG8MeYab499Qu3VX","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, extracts all <code> elements from the page, and returns them as CSV rows with a count","exampleAgentPrompt":"Can you fetch https://docs.example.com/api-reference and extract all the code elements into a CSV, so I can see every code snippet on the page along with a total count?","exampleUseCases":[{"title":"Audit code snippets on docs page","prompt":"Go to https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array and extract all the code elements into a CSV so I can review every code example on the page."},{"title":"Inventory code blocks for a tutorial","prompt":"Pull all the code snippets from https://www.freecodecamp.org/news/javascript-promises-explained/ and give me a CSV with each one listed out and a count of how many there are."},{"title":"Monitor code samples on a library page","prompt":"Fetch https://reactjs.org/docs/hooks-intro.html and extract every code element as CSV rows — I want to count how many code examples are on that page."}],"resultDescription":"A CSV-formatted response where each row represents one <code> element found on the fetched page, plus a total count of all code elements extracted. No browser is required; the service fetches and parses the HTML server-side.","failureModes":["URL is unreachable or returns a non-200 status — extraction fails with an error","Page has no <code> elements — returns empty CSV with a count of zero","Payment not provided or insufficient — request rejected due to x402 payment requirement","Malformed or missing URL query parameter — request returns a validation error","Target page blocks server-side crawlers — may return empty or partial results"],"whenToPreferThis":"Use this endpoint when you need a lightweight, structured CSV extraction of all <code> elements from a single web page without spinning up a browser. Ideal for agents and pipelines that need to inventory, audit, or analyze code snippets on documentation, tutorial, or developer pages in a structured, machine-readable format. Prefer this over generic scraping tools when you specifically want code-element extraction in CSV format for downstream spreadsheet or data-pipeline consumption.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-20T18:55:59.707Z","isFirstParty":false,"canonicalSlug":"extract-code-as-csv-c4ca7936"}