---
title: "POST /documents/v2/datasets/{dataset_id}/parse"
method: POST
path: "/documents/v2/datasets/{dataset_id}/parse"
tags: ["datasets"]
---

# POST /documents/v2/datasets/{dataset_id}/parse

`POST /documents/v2/datasets/{dataset_id}/parse`

## Path parameters

- `dataset_id` string, required

## Request body

- DatasetParseRequest
  - `file_id` string, nullable — ID of the file previously uploaded to Tensorlake. This is the ID of the file in Tensorlake's storage system. It has a tensorlake- (for V1 files), or file_ (for V2 files) prefix. This field must be provided if `file_url` and `raw_text` are not provided.
  - `file_url` string, nullable — External URL of the file to parse. This URL should point to a publicly accessible file that can be downloaded. This field must be provided if `file_id` and `raw_text` are not provided.
  - `raw_text` string, nullable — The raw text to parse. This should be a free-text representation of the document. This field must be provided if `file_id` and `file_url` are not provided.
  - `page_range` string, nullable — The range of pages to parse in the document. Default - All pages will be parsed. This should be a comma-separated list of page numbers or ranges (e.g., "1,2,3-5").
  - `mime_type` 'application/pdf' | 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' | 'application/vnd.openxmlformats-officedocument.presentationml.presentation' | 'application/vnd.apple.keynote' | 'image/jpeg' | 'text/plain' | 'text/html' | 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' | 'application/vnd.ms-excel.sheet.macroEnabled.12' | 'application/vnd.ms-excel' | 'text/csv' | 'image/png'
  - `labels` object, nullable — Additional metadata to identify the parse request. The labels are returned in the parse response.

## Response `200`

Dataset file parsed successfully

- DatasetParsedResponse
  - `parse_id` string, required — The unique identifier for the parse job. Use this identifier to track the progress and results of the parse job using the `/documents/v2/parse/{parse_id}` endpoint. This identifier is used to track the parse job's progress and results.
  - `created_at` string, required — The date and time when the parse job was scheduled. The date is in RFC 3339 format (e.g., "2023-10-01T12:00:00Z").

## Other responses

- `400` — Invalid dataset ingest request
- `401` — Unauthorized. Invalid or missing credentials
- `403` — Forbidden. You do not have permission to access this resource
- `404` — Dataset not found
- `422` — Invalid properties in request body
- `500` — Internal server error

---

[API](https://skmtc.dev/tensorlakeai/apis/tensorlake-api.md) · [All operations](https://skmtc.dev/tensorlakeai/apis/tensorlake-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/tensorlakeai/tensorlake-api/revisions/fb161f7c0ab7/schema)
