---
title: "Get Document Info"
method: POST
path: "/documents/get-document-info"
tags: ["Documents"]
---

# Get Document Info

`POST /documents/get-document-info`

Retrieves information about a specific document. The request parameters define what information you would like to receive.

A `404 Not Found` will be returned if either the collection name does not exist, or the document path does not exist within the provided collection.

## Request body

- GetDocumentInfoRequest
  - `collection_name` string, required — The name of the collection.
  - `path` string, required — The filepath of the document that you're requesting. A `404 Not Found` status code will be returned if no document with this path was found.
  - `include_content` boolean — If `true`, then the document response will have the `content` attribute be a `string`, rather than `null`. This string will contain the full contents of the document.

## Response `200`

Successful Response

- GetDocumentInfoResponse
  - `document` DocumentResponse, required
    - `id` string, uuid, required
    - `collection_name` string, required
    - `path` string, required
    - `metadata` DocumentMetadataJson, required
    - `index_status` 'not_parsed' | 'parsing' | 'not_indexed' | 'indexing' | 'indexed' | 'parsing_failed' | 'indexing_failed', required
    - `size` integer, required — The total size of the raw document data, in bytes.
    - `num_pages` integer, nullable, required — The number of pages in this document. This will be `null` if the document is parsing or failed to parse. It can also be `null` if the document is a filetype that does not support pages.
    - `file_url` string, required — A URL to the document data, which can be used to download the raw document content or to display the document in frontend applications. NOTE: If a `/documents/update-document` call returned a new document id, then this url will be invalidated and must be retrieved again.
    - `content` string, nullable — This will be `null`, unless `include_content` was available and set to `true`.

## Other responses

- `400` — Bad Request
- `404` — Not Found
- `422` — Validation Error

## Changes

- **2025-06-03** `6d4d2509d6d6` — 2 info
  - added the required property `document/file_url` to the response with the `200` status
  - added the required property `document/size` to the response with the `200` status
- **2025-01-27** `99a41bb73e43` — 2 warning
  - added the new `indexing_failed` enum value to the `document/index_status` response property for the response status `200`
  - added the new `parsing` enum value to the `document/index_status` response property for the response status `200`

[Change history](https://skmtc.dev/zeroentropy-ai/apis/zeroentropy-api/changes/documents/get-document-info/post.md)

---

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