# PDF Text Extractor (x402-gateway.blackwoodstate8.workers.dev)

> PDF Text Extractor (x402-gateway.blackwoodstate8.workers.dev) is a paid API for AI agents from x402-gateway.blackwoodstate8.workers.dev, paid per call via x402, $0.05/call, status unknown (last checked 2026-10-23).

Extracts page-by-page text content and metadata from a publicly accessible PDF URL, returning results asynchronously via a job polling pattern.

## Facts

- Endpoint: POST https://x402-gateway.blackwoodstate8.workers.dev/v1/pdf-text?utm_source=zero.xyz
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-23
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/pdf-text-extractor-x402-gateway-blackwoodstate8-workers-dev-6e9371c6
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_akVkxaipFzit_IRc8JhIz

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability pdf-text-extractor-x402-gateway-blackwoodstate8-workers-dev-6e9371c6 -d '<json body>'
```

Example prompt: Can you extract the text from all the pages of this PDF report and give me the content along with its title and author? Here's the URL: https://example.com/annual-report-2024.pdf

## When to prefer this

Use this endpoint when you need structured, page-level text extraction from a standard (non-scanned, non-password-protected) PDF under 15 MB that is accessible via a public URL. It is ideal for feeding PDF content into LLMs, building search indexes, or extracting document metadata. Prefer alternatives if the PDF is scanned (requires OCR), password-protected, or exceeds 15 MB.

## Known failure modes

- Scanned/image-only PDFs return no extractable text (OCR not supported)
- Password-protected PDFs cannot be opened and will fail
- PDFs larger than 15 MB are rejected
- Invalid or non-public URLs result in fetch errors
- Polling the jobId after the expiresAt timestamp returns an expired/not-found error
- Non-PDF URLs or malformed URIs cause validation errors

## How this service works

Use when you need to extract text from a pdf, pdf to text or document parsing for an LLM. Do not use for scanned PDFs (no OCR), password-protected files or files over 15 MB. Returns JSON with PDF text extraction: the text of each page (first 20 pages) plus title, author and producer metadata for 0.0025 USDC per page, up to 0.05 USDC per call (clients without upto pay the cap). Asynchronous: the paid call returns a jobId and a free pollUrl; typical job time 10000 ms (p95). Category: Data.

## Output

Returns a JSON object with a jobId, a pollUrl to check job status, an expiresAt ISO 8601 timestamp, and a status field set to 'queued'. Once the job completes (typically within 10 seconds at p95), polling the pollUrl returns JSON containing per-page text for up to the first 20 pages of the PDF, plus document metadata including title, author, and producer. Priced at 0.0025 USDC per page, capped at 0.05 USDC per call.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "required": [
      "url"
     ],
     "properties": {
      "url": {
       "type": "string",
       "format": "uri",
       "maxLength": 2048,
       "description": "Public http(s) URL of the PDF file, e.g. https://example.com/report.pdf (up to 15 MB)"
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "jobId",
      "pollUrl",
      "expiresAt",
      "status"
     ],
     "properties": {
      "next": {
       "type": "object",
       "required": [
        "service",
        "tool",
        "method",
        "url",
        "useWhen",
        "sample"
       ],
       "properties": {
        "url": {
         "type": "string",
         "description": "Paid route of the next call"
        },
        "tool": {
         "type": "string",
         "description": "MCP tool name of the same call"
        },
        "method": {
         "enum": [
          "GET",
          "POST"
         ],
         "type": "string"
        },
        "sample": {
         "type": "string",
         "description": "Free fixed sample of the whole family"
        },
        "service": {
         "type": "string",
         "description": "Service id of the suggested next paid call"
        },
        "useWhen": {
         "type": "string",
         "description": "When the next call is the right one"
        }
       },
       "description": "Suggested next paid call in the same family (call it in a loop when the task continues)",
       "additionalProperties": false
      },
      "jobId": {
       "type": "string",
       "maxLength": 100,
       "minLength": 1
      },
      "status": {
       "type": "string",
       "const": "queued"
      },
      "pollUrl": {
       "type": "string",
       "format": "uri"
      },
  
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "jobId": "job_00000000000000000000000000000000",
  "status": "queued",
  "pollUrl": "https://gateway.example/v1/pdf-text/jobs/job_00000000000000000000000000000000",
  "expiresAt": "2026-01-31T00:00:00.000Z"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/pdf-text-extractor-x402-gateway-blackwoodstate8-workers-dev-6e9371c6/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-gateway.blackwoodstate8.workers.dev](https://www.zero.xyz/host/x402-gateway.blackwoodstate8.workers.dev/llms.txt)
