> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kadoa.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Document extraction

> Extract fields, tables, and full content from PDFs, such as reports and filings, once or on a schedule

Start with a link to a document, or to the web page that links to your documents. Kadoa's [agent](https://docs.kadoa.com/docs/agent.md) finds each document and extracts what you ask for. On a schedule, it picks up new documents as they are published.

<video controls playsInline preload="metadata" poster="https://kadoa.b-cdn.net/videos/pdf-extraction.jpg" src="https://kadoa.b-cdn.net/videos/pdf-extraction.mp4" />

## Supported documents

| Format | Notes |
| - | - |
| PDF | Digital, scanned, or a mix of both. Scanned pages are read with OCR. |

Kadoa reads text, tables (including merged cells and tables that continue across pages), form fields, and images.

## Create a workflow

> [tab] Dashboard
>
> 1. Select **Workflow** and paste a document URL, or the web page that links to the documents.
> 2. Describe which documents to collect, what to extract, and what each row represents, such as one document, one page, or one table row.
> 3. Compare the preview with the source document, then select **Approve**.

> [tab] API
>
> Pass document URLs, or pages that link to them, in `urls`. Describe what to extract in `userPrompt`:
>
> ```bash theme={null}
> curl -X POST "https://api.kadoa.com/v4/workflows" \
>   -H "x-api-key: <YOUR_API_KEY>" \
>   -H "Content-Type: application/json" \
>   -d '{
>     "urls": ["<DOCUMENT_OR_PAGE_URL>"],
>     "name": "Quarterly Reports",
>     "userPrompt": "Find all quarterly reports at the supplied URL. Return one row per PDF with year, quarter, quarterly_revenue, currency, and source_url.",
>     "interval": "ONLY_ONCE",
>     "bypassPreview": true
>   }'
> ```
>
> Save the `workflowId` from the response. When its run in the [workflow history](https://docs.kadoa.com/api-reference/workflows/get-the-workflow-history.md) reaches `FINISHED`, [fetch the data](https://docs.kadoa.com/docs/export-data.md#fetch-data-from-code). See [Create a new workflow](https://docs.kadoa.com/api-reference/workflows/create-a-new-workflow.md) for all options.

> [tab] MCP
>
> Ask your AI tool, for example:
>
> ```text theme={null}
> > "Extract revenue and net income from every quarterly report PDF on <INVESTOR_RELATIONS_URL>"
> ```
>
> Your AI tool calls `create_workflow`, and the agent builds the workflow. See [MCP](https://docs.kadoa.com/docs/sdk/mcp.md).

## Choose your output

**Fields.** Name the fields you need, such as report date, revenue, or product code. Kadoa returns them in your workflow's [schema](https://docs.kadoa.com/docs/workflows/schemas.md). You can add details from the linking page, such as its title, publication date, and URL.

**Full document.** Ask for the complete document as HTML (default), Markdown, or both, with headings, tables, and captions. You can combine it with extracted fields in the same row.

```json theme={null}
{
  "title": "Financial Results Explanatory Material",
  "published_date": "2025-02-04",
  "content": {
    "html": "<h2>Consolidated Financial Highlights</h2><table>...</table>",
    "attachments": [{ "id": "img-1", "url": "https://..." }]
  }
}
```

Images come back as `attachments`, linked from the content. Ask the agent to omit them if you only need text and tables. Markdown keeps a table as HTML when its structure, such as merged cells, can't be written in Markdown.

## Example prompts

> [accordion] Fields from company reports
>
> ```text theme={null}
> - Go to <INVESTOR_RELATIONS_URL>
> - Find all quarterly earnings reports published in 2025
> - Extract: company_name, report_date, fiscal_quarter, revenue, net_income
> - Include the currency and units for each financial value
> - One row per report, with the source URL
> ```

> [accordion] A table across multiple pages
>
> ```text theme={null}
> - Open <DOCUMENT_URL>
> - Extract every product from the price list, across all pages
> - One row per product: product_code, product_name, price, currency
> - Exclude repeated column headers and page footers
> ```

> [accordion] Full document content
>
> ```text theme={null}
> - Go to <PUBLICATIONS_URL>
> - Collect all announcements published this month
> - One row per document: title, publication_date, source_url, content
> - Include the complete document in content as Markdown, with images
> ```

## Monitor documents for changes

[Schedule](https://docs.kadoa.com/docs/workflows/scheduling.md) the workflow to collect new documents and refresh existing ones. Add [change detection](https://docs.kadoa.com/docs/change-detection.md) and [notifications](https://docs.kadoa.com/docs/notifications.md) to hear when the data changes. To start extraction when a new document is listed, add a [Data changed trigger](https://docs.kadoa.com/docs/ui/workflows/triggers.md) to a workflow that monitors the listing page.

A [real-time monitor](https://docs.kadoa.com/docs/monitors.md) can watch a public PDF URL and notify you when the file changes. It doesn't run OCR or return full document content. Real-time monitoring is available on request in the [Support Center](https://docs.kadoa.com/docs/support-center.md).

## Limits

* Files up to 300 MiB.
* Password-protected files can't be processed. Provide an unlocked copy.
* Scan quality affects accuracy. Check small text and faint numbers against the original during preview.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.