# Docparser

> Turn PDFs, scans and images into structured data: send documents to your Docparser parsers, check their progress, and read the parsed fields and tables.

App · 9 actions. Web page: https://docs.lodol.com/docs/integrations/docparser

## Actions

### Get document data

Get the data parsed from one document. 'Document' is empty while the document is still being parsed.

**Inputs**

- Parser (`parser_id`, text, required): The document parser. Pick one, or give its id from an earlier step.
- Document ID (`document_id`, text, required): The document's id, from 'Upload document', 'Import document from URL' or 'List parsed documents'.
- Data layout (`format`, text): Nested keeps tables and groups as objects. Flat gives plain key and value pairs. Defaults to nested. One of: `object` (Nested (default)), `flat` (Flat key and value pairs).
- Include split documents (`include_children`, true/false): When the parser splits a file into several documents, return all of them.

**Outputs**

- `count` (number): How many parsed documents came back
- `document` (object): The parsed document, empty if not parsed yet
- `documents` (list): All parsed documents, more than one if split

**Example output**

```json
{
  "count": 1,
  "document": {
    "document_id": "1d35639d4b53b59e77f737c93cd1d3d7",
    "file_name": "invoice.pdf",
    "id": "967bcf5658d73c80563072373d5002e3",
    "media_link": "https://api.docparser.com/v1/document/media/abc",
    "media_link_data": "https://api.docparser.com/v1/document/media/abc/data",
    "media_link_original": "https://api.docparser.com/v1/document/media/abc/original",
    "page_count": 1,
    "processed_at": "2026-10-01T14:57:10+00:00",
    "remote_id": "order-1042",
    "uploaded_at": "2026-10-01T14:57:05+00:00"
  },
  "documents": [
    {
      "document_id": "1d35639d4b53b59e77f737c93cd1d3d7",
      "file_name": "invoice.pdf",
      "id": "967bcf5658d73c80563072373d5002e3",
      "media_link": "https://api.docparser.com/v1/document/media/abc",
      "media_link_data": "https://api.docparser.com/v1/document/media/abc/data",
      "media_link_original": "https://api.docparser.com/v1/document/media/abc/original",
      "page_count": 1,
      "processed_at": "2026-10-01T14:57:10+00:00",
      "remote_id": "order-1042",
      "uploaded_at": "2026-10-01T14:57:05+00:00"
    }
  ]
}
```

### Get document status

Check where a document is: queued, importing, processing, parsed or failed. Read its data once it is parsed.

**Inputs**

- Parser (`parser_id`, text, required): The document parser. Pick one, or give its id from an earlier step.
- Document ID (`document_id`, text, required): The document's id, from 'Upload document', 'Import document from URL' or 'List parsed documents'.

**Outputs**

- `failed_jobs` (list): The jobs that failed, empty if none
- `is_finished` (true/false): True once the document is parsed, failed or unsupported
- `state` (text): queued, importing, processing, parsed, failed or unsupported
- `status` (object): Docparser's own status record

**Example output**

```json
{
  "failed_jobs": [],
  "is_finished": true,
  "state": "parsed",
  "status": {
    "dispatched_webhook": false,
    "dispatched_webhook_problem": false,
    "failed_jobs": [],
    "file_source": "api",
    "filename": "invoice.pdf",
    "first_processed_at": 1790866630,
    "imported_at": 1790866627,
    "importing_in_progress": false,
    "mime_type": "application/pdf",
    "pages": 1,
    "processed_at": 1790866630,
    "processing_in_progress": false,
    "remote_id": "order-1042",
    "supported": true,
    "token": "1d35639d4b53b59e77f737c93cd1d3d7",
    "uploaded_at": 1790866625,
    "webhook_dispatching_in_progress": false,
    "webhooks_created": 0,
    "webhooks_sent": 0
  }
}
```

### Import document from URL

Have Docparser fetch a document from a public web address and parse it. Uses page quota.

**Inputs**

- Parser (`parser_id`, text, required): The document parser. Pick one, or give its id from an earlier step.
- Document address (`url`, text, required): A web address Docparser can open without signing in.
- Your own ID (`remote_id`, text): Your own reference for the document, such as an order number. It comes back with the parsed data.

**Outputs**

- `document_id` (text): The new document's id; use it to check status and read data
- `file_size` (number): Size of the uploaded file in bytes (uploads only)
- `message` (text): Docparser's note, such as where to check status (URL imports)
- `parser_id` (text): The parser the document went to
- `quota_left` (number): Pages left in this billing period (uploads only)
- `quota_refill` (text): When the page quota refills (uploads only)
- `quota_used` (number): Pages used so far in this billing period (uploads only)
- `remote_id` (text): Your own reference for the document, empty if none

**Example output**

```json
{
  "document_id": "b07b080b357334510e10f5b41567000c",
  "file_size": 0,
  "message": "The document is scheduled to be fetched from the URL.",
  "parser_id": "mwekrupomwekrupo",
  "quota_left": 0,
  "quota_refill": "",
  "quota_used": 0,
  "remote_id": ""
}
```

### List parsed documents

Get the parsed data of many documents in a parser: the latest uploads, or those uploaded or parsed after a time.

**Inputs**

- Parser (`parser_id`, text, required): The document parser. Pick one, or give its id from an earlier step.
- Which documents (`which`, text): Defaults to the most recently uploaded. One of: `last_uploaded` (Most recently uploaded (default)), `uploaded_after` (Uploaded after a date), `processed_after` (Parsed after a date).
- After (`after`, date and time): Only documents uploaded or parsed after this time. Needed when 'Which documents' is one of the 'after a date' choices.
- How many (`limit`, number): How many documents to return, 1 to 10,000. Defaults to 100. From 1 to 10000.
- Skip (`offset`, number): How many documents to skip first, to read the next page. At least 0.
- Your own ID (`remote_id`, text): Only documents uploaded with this reference.
- Include documents still being parsed (`include_unfinished`, true/false): By default only fully parsed documents are returned.
- Sort by (`sort_by`, text): Defaults to upload time. One of: `uploaded_at` (Upload time (default)), `processed_at` (Last parsed time), `first_processed_at` (First parsed time), `imported_at` (Import time), `preprocessed_at` (Preprocessing time), `dispatched_webhook_at` (Webhook sent time).
- Order (`sort_order`, text): Defaults to newest first. One of: `DESC` (Newest first (default)), `ASC` (Oldest first).
- Data layout (`format`, text): Nested keeps tables and groups as objects. Flat gives plain key and value pairs. Defaults to nested. One of: `object` (Nested (default)), `flat` (Flat key and value pairs).

**Outputs**

- `count` (number): How many documents came back
- `documents` (list): The parsed documents

**Example output**

```json
{
  "count": 1,
  "documents": [
    {
      "document_id": "1d35639d4b53b59e77f737c93cd1d3d7",
      "file_name": "invoice.pdf",
      "id": "967bcf5658d73c80563072373d5002e3",
      "media_link": "https://api.docparser.com/v1/document/media/abc",
      "media_link_data": "https://api.docparser.com/v1/document/media/abc/data",
      "media_link_original": "https://api.docparser.com/v1/document/media/abc/original",
      "page_count": 1,
      "processed_at": "2026-10-01T14:57:10+00:00",
      "remote_id": "order-1042",
      "uploaded_at": "2026-10-01T14:57:05+00:00"
    }
  ]
}
```

### List parser layouts

List the model layouts of one parser.

**Inputs**

- Parser (`parser_id`, text, required): The document parser. Pick one, or give its id from an earlier step.

**Outputs**

- `count` (number): How many layouts the parser has
- `layouts` (list): The layouts

**Example output**

```json
{
  "count": 1,
  "layouts": [
    {
      "id": "1",
      "label": "Invoice Layout #1"
    }
  ]
}
```

### List parsers

List the document parsers on the account with their ids.

**Inputs**: None.

**Outputs**

- `count` (number): How many parsers there are
- `parsers` (list): The parsers

**Example output**

```json
{
  "count": 1,
  "parsers": [
    {
      "id": "mwekrupomwekrupo",
      "label": "Invoice Parser"
    }
  ]
}
```

### Re-parse documents

Parse documents again with the parser's current rules. Use after changing the parser. Uses page quota.

**Inputs**

- Parser (`parser_id`, text, required): The document parser. Pick one, or give its id from an earlier step.
- Documents (`document_ids`, list, required): The ids of the documents, from 'List parsed documents' or an earlier step.

**Outputs**

- `document_ids` (list): The ids that were sent
- `message` (text): Docparser's note, empty if none
- `total` (number): How many documents Docparser queued

**Example output**

```json
{
  "document_ids": [
    "1d35639d4b53b59e77f737c93cd1d3d7"
  ],
  "message": "",
  "total": 1
}
```

### Re-send documents to integrations

Send already parsed documents through the parser's integrations (webhooks, spreadsheets and so on) again.

**Inputs**

- Parser (`parser_id`, text, required): The document parser. Pick one, or give its id from an earlier step.
- Documents (`document_ids`, list, required): The ids of the documents, from 'List parsed documents' or an earlier step.

**Outputs**

- `document_ids` (list): The ids that were sent
- `message` (text): Docparser's note, empty if none
- `total` (number): How many documents Docparser queued

**Example output**

```json
{
  "document_ids": [
    "1d35639d4b53b59e77f737c93cd1d3d7"
  ],
  "message": "",
  "total": 1
}
```

### Upload document

Send a file to a parser. Docparser parses it a moment later: check 'Get document status', then read it with 'Get document data'. Uses page quota.

**Inputs**

- Parser (`parser_id`, text, required): The document parser. Pick one, or give its id from an earlier step.
- File (`file`, text, required): The document to parse: a PDF, image, Word, Excel, CSV or text file.
- File name (`file_name`, text): The name to show in Docparser, with its extension. Leave empty to use the uploaded file's name.
- Your own ID (`remote_id`, text): Your own reference for the document, such as an order number. It comes back with the parsed data.

**Outputs**

- `document_id` (text): The new document's id; use it to check status and read data
- `file_size` (number): Size of the uploaded file in bytes (uploads only)
- `message` (text): Docparser's note, such as where to check status (URL imports)
- `parser_id` (text): The parser the document went to
- `quota_left` (number): Pages left in this billing period (uploads only)
- `quota_refill` (text): When the page quota refills (uploads only)
- `quota_used` (number): Pages used so far in this billing period (uploads only)
- `remote_id` (text): Your own reference for the document, empty if none

**Example output**

```json
{
  "document_id": "abc123efg456",
  "file_size": 119540,
  "message": "",
  "parser_id": "mwekrupomwekrupo",
  "quota_left": 258,
  "quota_refill": "2026-11-02T02:43:48+00:00",
  "quota_used": 642,
  "remote_id": "order-1042"
}
```
