---
title: "Document extraction"
method: GET
path: "/api/extract"
tags: ["Web Content"]
---

# Document extraction

`GET /api/extract`

## Request

- Base URL: `https://api.webbersites.com`
- URL: `https://api.webbersites.com/api/extract`
- Auth: API key in header `X-PAYMENT`

Document extraction: fetch a PDF, DOCX, or CSV by URL and get clean Markdown plus structured JSON — PDF text by page with metadata (honestly flags scanned PDFs that would need OCR), DOCX converted to real Markdown, CSV parsed to typed columns + JSON rows + a Markdown table. For agents that need document contents, not bytes.

Price: $0.02 per call, paid in USDC via the x402 protocol (see the x402 security scheme).

## Query parameters

- `url` string, required
- `type` string
- `max_rows` number

## Response `200`

Success

- object
  - `type` string
  - `markdown` string
  - `pages` number
  - `metadata` object
  - `word_count` number
  - `columns` unknown[]
    - unknown
  - `rows` unknown[]
    - unknown
  - `row_count` number

## Other responses

- `402`: Payment required — the response body lists accepted payment methods (amount, asset, network, pay-to address). Retry the request with a signed X-PAYMENT header.

---

[API](https://skmtc.dev/webbersites/apis/webbersites-x402-data-api.md) · [All operations](https://skmtc.dev/webbersites/apis/webbersites-x402-data-api/llms.txt) · [OpenAPI document](https://skmtc.dev/webbersites/apis/webbersites-x402-data-api/revisions/c14a76c67a94?raw)
