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

# Output formats

FineParser returns each parsed document in one of three formats. They differ in how much of the document's structure they keep and how it is encoded.

## Setting the output format

Pass the `outputType` field with each request. There is no default, so every request must name a format. Unlike recognition mode and languages, the format is chosen per request, so one container can serve all three.

<CodeGroup>
  ```bash cURL theme={null}
  curl -s -X POST http://localhost:8080/parse \
    -F "file=@invoice.pdf" \
    -F "outputType=json"
  ```

  ```python Python theme={null}
  import requests

  with open("invoice.pdf", "rb") as f:
      submitted = requests.post(
          "http://localhost:8080/parse",
          files={"file": f},
          data={"outputType": "json"},
      )
  job_id = submitted.json()["jobId"]
  ```

  ```javascript Node.js theme={null}
  import { openAsBlob } from "node:fs";

  const form = new FormData();
  form.append("file", await openAsBlob("invoice.pdf"), "invoice.pdf");
  form.append("outputType", "json");

  const submitted = await fetch("http://localhost:8080/parse", {
    method: "POST",
    body: form,
  });
  const { jobId } = await submitted.json();
  ```
</CodeGroup>

The submission returns a job ID. Poll the job and download the result as described in [REST API](/fine-parser/concepts/rest-api#how-a-parse-works). The downloaded file is named after the upload with the format appended, so `invoice.pdf` parsed to JSON arrives as `invoice.pdf.json`.

| Output type | Best for                          | Structure | Positions |
| ----------- | --------------------------------- | --------- | --------- |
| `doclang`   | LLM prompts, RAG, agents          | Yes       | Yes       |
| `json`      | Application code, pipelines       | Yes       | Yes       |
| `txt`       | Search indexing, plain extraction | No        | No        |

## DocLang

DocLang is an open, AI-native document standard from a working group founded by IBM, NVIDIA, Red Hat, ABBYY, HumanSignal, and Forgis. It is the format we recommend, and FineParser writes it as a single `.doclang` file. See [DocLang](/fine-parser/concepts/doclang).

## JSON

The JSON output contains the document title, pages, text, tables, and layout elements, each with bounding boxes.

## Plain text

Plain text returns the recognized text in reading order with no markup.
