Response Formats
The Anyformat API supports multiple response formats to accommodate different use cases and integration patterns.Standard Paginated Format
By default, endpoints that return multiple items (like workflows or jobs) use paginated responses with metadata:count: Total number of items across all pagestotal_pages: Number of pages availablenext: URL for the next page (null if last page)previous: URL for the previous page (null if first page)results: Array of actual data items
Consistent Data Formatting with as_lists=true
The as_lists=true parameter provides consistent data formatting for extracted fields, making client automation easier. This parameter:
- Only affects extraction results that contain extracted data fields
- Transforms extracted data fields to consistent list format
- Only affects JSON responses (ignores CSV/JSONL)
- Makes client processing predictable and easier to automate
For Job Results
Similar transformation applies to job endpoint results: Standard Response:as_lists=true formatting:
- Metadata fields (
id,status,workflow_id) are preserved unchanged - Existing arrays like
clientremain unchanged - Single objects like
invoice_id,vendor_name, andtotal_amountare wrapped in arrays for consistency
When to Use Each Format
Standard Format is recommended for most use cases. It provides the most natural and compact response structure. List Format (as_lists=true) is useful when you need all extracted data fields to have consistent array formatting, regardless of whether they naturally contain single values or multiple values.
This is useful when building automated data processing pipelines, especially if you need consistent field formatting across all extractions.
Supported Endpoints
Theas_lists=true parameter only affects these endpoints that return extraction results:
Extraction Results Endpoints
GET /workflows/{id}/results/?output_format=json&as_lists=true- Transform workflow extraction resultsGET /jobs/{id}/?as_lists=true- Transform job results that contain extracted data
Endpoints Where as_lists=true Has No Effect
GET /workflows/- Workflow lists (no extracted data)GET /workflows/{id}/- Single workflow details (no extracted data)GET /jobs/- Job lists (no extracted data)- Any endpoint returning only metadata without extracted data fields
