{"uid":"cap_K7Jxh5KSRTQWE9DpA-jOc","slug":"tanod-docs-pdf-extract-pages-d60e9e55","name":"Tanod Docs PDF Extract Pages","description":"Documents: DOCX template fill, Office to PDF, any file to Markdown, PDF to Word, OCR, PDF pipeline.","url":"https://docs.tanod.dev/v1/pdf/extract-pages?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"url":{"anyOf":[{"type":"string","maxLength":2048,"minLength":1},{"type":"null"}],"default":null,"description":"Public http(s) URL of the PDF (at most 20 MB; private, internal and IP-literal hosts are refused); or use pdf_base64."},"pages":{"type":"string","pattern":"^[0-9a-zA-Z ,\\-]+$","maxLength":200,"minLength":1,"description":"1-based: N, N-M, N- (to the end), -M, last; comma separated, in this order."},"output":{"enum":["base64","url"],"type":"string","default":"base64","description":"base64 (default): the file comes back inline as base64. url: the file is stored for 24 hours and the reply carries a download link (url, expires_at, bytes, content_type, sha256) instead of the base64, which keeps the file out of your context window."},"pdf_base64":{"anyOf":[{"type":"string","maxLength":13398872,"minLength":1},{"type":"null"}],"default":null,"description":"The PDF as base64 (at most 10 MB decoded per request); or use url."}}},"responseSchema":{"type":"json","example":{"file":{"name":"extracted.pdf","bytes":58827,"pages":3,"data_base64":"JVBERi0xLjcKJb/3... (trimmed: 78,436 base64 characters in the reply)","content_type":"application/pdf"},"operation":"extract-pages","input_bytes":140815,"input_pages":6,"output_bytes":58827,"untrusted_content":true,"active_content_removed":{}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","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.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_PTMRqz2phmlXLn0uJxVer","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Extracts specific pages from a PDF document and returns them as a new PDF file, either as base64 or a temporary download URL.","exampleAgentPrompt":"Can you extract pages 2 through 5 from this PDF — https://example.com/report.pdf — and give me a download link instead of the raw data?","exampleUseCases":[{"title":"Extract contract signature pages","prompt":"I have a 20-page contract PDF at https://contracts.example.com/agreement.pdf — can you pull out just the last page and give it back to me as a download link?"},{"title":"Isolate specific report sections","prompt":"From this annual report PDF (https://company.example.com/annual-report.pdf), please extract pages 10 through 15 and return them as a base64 PDF so I can embed it."},{"title":"Pull first page as cover sheet","prompt":"Take this PDF at https://docs.example.com/proposal.pdf and extract just page 1 — I need the cover sheet as a separate PDF with a temporary download URL."}],"resultDescription":"Returns a JSON object containing the extracted PDF either as a base64-encoded string or a temporary download URL (valid 24 hours), along with metadata including file name, byte size, page count, content type, and SHA256 hash. Also reports input page count, input bytes, output bytes, and flags whether untrusted content was detected.","failureModes":["Invalid or inaccessible PDF URL (private/internal hosts refused, file over 20 MB)","PDF base64 exceeds 10 MB decoded limit","Invalid page range format (must match pattern of numbers, ranges, commas, 'last' keyword)","PDF is corrupt or unreadable","Neither url nor pdf_base64 provided","Page numbers out of range for the document"],"whenToPreferThis":"Use this endpoint when you need to extract a specific subset of pages from a PDF into a new PDF document. It is ideal when you have a large PDF and only need certain pages — such as a signature page, a chapter, or a specific range — without converting the format. Prefer it over full-document conversion endpoints when you want a PDF output rather than Markdown, Word, or image formats.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-13T12:43:37.253Z","isFirstParty":false,"canonicalSlug":"tanod-docs-pdf-extract-pages-d60e9e55"}