# Unstructured

> Turn PDFs, Word files, slides, images, email and web pages into clean, structured text: split a document into titles, paragraphs and tables, chunk it for search or AI, and run Unstructured jobs from templates.

App · 11 actions. Web page: https://docs.lodol.com/docs/integrations/unstructured

## Actions

### Create job

Start a job that runs a template over one file. It returns at once with the job's id; use 'Wait for job' to follow it.

**Inputs**

- File (`file`, text, required): The document to process: upload one, pick one from an earlier step, or give a web address starting with https://. PDFs, Word, PowerPoint, Excel, HTML, email, images and text files all work.
- Template (`template_id`, text, required): What to run over the file. Pick one, or give its id from an earlier step.

**Outputs**

- `file_name` (text): The file's name
- `job` (object): The job as created
- `job_id` (text): The job's id

**Example output**

```json
{
  "file_name": "report.pdf",
  "job": {
    "created_at": "2026-01-15T10:00:00Z",
    "id": "0b7d3f6e-1c2a-4e5b-9a8d-7f6e5d4c3b2a",
    "input_file_ids": [
      "report.pdf"
    ],
    "job_type": "template",
    "output_node_files": [
      {
        "file_id": "file-1",
        "node_id": "node-1",
        "node_subtype": "auto",
        "node_type": "partition"
      }
    ],
    "processing_status": "SUCCESS",
    "reason": "",
    "runtime": "00:00:12",
    "status": "COMPLETED",
    "workflow_id": "9f8e7d6c-5b4a-4321-8fed-cba987654321",
    "workflow_name": "Template job"
  },
  "job_id": "0b7d3f6e-1c2a-4e5b-9a8d-7f6e5d4c3b2a"
}
```

### Download job output

Get the elements a job produced for one file, with their text joined together. Use the file id from 'Wait for job' or 'Get job'.

**Inputs**

- Job ID (`job_id`, text, required): The job's id, from 'Create job', 'List jobs' or an earlier step.
- File ID (`file_id`, text, required): The output file's id, from the job's output files.
- Step ID (`node_id`, text): Read the output of this step instead of the last one. From the job's output files.

**Outputs**

- `element_count` (number): How many elements
- `elements` (list): The pieces of the document, in order
- `job_id` (text): The job's id
- `text` (text): The text of every element, separated by blank lines

**Example output**

```json
{
  "element_count": 1,
  "elements": [
    {
      "element_id": "6aa0ff22f91bbe7e26e8e25ca8052acd",
      "metadata": {
        "filename": "report.pdf",
        "filetype": "application/pdf",
        "languages": [
          "eng"
        ],
        "page_number": 1
      },
      "text": "Quarterly report",
      "type": "Title"
    }
  ],
  "job_id": "0b7d3f6e-1c2a-4e5b-9a8d-7f6e5d4c3b2a",
  "text": "Quarterly report"
}
```

### Get account

Show the account and workspace the API key belongs to.

**Inputs**: None.

**Outputs**

- `account_id` (number): The account's id
- `workspace_id` (number): The workspace's id

**Example output**

```json
{
  "account_id": 1234,
  "workspace_id": 5678
}
```

### Get job

Get one job with its state, how long it ran and the output files it produced.

**Inputs**

- Job ID (`job_id`, text, required): The job's id, from 'Create job', 'List jobs' or an earlier step.

**Outputs**

- `job` (object): The job

**Example output**

```json
{
  "job": {
    "created_at": "2026-01-15T10:00:00Z",
    "id": "0b7d3f6e-1c2a-4e5b-9a8d-7f6e5d4c3b2a",
    "input_file_ids": [
      "report.pdf"
    ],
    "job_type": "template",
    "output_node_files": [
      {
        "file_id": "file-1",
        "node_id": "node-1",
        "node_subtype": "auto",
        "node_type": "partition"
      }
    ],
    "processing_status": "SUCCESS",
    "reason": "",
    "runtime": "00:00:12",
    "status": "COMPLETED",
    "workflow_id": "9f8e7d6c-5b4a-4321-8fed-cba987654321",
    "workflow_name": "Template job"
  }
}
```

### Get job details

See how a job went: its processing outcome, how many documents succeeded and failed, and how far each step got.

**Inputs**

- Job ID (`job_id`, text, required): The job's id, from 'Create job', 'List jobs' or an earlier step.

**Outputs**

- `details` (object): The job's details
- `message` (text): Unstructured's note, if any
- `processing_status` (text): How the documents fared, such as SUCCESS

**Example output**

```json
{
  "details": {
    "id": "0b7d3f6e-1c2a-4e5b-9a8d-7f6e5d4c3b2a",
    "message": "",
    "node_stats": [
      {
        "failure": 0,
        "failure_reason": "",
        "in_progress": 0,
        "node_id": "node-1",
        "node_name": "Partitioner",
        "node_subtype": "auto",
        "node_type": "partition",
        "ready": 0,
        "success": 1
      }
    ],
    "processing_status": "SUCCESS",
    "summary": {
      "total_docs": 1,
      "total_docs_failed": 0,
      "total_docs_succeeded": 1
    }
  },
  "message": "",
  "processing_status": "SUCCESS"
}
```

### Get job file status

List each file a job processed and whether it worked, with the error if not.

**Inputs**

- Job ID (`job_id`, text, required): The job's id, from 'Create job', 'List jobs' or an earlier step.

**Outputs**

- `file_count` (number): How many files
- `files` (list): The files
- `truncated` (true/false): True when only some of a very large job's files are shown

**Example output**

```json
{
  "file_count": 1,
  "files": [
    {
      "document": "report.pdf",
      "error": "",
      "record_id": "rec-1",
      "status": "SUCCESS",
      "time_elapsed": 9.5
    }
  ],
  "truncated": false
}
```

### Get template

Get one template with the steps it runs.

**Inputs**

- Template (`template_id`, text, required): The template. Pick one, or give its id from an earlier step.

**Outputs**

- `template` (object): The template

**Example output**

```json
{
  "template": {
    "description": "Reads layout and tables, then enriches the result.",
    "id": "hi_res_and_enrichment",
    "last_updated": "2026-01-15",
    "name": "High Resolution",
    "nodes": [
      {
        "id": "node-1",
        "name": "Partitioner",
        "settings": {},
        "subtype": "auto",
        "type": "partition"
      }
    ],
    "version": "1.0.0"
  }
}
```

### List jobs

List jobs, optionally only those in one state.

**Inputs**

- State (`status`, text): Only jobs in this state. All jobs if empty. One of: `SCHEDULED`, `IN_PROGRESS` (In progress), `COMPLETED`, `STOPPED`, `FAILED`, `REJECTED`.

**Outputs**

- `count` (number): How many jobs
- `jobs` (list): The jobs

**Example output**

```json
{
  "count": 1,
  "jobs": [
    {
      "created_at": "2026-01-15T10:00:00Z",
      "id": "0b7d3f6e-1c2a-4e5b-9a8d-7f6e5d4c3b2a",
      "input_file_ids": [
        "report.pdf"
      ],
      "job_type": "template",
      "output_node_files": [
        {
          "file_id": "file-1",
          "node_id": "node-1",
          "node_subtype": "auto",
          "node_type": "partition"
        }
      ],
      "processing_status": "SUCCESS",
      "reason": "",
      "runtime": "00:00:12",
      "status": "COMPLETED",
      "workflow_id": "9f8e7d6c-5b4a-4321-8fed-cba987654321",
      "workflow_name": "Template job"
    }
  ]
}
```

### List templates

List the templates a job can run, with what each one does.

**Inputs**: None.

**Outputs**

- `count` (number): How many templates
- `templates` (list): The templates

**Example output**

```json
{
  "count": 1,
  "templates": [
    {
      "description": "Reads layout and tables, then enriches the result.",
      "id": "hi_res_and_enrichment",
      "last_updated": "2026-01-15",
      "name": "High Resolution",
      "version": "1.0.0"
    }
  ]
}
```

### Partition document

Break a document into its parts (titles, paragraphs, tables, lists and more) and get them back at once, with the document's plain text and, if you ask, chunks sized for search or an AI model.

**Inputs**

- File (`file`, text, required): The document to process: upload one, pick one from an earlier step, or give a web address starting with https://. PDFs, Word, PowerPoint, Excel, HTML, email, images and text files all work.
- Strategy (`strategy`, text): How PDFs and images are read. Auto picks for you; the others trade speed against how much layout and table detail is kept. One of: `auto` (Auto (default)), `fast` (Fast: text already in the file), `hi_res` (High resolution: layout and tables), `ocr_only` (OCR only: scanned pages).
- Languages (`languages`, list): The languages in the document, for reading scanned pages. English if none. One or more of: `eng` (English), `spa` (Spanish), `fra` (French), `deu` (German), `ita` (Italian), `por` (Portuguese), `nld` (Dutch), `pol` (Polish), `rus` (Russian), `ukr` (Ukrainian), and 15 more.
- Split into chunks (`chunking_strategy`, text): Group the elements into chunks sized for search or an AI model. Leave empty to get the elements as they are. One of: `basic` (Basic: fill each chunk), `by_title` (By title: a new chunk at each heading), `by_page` (By page: a new chunk at each page), `by_similarity` (By similarity: group similar text).
- Largest chunk (`max_characters`, number): The most characters in a chunk, 1 to 100000. Unstructured's default is 500. Only when Split into chunks is Basic: fill each chunk, By title: a new chunk at each heading, By page: a new chunk at each page or By similarity: group similar text. From 1 to 100000.
- Mark page breaks (`include_page_breaks`, true/false): Add a page break element where each page ends, for formats with pages.
- Include positions (`include_coordinates`, true/false): Add where each element sits on its page.
- Skip table detection (`skip_tables`, true/false): Do not rebuild tables in PDFs and images. Faster, and tables become plain text.

**Outputs**

- `element_count` (number): How many elements
- `elements` (list): The pieces of the document, in order
- `file_name` (text): The file's name
- `text` (text): The text of every element, separated by blank lines

**Example output**

```json
{
  "element_count": 1,
  "elements": [
    {
      "element_id": "6aa0ff22f91bbe7e26e8e25ca8052acd",
      "metadata": {
        "filename": "report.pdf",
        "filetype": "application/pdf",
        "languages": [
          "eng"
        ],
        "page_number": 1
      },
      "text": "Quarterly report",
      "type": "Title"
    }
  ],
  "file_name": "report.pdf",
  "text": "Quarterly report"
}
```

### Wait for job

Wait until a job has finished processing its documents. It fails if the job fails, is rejected or stopped, or is still running when the wait ends.

**Inputs**

- Job ID (`job_id`, text, required): The job's id, from 'Create job', 'List jobs' or an earlier step.
- Wait at most (seconds) (`timeout_seconds`, number): How long to wait, 1 to 600. Defaults to 120. From 1 to 600.

**Outputs**

- `job` (object): The finished job
- `job_id` (text): The job's id
- `output_files` (list): The files the job produced, to download with 'Download job output'
- `processing_status` (text): How the documents fared, such as SUCCESS
- `succeeded` (true/false): True when every document was processed

**Example output**

```json
{
  "job": {
    "created_at": "2026-01-15T10:00:00Z",
    "id": "0b7d3f6e-1c2a-4e5b-9a8d-7f6e5d4c3b2a",
    "input_file_ids": [
      "report.pdf"
    ],
    "job_type": "template",
    "output_node_files": [
      {
        "file_id": "file-1",
        "node_id": "node-1",
        "node_subtype": "auto",
        "node_type": "partition"
      }
    ],
    "processing_status": "SUCCESS",
    "reason": "",
    "runtime": "00:00:12",
    "status": "COMPLETED",
    "workflow_id": "9f8e7d6c-5b4a-4321-8fed-cba987654321",
    "workflow_name": "Template job"
  },
  "job_id": "0b7d3f6e-1c2a-4e5b-9a8d-7f6e5d4c3b2a",
  "output_files": [
    {
      "file_id": "file-1",
      "node_id": "node-1",
      "node_subtype": "auto",
      "node_type": "partition"
    }
  ],
  "processing_status": "SUCCESS",
  "succeeded": true
}
```
