spidra_parse
Convert PDF, Office, EPUB, CSV, and HTML documents into page-by-page Markdown or prompt/schema-driven JSON, with AI reading scanned pages.
Instructions
Turn documents into Markdown, page by page, and into JSON with a "prompt" or "schema". PDF, Word, Excel, PowerPoint, OpenDocument, RTF, EPUB, CSV and HTML files work, and scanned pages are read with AI.
Use it for reports, papers, invoices, contracts and spreadsheets, online or given to you as a file. Don't use it for web pages (spidra_scrape).
Send the documents one way:
"url": a link to one document.
"fileBase64" and "fileName": a file you have, base64-encoded (up to about 10 MB).
"fileId": a document parsed in the last 24 hours, to parse again with other options.
"urls" or "fileIds": several documents at once (up to 50), each parsed with the same options.
"pages" ("1-5, 9" or "10-") or "maxPages" parses only part of a long PDF.
"dryRun": true returns the page count and cost, for free, without parsing.
It waits up to about 50 seconds. A long document or a batch still running returns an id; check it with spidra_get_job (type "parse" or "parse_batch").
Cost: 1 credit per page parsed, plus AI credits with a prompt or schema. Formats without pages count one page per 3,000 characters. Failed pages and documents cost nothing.
Example: {"url": "https://arxiv.org/pdf/1706.03762", "pages": "1-3"}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | A link to one document | |
| mode | No | "auto" (default) uses AI only on scanned pages, "fast" never, "ocr" on every page | |
| urls | No | Links to several documents (a batch) | |
| pages | No | PDF pages to parse, like "1-5, 9" or "10-" | |
| dryRun | No | Return the pages and cost without parsing or charging | |
| fileId | No | A fileId from a parse in the last 24 hours | |
| prompt | No | Fields to extract, in plain words. The result is in json. | |
| schema | No | A JSON Schema for the answer. You get exactly these fields and types, with null for anything the page doesn't show. Define every field you want: an object with no properties comes back empty. The root must be an object. | |
| fileIds | No | Several fileIds (a batch) | |
| fileName | No | The file's name with its extension, required with fileBase64, e.g. "report.pdf" | |
| maxPages | No | Parse at most this many pages | |
| fileBase64 | No | One file's bytes, base64-encoded (up to about 10 MB) | |
| includePages | No | Also return each page's Markdown on its own |