{"uid":"cap_nhsh-I75UhaaiBEVroK4r","slug":"code-block-extract-db48595b","name":"code-block-extract","description":"Code block extraction from a page: every <pre>/<code> block with its language hint (from class names or fences), line count and text, plus the counts by language. Mine documentation for examples. $0.01 per page.","url":"https://intel.rallylive.ca/page/codeblocks","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_KioypvG1RrhI7cFTjgS4B","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":"Extracts all code blocks from a webpage, returning each block's language hint, line count, and text content, plus per-language counts.","exampleAgentPrompt":"Can you pull all the code blocks from https://docs.example.com/getting-started and tell me what languages they use and how many lines each one has?","exampleUseCases":[{"title":"Mining SDK documentation for examples","prompt":"Go to https://stripe.com/docs/api and extract every code block — I want to see all the example snippets, what language each one is in, and how many lines they are."},{"title":"Auditing tutorial for language coverage","prompt":"Grab all the code examples from this tutorial page at https://realpython.com/python-async-features/ and give me a breakdown of how many blocks there are per language."},{"title":"Collecting code snippets from a changelog","prompt":"Extract all the code blocks from https://github.com/expressjs/express/blob/master/History.md so I can see what API changes are illustrated with code."}],"resultDescription":"A structured list of every <pre>/<code> block found on the page, each with its detected programming language (from class names or fence markers), line count, and full text content, plus an aggregate count of blocks per language across the page.","failureModes":["Page URL is unreachable or returns non-200 status — no blocks returned","Page has no <pre> or <code> elements — empty list returned","Language hints absent from class names or fences — language reported as unknown or null","Dynamic/JavaScript-rendered content not captured if page requires JS execution","Malformed HTML may cause incomplete block parsing"],"whenToPreferThis":"Choose this endpoint when you need to systematically extract and catalog code examples from documentation pages, blog posts, or tutorials — especially when you want language classification and line counts alongside the raw text. It is purpose-built for documentation mining workflows where structured metadata about each snippet matters, as opposed to generic HTML scraping endpoints that return unstructured page content.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T13:12:24.992Z","isFirstParty":false}