# extract_data: Extract data from a PDF

Read structured data with AI and check it in code: invoice (fields, lines and totals, added up), statement (bank transactions, balances compared), tables (every table, cell by cell), or schema (your own JSON Schema). Output json returns the data here; excel or csv also makes a spreadsheet file (tables and statement).

A tool of the [FynePDF MCP server](https://fynepdf.com/developers/docs/mcp) (`https://api.fynepdf.com/mcp`). Reads only: it doesn't change or make files.

## Ask for it

- "Pull the line items out of these invoices."
- "Get every transaction from this statement."

## Inputs

| Input | Type | Required | What it does |
|---|---|---|---|
| `file_id` | string |  | A FynePDF file_id from upload_file, import_file_from_url or an earlier tool. |
| `file` | object |  | A file the person attached in ChatGPT (filled in by ChatGPT). |
| `file_url` | string |  | A public link to the file. |
| `library_file_id` | string |  | A file from the person's FynePDF Library (from list_library_files). |
| `type` | "invoice" · "statement" · "tables" · "schema" | yes |  |
| `schema` | object |  | For type schema: a JSON Schema object. |
| `instructions` | string |  |  |
| `output` | "json" · "excel" · "csv" |  |  |

## The same over HTTP

From your own code, call [Extract data from a PDF](https://fynepdf.com/developers/docs/api/extract-data).

## Connect it

[Claude](https://fynepdf.com/developers/docs/mcp/claude) · [ChatGPT](https://fynepdf.com/developers/docs/mcp/chatgpt) · [Cursor](https://fynepdf.com/developers/docs/mcp/cursor) · [VS Code](https://fynepdf.com/developers/docs/mcp/vscode) · [Claude Code](https://fynepdf.com/developers/docs/mcp/claude-code)


---

Open this page in a browser: https://fynepdf.com/developers/docs/mcp/tools/extract_data

More: [All tools](https://fynepdf.com/tools) · [AI agents](https://fynepdf.com/ai/agents) · [llms.txt](https://fynepdf.com/llms.txt) · [Sitemap](https://fynepdf.com/sitemap.xml)
