> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zeroentropy.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# 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.



## OpenAPI

````yaml post /documents/get-document-info
openapi: 3.1.0
info:
  title: ZeroEntropy API
  description: This API provides access to ZeroEntropy's SoTA retrieval pipeline. Enjoy!
  version: 0.1.0
servers:
  - url: https://api.zeroentropy.dev/v1
    description: ZeroEntropy API
  - url: https://eu-api.zeroentropy.dev/v1
    description: ZeroEntropy API (EU datacenters)
security: []
paths:
  /documents/get-document-info:
    post:
      tags:
        - Documents
      summary: Get Document Info
      description: >-
        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.
      operationId: get_document_info_documents_get_document_info_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetDocumentInfoRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetDocumentInfoResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              example:
                detail: Description of Error
        '404':
          description: Not Found
          content:
            application/json:
              example:
                detail: Description of Error
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    GetDocumentInfoRequest:
      properties:
        collection_name:
          type: string
          title: Collection Name
          description: The name of the collection.
        path:
          type: string
          title: Path
          description: >-
            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:
          type: boolean
          title: Include Content
          description: >-
            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.
          default: false
      type: object
      required:
        - collection_name
        - path
      title: GetDocumentInfoRequest
    GetDocumentInfoResponse:
      properties:
        document:
          $ref: '#/components/schemas/DocumentResponse'
      type: object
      required:
        - document
      title: GetDocumentInfoResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    DocumentResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        collection_name:
          type: string
          title: Collection Name
        path:
          type: string
          title: Path
        metadata:
          $ref: '#/components/schemas/DocumentMetadataJson'
        index_status:
          $ref: '#/components/schemas/DocumentIndexStatus'
        size:
          type: integer
          title: Size
          description: The total size of the raw document data, in bytes.
        num_pages:
          anyOf:
            - type: integer
            - type: 'null'
          title: Num Pages
          description: >-
            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:
          type: string
          title: File Url
          description: >-
            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:
          anyOf:
            - type: string
            - type: 'null'
          title: Content
          description: >-
            This will be `null`, unless `include_content` was available and set
            to `true`.
      type: object
      required:
        - id
        - collection_name
        - path
        - metadata
        - index_status
        - size
        - num_pages
        - file_url
      title: DocumentResponse
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    DocumentMetadataJson:
      additionalProperties:
        anyOf:
          - type: string
          - items:
              type: string
            type: array
      type: object
    DocumentIndexStatus:
      type: string
      enum:
        - not_parsed
        - parsing
        - not_indexed
        - indexing
        - indexed
        - parsing_failed
        - indexing_failed
      title: DocumentIndexStatus
  securitySchemes:
    HTTPBearer:
      type: http
      description: >-
        The `Authorization` header must be provided in the format `Bearer
        <your-api-key>`.


        You can get your API Key at the
        [Dashboard](https://dashboard.zeroentropy.dev/)!
      scheme: bearer

````