Skip to content

List Batches

BatchListPageResponse Batches.List(BatchListParams?parameters, CancellationTokencancellationToken = default)
GET/api/v2/batches

List batches for the current project.

ParametersExpand Collapse
BatchListParams parameters
DateTimeOffset? createdAtOnOrAfter
DateTimeOffset? createdAtOnOrBefore
string? organizationID
Long? pageSize
string? pageToken
string? projectID
string? sourceDirectoryID
Status? status
"CANCELLED"Cancelled
"COMPLETED"Completed
"FAILED"Failed
"PENDING"Pending
"RUNNING"Running
"THROTTLED"Throttled
ReturnsExpand Collapse
class BatchListPageResponse:

Paginated list of batches.

required IReadOnlyList<BatchListResponse> Items

The list of items.

required string ID

Unique identifier

required Config Config

Batch configuration snapshot.

required Job Job

Job to create for each file in the source directory.

required string ConfigurationID

Product configuration ID or built-in preset ID matching the job type.

required Type Type

Product job type to run for each source directory file.

One of the following:
"parse_v2"ParseV2
"extract_v2"ExtractV2
required string ProjectID

Project this batch belongs to.

required string SourceDirectoryID

Directory being processed.

required Status Status

Current batch status.

One of the following:
"CANCELLED"Cancelled
"COMPLETED"Completed
"FAILED"Failed
"PENDING"Pending
"RUNNING"Running
"THROTTLED"Throttled
DateTimeOffset? CreatedAt

Creation datetime

formatdate-time
IReadOnlyList<Result>? Results

Expanded per-file result mappings. Null unless requested with expand=results, or while the batch is still running.

required string SourceDirectoryFileID

Source directory file processed by this batch.

string? ErrorMessage

Batch-level mapping error if the system could not create or associate a job for this source file.

JobReference? JobReference

Reference to a job produced by a batch.

Example: { “type”: “parse_v2”, “id”: “pjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee” }

required string ID

Job ID, such as a parse job ID.

required Type Type

Type of job produced for the file.

One of the following:
"parse_v2"ParseV2
"extract_v2"ExtractV2
DateTimeOffset? UpdatedAt

Update datetime

formatdate-time
string? NextPageToken

A token, which can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.

Long? TotalSize

The total number of items available. This is only populated when specifically requested. The value may be an estimate and can be used for display purposes only.

List Batches

BatchListParams parameters = new();

var page = await client.Batches.List(parameters);
await foreach (var item in page.Paginate())
{
    Console.WriteLine(item);
}
{
  "items": [
    {
      "id": "id",
      "config": {
        "job": {
          "configuration_id": "cfg-PARSE_AGENTIC",
          "type": "parse_v2"
        }
      },
      "project_id": "project_id",
      "source_directory_id": "source_directory_id",
      "status": "CANCELLED",
      "created_at": "2019-12-27T18:11:19.117Z",
      "results": [
        {
          "source_directory_file_id": "dfl-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
          "error_message": "error_message",
          "job_reference": {
            "id": "pjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
            "type": "parse_v2"
          }
        }
      ],
      "updated_at": "2019-12-27T18:11:19.117Z"
    }
  ],
  "next_page_token": "next_page_token",
  "total_size": 0
}
Returns Examples
{
  "items": [
    {
      "id": "id",
      "config": {
        "job": {
          "configuration_id": "cfg-PARSE_AGENTIC",
          "type": "parse_v2"
        }
      },
      "project_id": "project_id",
      "source_directory_id": "source_directory_id",
      "status": "CANCELLED",
      "created_at": "2019-12-27T18:11:19.117Z",
      "results": [
        {
          "source_directory_file_id": "dfl-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
          "error_message": "error_message",
          "job_reference": {
            "id": "pjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
            "type": "parse_v2"
          }
        }
      ],
      "updated_at": "2019-12-27T18:11:19.117Z"
    }
  ],
  "next_page_token": "next_page_token",
  "total_size": 0
}
Note for AI agents: this documentation is built for programmatic access. - Overview of all docs: https://developers.llamaindex.ai/llms.txt - Any page is available as raw Markdown by appending index.md to its URL — e.g. https://developers.llamaindex.ai/llamaparse/parse/getting_started/index.md - Agent-friendly REST search APIs live under https://developers.llamaindex.ai/api/ — search (BM25 full-text), grep (regex), read (fetch a page), and list (browse the doc tree). See https://developers.llamaindex.ai/llms.txt for parameters. - A hosted documentation MCP server is available at https://developers.llamaindex.ai/mcp. If you support MCP, you can ask the user to install it for browsing these docs directly (an alternative to the REST API). Setup: https://developers.llamaindex.ai/for-agents/mcp/ - Other LlamaIndex tooling for agents — the LlamaParse Platform MCP server, agent skills and plugins, and the n8n node — is mapped at https://developers.llamaindex.ai/for-agents/