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

# Get content

> <p> Get through indexed content. </p> <p> Required roles: All, App </p>




## OpenAPI

````yaml https://app.stainless.com/api/spec/documented/qaip/openapi.documented.yml get /contents/{id}
openapi: 3.0.3
info:
  title: QAIP APIs
  version: 1.0.0
servers:
  - url: https://developer.qaip.com/api/v1
    description: API base path
security:
  - ApiKeyAuth: []
tags:
  - name: completions
    description: Generate completions
  - name: search
    description: Search content
  - name: extract
    description: Data extraction using LLM
  - name: tags
    description: List available tags
  - name: agent
    description: (Experimental) Agent operations
  - name: tag-source-groups
    description: Tag and source group associations
  - name: source-groups
    description: Source group (job) management and metadata
  - name: sources
    description: Sources management and metadata
  - name: local-file-groups
    description: Local file group management
  - name: secrets
    description: Secret management
  - name: google-drives
    description: Google Drive data source management
  - name: google-drive-settings
    description: Google Drive data source setting management
  - name: crawls
    description: Web crawl data source management
  - name: crawl-settings
    description: Web crawl setting management
  - name: githubs
    description: GitHub data source management
  - name: github-settings
    description: GitHub data source setting management
  - name: notions
    description: Notion data source management
  - name: notion-settings
    description: Notion data source setting management
  - name: authz-subject-attributes
    description: Authorization subject attribute management (admin only)
paths:
  /contents/{id}:
    get:
      tags:
        - content
      summary: Get content
      description: |
        <p> Get through indexed content. </p> <p> Required roles: All, App </p>
      operationId: getContent
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: authz_policy
          in: query
          required: false
          description: >
            (reserved for future use) Name of the registered authz policy to
            evaluate

            when fetching the content. Defaults to the reserved "default" policy
            when

            omitted. Ignored when authz is disabled.
          schema:
            type: string
            pattern: ^[a-z][a-z0-9_-]{0,63}$
        - name: principal_id
          in: query
          required: false
          description: >
            Identifier of the end-user (principal) on whose behalf the content
            is fetched.

            Used to look up authz subject attributes. Empty subject when
            omitted. Ignored when authz disabled.
          schema:
            type: string
            maxLength: 256
      responses:
        '200':
          description: Successful get content
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Content'
        '400':
          description: Bad Request - The request was malformed or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized - Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden - Insufficient permissions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found - The requested content does not exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Too Many Requests - Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: Python
          source: |-
            import os
            from qaip import Qaip

            client = Qaip(
                api_key=os.environ.get("QAIP_API_KEY"),  # This is the default and can be omitted
            )
            content = client.content(
                id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
            )
            print(content.id)
components:
  schemas:
    Content:
      type: object
      required:
        - id
        - text
        - url
        - title
        - timestamp
        - file_type
        - page_number
        - source_type
      properties:
        id:
          type: string
          description: Content ID
        text:
          type: string
          description: Content chunk from the source
        url:
          type: string
          description: Source URL of the content
        title:
          type: string
          description: Title of the content or document
        timestamp:
          type: integer
          description: Unix timestamp when the content was indexed
        file_type:
          $ref: '#/components/schemas/FileType'
        page_number:
          type: integer
          description: >-
            Page number for paginated documents like PDFs. Set to 0 for sources
            without page numbers
          default: 0
        source_type:
          $ref: '#/components/schemas/SourceType'
        source_id:
          type: string
          description: >
            Optional source ID for the original source. For crawl content, use
            this value with GET /sources/{source_id}/raw to download the stored
            crawl file content. For local_file content, use GET
            /sources/{source_id} for source details.
        keywords:
          type: array
          items:
            type: string
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - message
            - type
          properties:
            message:
              type: string
              description: Human-readable error message
            type:
              type: string
              description: Machine-readable error code
    FileType:
      type: string
      description: The type of the source file
      enum:
        - html
        - pdf
        - ppt
        - pptx
        - pptm
        - doc
        - docx
        - docm
        - xls
        - xlsx
        - xlsm
        - md
        - txt
        - jsonl
        - png
        - jpg
        - webp
        - heic
        - heif
        - wav
        - mp3
        - aiff
        - aac
        - m4a
        - ogg
        - flac
        - mp4
        - mpg
        - mov
        - avi
        - flv
        - webm
        - wmv
        - 3gp
        - notion_page
    SourceType:
      type: string
      description: The type of the source
      enum:
        - crawl
        - local_file
        - google_drive
        - github
        - notion
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: API key for authentication

````