> For the complete documentation index, see [llms.txt](https://docs.fastn.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fastn.ai/connectors/catalog/docs-knowledge/docparser.md). Agents can also search and read this documentation through its [MCP server](https://docs.fastn.ai/~gitbook/mcp).

# Docparser

Docparser extracts data from PDFs and scanned documents. Upload documents, check parsing status and read the results.

![Docparser logo](https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Fgit-blob-0ed7a9b75b3095af2bbfbf3e13dd80ab4943a335%2Fdocparser.png?alt=media)

|                    |                                                                                  |
| ------------------ | -------------------------------------------------------------------------------- |
| **Category**       | [Docs and knowledge](https://docs.fastn.ai/connectors/catalog/docs-knowledge.md) |
| **Website**        | [docparser.com](https://docparser.com)                                           |
| **Authentication** | Username and password                                                            |
| **Slug**           | `docparser`                                                                      |
| **On fastn.ai**    | [Embed Docparser in your product](https://fastn.ai/integrations/docparser)       |

## Setup

Your customers enter their username and password for Docparser when they connect. Nothing else needs setting up.

## Connect in Fastn

Your customers connect Docparser from your widget. To connect an account yourself:

1. Go to **Build → Integrations → Connectors** and search for **Docparser**.
2. Select **Connect** on the Docparser card.

   <figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Fgit-blob-586dd03cdc0c6904263f58928d7a531eae2f85df%2Fconnect-search.png?alt=media" alt="The Connectors page in Fastn with ServiceNow typed in the search box and the ServiceNow card showing a Connect button"><figcaption><p>Search for the connector, then select Connect on its card. ServiceNow is shown here.</p></figcaption></figure>
3. Fill in the fields the form asks for, using the values from [Setup](#setup) above. Then select **Connect**.

   <figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Fgit-blob-51fb88ef328c525b5b11f8d7094bab11efc333b8%2Fconnect-credentials.png?alt=media" alt="The Connect ServiceNow dialog with an optional account name and the Instance, Username and Password fields, and Cancel and Connect buttons"><figcaption><p>A connect form that asks for credentials. Each connector asks for its own fields.</p></figcaption></figure>
4. Check that the connection appears under **Operate → Connections** with the status `Active`. Your workflows can now use Docparser's actions.

For more detail, see [Connect an app](https://docs.fastn.ai/build/integrations/connectors/connect-an-app.md).

## Actions

<table><thead><tr><th width="240">Action</th><th width="260">Slug</th><th>What it does</th></tr></thead><tbody><tr><td>Fetch Document From URL</td><td><code>fetchDocumentFromUrl</code></td><td>Imports a document into a Document Parser by giving Docparser a publicly accessible URL to fetch it from. The fetch is asynchronous: Docparser schedules the download and returns immediately with the document identifier, so poll Get Document Status to know when it has finished importing and parsing.</td></tr><tr><td>Get Document Data</td><td><code>getDocumentData</code></td><td>Returns the parsed data extracted from one document, keyed by the field names configured on the Document Parser. For a steady stream of results Docparser recommends its webhook integration over polling this endpoint. Rate limited to 60 calls per minute.</td></tr><tr><td>Get Document Status</td><td><code>getDocumentStatus</code></td><td>Returns the full processing state of one document: whether it is still importing, being processed or dispatching webhooks, the timestamps for each stage, and any jobs that failed. Poll this after importing a document to know when its parsed data is ready.</td></tr><tr><td>List Document Parsers</td><td><code>listParsers</code></td><td>Returns every Document Parser linked to the account, each with its identifier and label. The identifier is what every other action in this connector needs. Document Parsers themselves can only be created in the Docparser web app; there is no API to create one.</td></tr><tr><td>List Parser Model Layouts</td><td><code>listParserModels</code></td><td>Returns every Model Layout configured on one Document Parser. Layouts are the templates Docparser matches an incoming document against to decide how to extract its fields.</td></tr><tr><td>List Parser Results</td><td><code>listParserResults</code></td><td>Returns the parsed data for many documents on one Document Parser - by default the last 100 uploaded, newest first. Use the list mode together with a date to pull everything imported or parsed after a point in time, which is the usual way to sync incrementally. Rate limited to 30 calls per minute, and capped at 10,000 documents.</td></tr><tr><td>Ping API</td><td><code>pingApi</code></td><td>Verifies that the configured Docparser API key is valid by pinging the API. Returns the message 'pong' on success. This is the check Docparser documents for confirming authentication.</td></tr><tr><td>Re-Integrate Documents</td><td><code>reintegrateDocuments</code></td><td>Puts documents back on the integration queue so their parsed data is pushed again to the downstream integrations and webhooks configured on the Document Parser. Use it to replay deliveries that failed. Docparser expects repeated document_ids[] form fields, and Fastn can only send one value per request, so call this once per document.</td></tr><tr><td>Re-Parse Documents</td><td><code>reparseDocuments</code></td><td>Schedules documents to be parsed again, which is what you want after changing the parsing rules on a Document Parser so existing documents pick up the new rules. Docparser expects repeated document_ids[] form fields, and Fastn can only send one value per request, so call this once per document.</td></tr><tr><td>Upload Document</td><td><code>uploadDocument</code></td><td>Imports a document into a Document Parser by sending its contents Base64-encoded, and returns the new document identifier plus the account's parsing quota. Use this for documents you hold in memory; use Fetch Document From URL when the file is already reachable at a public URL. Binary files must be Base64-encoded by the caller before being passed in.</td></tr></tbody></table>

## Events

Start a workflow when one of these happens, with an [app event trigger](https://docs.fastn.ai/build/integrations/triggers.md).

<table><thead><tr><th width="240">Event</th><th width="260">Id</th><th>When it fires</th></tr></thead><tbody><tr><td>Document Parsed</td><td><code>document.parsed</code></td><td>Fires when Docparser finishes parsing a document, pushing that document's extracted data to your URL. REGISTRATION IS MANUAL - Docparser has no webhook API, so the Fastn trigger URL must be pasted into the Docparser app by hand, once per Document Parser. Click path: log in to app.docparser.com, open the Document Parser you want events from, go to Integrations in the left-hand menu, choose Advanced Webhook, click Add New Integration (or Connect), paste the Fastn trigger URL into the Target URL / Webhook URL field, leave the method as POST, save, then send a test document through the parser to confirm delivery. Repeat for every Document Parser, because the webhook is configured per parser and not per account. The payload is the parsed document data: the fixed fields below plus one property per field configured on that Document Parser, so the exact shape differs per parser.</td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.fastn.ai/connectors/catalog/docs-knowledge/docparser.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
