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

# Get Document Text

> Retrieve the raw text content for specified documents from the vector database



## OpenAPI

````yaml /deasy-openapi-stainless.yml post /data/document_text
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: /rest/unstructured
security: []
paths:
  /data/document_text:
    post:
      tags:
        - Data Connectors
      summary: Get Document Text
      description: >-
        Retrieve the raw text content for specified documents from the vector
        database
      operationId: get_document_text_data_document_text_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DocumentTextRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentTextResponse'
        '403':
          description: Missing token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPError'
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPError'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPError'
        '500':
          description: >-
            Internal Server Error. An unexpected error occurred while processing
            the request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPError'
      security:
        - BasicAuth: []
        - BearerAuth: []
          UserIdAuth: []
      x-codeSamples:
        - lang: Python
          source: |-
            import os
            from unstructured import UnstructuredClient

            client = UnstructuredClient(
                username=os.environ.get("UNSTRUCTURED_USERNAME"),  # This is the default and can be omitted
                password=os.environ.get("UNSTRUCTURED_PASSWORD"),  # This is the default and can be omitted
            )
            response = client.data_source.document_text(
                data_connector_name="data_connector_name",
                file_names=["string"],
            )
            print(response.file_to_nodes_to_text)
        - lang: JavaScript
          source: |-
            import UnstructuredClient from 'unstructured-sdk';

            const client = new UnstructuredClient({
              authMethod: 'My Auth Method',
              username: process.env['UNSTRUCTURED_USERNAME'], // This is the default and can be omitted
              password: process.env['UNSTRUCTURED_PASSWORD'], // This is the default and can be omitted
            });

            const response = await client.dataSource.documentText({
              data_connector_name: 'data_connector_name',
              file_names: ['string'],
            });

            console.log(response.file_to_nodes_to_text);
components:
  schemas:
    DocumentTextRequest:
      properties:
        data_connector_name:
          type: string
          title: Data Connector Name
        file_names:
          items:
            type: string
          type: array
          title: File Names
        chunk_ids:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Chunk Ids
      type: object
      required:
        - data_connector_name
        - file_names
      title: DocumentTextRequest
    DocumentTextResponse:
      properties:
        file_to_nodes_to_text:
          additionalProperties:
            additionalProperties:
              type: string
            type: object
          type: object
          title: File To Nodes To Text
      type: object
      required:
        - file_to_nodes_to_text
      title: DocumentTextResponse
    HTTPError:
      properties:
        detail:
          type: string
          title: Detail
      type: object
      required:
        - detail
      title: HTTPError
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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
  securitySchemes:
    BasicAuth:
      type: http
      scheme: basic
    BearerAuth:
      type: http
      scheme: bearer
    UserIdAuth:
      type: apiKey
      in: header
      name: X-User-ID

````