Skip to main content

Get Extraction Data

Fetch just the extracted key-value data from an extraction with GET /v1/extractions/:id/data. Returns clean JSON by default or a downloadable CSV file.

The Get Extraction Data endpoint, GET /v1/extractions/:id/data, retrieves only the extracted field values from an extraction, without metadata, confidence scores, or processing details. This is the lightest-weight endpoint for consuming extraction output, and it is ideal for downstream integrations that only need the structured data as JSON or CSV.

Use ?format=csv to download the data as a CSV file. The response Content-Type changes to text/csv and includes a Content-Disposition header for browser downloads.
GET/v1/extractions/:id/data

Query parameters

formatstringResponse format: json or csv. Any other value falls back to json. Default: "json"
Set ?format=csv to receive the data as a downloadable CSV file. The response Content-Type will be text/csv and the suggested filename is extraction-<id>.csv.

curl

# JSON (default)
curl -s https://api.talonic.com/v1/extractions/a1b2c3d4-e5f6-7890-abcd-ef1234567890/data \
  -H "Authorization: Bearer tlnc_your_api_key"

# CSV download
curl -s "https://api.talonic.com/v1/extractions/a1b2c3d4-e5f6-7890-abcd-ef1234567890/data?format=csv" \
  -H "Authorization: Bearer tlnc_your_api_key" -o extraction.csv

Response

Response fields

(field_name)anyEach key is an extracted field name; value is the extracted value. Shape matches the schema used during extraction.

Response (JSON)

{
  "vendor_name": "Acme Corp",
  "invoice_number": "INV-2026-0847",
  "total_amount": 14250.00,
  "due_date": "2026-03-15"
}

Response (?format=csv)

vendor_name,invoice_number,total_amount,due_date
"Acme Corp","INV-2026-0847",14250,"2026-03-15"

Most integrations call this endpoint to feed extraction output into downstream systems (CRMs, ERPs, data warehouses) that only need the raw key-value data. A typical workflow is to extract a document, then call this endpoint with the extraction_id from the response to get a clean data payload without metadata overhead.

The response is a flat JSON object where each key is a field name and each value is the extracted value, typed according to the schema (strings, numbers, dates, arrays). Use ?format=csv to download the same data as a CSV file — one header row of field names plus one data row, since an extraction covers a single document. String values are double-quoted with embedded quotes escaped by doubling; other values are stringified unquoted. To build a multi-document CSV table, export a data product or pipeline results instead of concatenating per-extraction files.

Pair this with [GET /v1/extractions/:id](get-extraction) when you also need confidence scores, locked field status, the normalized numeric magnitudes, or processing metadata. Note that the response shape matches the schema used during extraction — if no schema was provided, auto-discovered field names are used as keys, so downstream consumers should tolerate new keys appearing as documents vary.

Errors

Error responses

401unauthorizedMissing or invalid API key.
404not_foundNo extraction with this ID exists for your organization — also returned for documents your Sources IAM rules hide from this key.
429rate_limitedToo many requests. Retry after the period indicated in the Retry-After header.

Frequently asked questions

What is the difference between this endpoint and GET /v1/extractions/:id?+
This endpoint returns only the extracted key-value data. The full extraction endpoint also includes confidence scores, normalized numeric values, processing metadata, document details, and locked fields.
Does the CSV export include column headers?+
Yes. The CSV format includes field names as the header row and extracted values as a single data row — one extraction covers one document. Corrections applied via the correction endpoints are reflected, since the export reads the current field values.
How do I export extraction results to CSV?+
Call GET /v1/extractions/:id/data?format=csv. The response Content-Type is text/csv and a Content-Disposition header supplies the filename extraction-<id>.csv, so browsers and curl -o can save it directly as a file.
How do I get one CSV across many documents?+
This endpoint is per-document by design. For a combined table across documents, run the documents through a Spec pipeline and export the pipeline results or a data product, which produce one row per document with aligned columns.