v5

latestOpenAPI 3.1.02026-08-025631,1012.8 MB
Collections

Export Collection

Export collection documents to JSON, CSV, or Parquet format.

**Export Formats:**
- **JSON**: Line-delimited JSON (JSONL) format. Good for streaming.
- **CSV**: Comma-separated values. Best for spreadsheets.
- **PARQUET**: Columnar format (default). Best for data pipelines.

**Vector Export:**
Vectors are large and exported separately. When `include_vectors=True`,
a separate file is created for vectors with document_id mapping.

**Field Selection:**
Use `select_fields` to export only specific fields, reducing file size.

**Filtering:**
Apply filters to export a subset of documents.

**Response:**
Returns presigned download URLs valid for 1 hour.

**Limits:**
- Large exports may take time. Consider using `sample_size` for testing.
- Vector exports significantly increase processing time.
post/v1/collections/{collection_identifier}/export

Path parameters

collection_identifierstring required

The ID or name of the collection to export

The ID or name of the collection to export

Request body

format'json' | 'csv' | 'parquet'

Supported export formats for collection data.

include_vectorsboolean

Whether to include vectors in the export. Vectors are exported to a separate file due to their large size. This significantly increases export time and file size.

select_fieldsstring[] nullable

Specific fields to include in the export. If not provided, all fields are exported. Supports dot notation for nested fields (e.g., 'metadata.title', 'metadata.author').

sample_sizeinteger nullable

Maximum number of documents to export. If not provided, exports all documents. Useful for testing exports or creating sample datasets.

Example request

{
  "select_fields": [
    "document_id",
    "metadata.title",
    "metadata.category"
  ],
  "filters": {
    "AND": [
      {
        "field": "name",
        "operator": "eq",
        "value": "John"
      },
      {
        "field": "age",
        "operator": "gte",
        "value": 30
      }
    ],
    "OR": [
      {
        "field": "status",
        "operator": "eq",
        "value": "active"
      },
      {
        "field": "role",
        "operator": "eq",
        "value": "admin"
      }
    ],
    "NOT": [
      {
        "field": "department",
        "operator": "eq",
        "value": "HR"
      },
      {
        "field": "location",
        "operator": "eq",
        "value": "remote"
      }
    ],
    "case_sensitive": true
  }
}

Response

Successful Response

download_urlstring required

Presigned URL for downloading the exported file. Valid for 1 hour.

s3_pathstring required

Full S3 path where the export is stored (for internal reference).

format'json' | 'csv' | 'parquet' required

Supported export formats for collection data.

document_countinteger required

Number of documents included in the export.

file_size_bytesinteger required

Size of the exported file in bytes.

exported_atstring date-time required

Timestamp when the export was completed.

vectors_download_urlstring nullable

Presigned URL for downloading the vectors file (if include_vectors=True). Vectors are exported separately due to their large size.

vectors_s3_pathstring nullable

Full S3 path for the vectors file (if include_vectors=True).

Example response

{
  "document_count": 10000,
  "download_url": "https://s3.amazonaws.com/bucket/org_xxx/ns_xxx/api_collections_export/col_xxx/v1/documents.parquet?...",
  "exported_at": "2024-01-15T10:30:00Z",
  "file_size_bytes": 5242880,
  "format": "parquet",
  "s3_path": "s3://bucket/org_xxx/ns_xxx/api_collections_export/col_xxx/v1/documents.parquet"
}