More endpoints
POST /v1/parse

POST /v1/parse

File → markdown (Firecrawl /parse parity). Accepts either a multipart file upload or a JSON { url } pointing at a document, and returns markdown + extracted text.

Supports PDF (always) and DOCX (when the optional mammoth dependency is installed on the server, returns 415 otherwise).

Request, multipart upload

curl -X POST https://api.superscraper.dev/v1/parse \
  -H "x-api-key: ss_live_xxxxxxxxxxxxxxxxxxxx" \
  -F "file=@invoice.pdf"

Request, JSON body (fetch a URL)

POST /v1/parse
Content-Type: application/json
x-api-key: YOUR_KEY
FieldTypeRequiredDescription
urlstringYes (JSON path only)URL of a PDF or DOCX document to fetch and parse.
curl -X POST https://api.superscraper.dev/v1/parse \
  -H "x-api-key: ss_live_xxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com/contracts/license-2026.pdf"}'

Response

HTTP 200 on success.

FieldTypeDescription
okbooleantrue on success
markdownstringDocument content converted to markdown
textstringPlain-text extraction
format"pdf" | "docx"Detected document format
pagesnumber | undefinedPage count (PDF only)

Example response

{
  "ok": true,
  "markdown": "# Contractor License Agreement\n\n...",
  "text": "Contractor License Agreement\n\n...",
  "format": "pdf",
  "pages": 4
}

Errors

StatusErrorCause
400`file` field is required (multipart upload)Multipart request with no file part
400Invalid multipart form dataMalformed multipart body
400`url` is requiredJSON path with no url field
400Invalid URLurl isn't a valid URL
400Blocked URL: ...URL rejected by the SSRF guard (DOCX-by-URL path)
415DOCX parsing not availableServer doesn't have the optional mammoth dependency installed
422Could not extract text from file / documentThe file couldn't be parsed (corrupt, unsupported, or scanned image with no OCR match)
422Fetch failed: HTTP <status>URL fetch (DOCX path) returned a non-2xx status

Notes

  • PDF extraction uses the engine's pdfjs → Claude Vision fallback (same cascade as /v1/scrape on a .pdf URL).
  • With SCRAPER_MOCK_MODE=true, both paths return a small fixed sample document, useful for integration testing without burning credits.
  • This endpoint is not part of the mandated Core group (Scrape/Extract/Search/Crawl/Map/Batch) but is a real, working endpoint, file conversion, not web scraping.