$ man pdf-to-text
/pdf-to-text(1)
PRICE / CALL
$0.20
USDC · base mainnet · scheme: exact
METHOD
POST
CLUSTER
mediakitCATEGORY
uncategorized
STATUS
● live
NAME
pdf-to-text — pdf to text / extract text from pdf
synonym alias of pdf-to-markdown — reuses the canonical handler.
SYNOPSIS
POST https://x402.org/v1/pdf-to-text
Content-Type: application/json
X-PAYMENT: <signed-transferWithAuthorization>
{ ... }↳ first call →
402 Payment Required. Sign USDCtransferWithAuthorization, retry with theX-PAYMENT header.DESCRIPTION
PDF to text / extract text from PDF. AI-powered text extraction via Datalab Marker. OCR + layout-aware. Best-in-class for tables, equations, multi-column layouts. Outputs plain text or structured markdown. 30 pages max.
INPUT — request schema
| property | type | description | req? |
|---|---|---|---|
| pdf_url | string | Public URL of a PDF file. | required |
| output_format | string | 'markdown' (default), 'html', or 'json'. enum: markdown · html · json | optional |
OUTPUT — response shape
| field | type | description |
|---|---|---|
| markdown | string | Extracted text from the PDF as plain text or layout-aware markdown preserving tables, equations, and columns. |
| page_count | string | Number of pages processed from the source PDF (capped at the 30-page per-call limit). |
| source_url | string | URL of the PDF that was fetched and processed for text extraction. |
EXAMPLES — two ways to call
EXAMPLE 1 · curl
curl -X POST https://x402.org/v1/pdf-to-text \
-H 'Content-Type: application/json' \
-d '{ }'first response =
402 Payment Required with payment requirements; sign + retry with X-PAYMENT.EXAMPLE 2 · mcp
# install once claude mcp add x402 --command "npx x402-deployer-mcp" # then ask Claude Code: # "use the pdf-to-text tool to ..."
MCP server handles payment automatically — your coding agent just calls the tool by name.
METADATA
- tags
- pdfpdf-to-texttext-extractionocrdocument-parsingmarkdownmediakitdatalab-marker
- methods
- POST
- cluster
- mediakit
- price
- $0.20 USDC per call
ADJACENT — other endpoints in mediakit
| endpoint | description | price |
|---|---|---|
| convert-pdf | Convert PDF to Markdown, HTML, JSON, or structured text via Datalab Marker. | $0.20 |
| ocr | OCR / optical character recognition / scanned document extractor / image-PDF to text. | $0.20 |
| pdf-to-markdown | AI PDF extractor: PDF to Markdown / HTML / structured JSON via Datalab Marker. | $0.20 |
| pdf2md | PDF to Markdown converter. | $0.20 |
| extract-tables | Extract tables from PDF / table extractor / PDF to CSV / spreadsheet from PDF. | $0.10 |
| mp4-to-mp3 | MP4 → MP3 audio extractor. | $0.10 |
| pdf-extract-tables | PDF table extractor / table from PDF / scanned-table parsing / financial-table OCR / multi-page table consolidator / Datalab Marker tables. | $0.10 |
| pdf-to-jpg | PDF to JPG / PNG / WEBP image converter. | $0.10 |
SEE ALSO