Extract text and tables from PDF, Office, OpenDocument, EPUB, RTF, CSV, JSON, and RSS/Atom URLs.

On this page

Pass a document URL to POST /v1/scrape the same way you scrape a web page. crawlapi detects the file type automatically and extracts clean markdown or structured tables.

Example

curl -sS https://api.crawlapi.dev/v1/scrape \
  -H "Authorization: Bearer $CRAWLAPI_API_KEY" \
  -H 'content-type: application/json' \
  --data '{"url": "https://arxiv.org/pdf/1706.03762"}'

Parsed text returns in data.markdown, or extracted tables in data.json when you pass "format": "json".

Supported formats

Format format: "markdown" format: "json"
PDF Text, headings, and tables (up to 300 pages) Extracted tables
Office (DOCX, XLSX, XLSM, XLSB, PPTX, DOC, XLS, PPT) Paragraphs, headings, sheets, and slides as markdown Extracted tables
OpenDocument (ODT, ODS, ODP) Paragraphs, sheets, and slides Extracted tables
EPUB, RTF Book and document text as markdown Extracted tables, if any
CSV Single Markdown table Single table
JSON Fenced json code block Parsed payload in embedded plus extracted record tables
RSS / Atom feeds Title, description, and feed entries Table of entries (title, link, published, author, summary)
Plain text / Markdown Decoded text Parsed Markdown tables, if any

RSS and Atom feeds populate data.links with entry URLs; other document formats return [].

Choosing markdown vs JSON

  • Use format: "markdown" for reading and indexing PDFs, Word documents, slide decks, EPUBs, RTFs, and feed summaries as clean prose with headings and Markdown tables. See Markdown for link and output-size rules.
  • Use format: "json" when you want structured rows from CSVs, spreadsheets (XLSX/ODS), PDFs with tables, RSS/Atom feed entries (tables), or raw parsed payloads from JSON endpoints (embedded). See Structured JSON for the four JSON keys.

Limits and failure codes

Condition Result
File size over 32 MiB 422 UNSUPPORTED_CONTENT (retryable: false), except CSV and plain text/markdown which truncate cleanly with metadata.truncated: true
PDF over 300 pages First 300 pages returned with metadata.truncated: true
Scanned image-only PDF (no text layer) 422 SCANNED_PDF (retryable: false) — OCR is not supported
Password-protected PDF or Office file 422 LOGIN_REQUIRED (retryable: false)
Empty file, or format: "json" with no tables or JSON data 422 NO_CONTENT (retryable: false) — use format: "markdown" for plain text
Images, audio, video, archives, or unreadable files 422 UNSUPPORTED_CONTENT (retryable: false)

See Errors and retries for the full error schema and retry helpers.

esc
↑↓navigate↵openescclose
Documentation