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

# Download crawl source raw file

> <p> Downloads the file content stored from crawl. Only crawl source IDs returned as content.source_id from /search, GET /contents/{id}, or POST /completions citations are valid. Local file source IDs accepted by GET /sources/{source_id} return 404 here. </p> <p> The endpoint checks tenant ownership of the crawl source and returns the entire stored file. It does not apply per-chunk authorization policies; applications using enforce authorization should decide whether to expose raw files to each principal. </p> <p> Required roles: All, App </p>




## OpenAPI

````yaml https://app.stainless.com/api/spec/documented/qaip/openapi.documented.yml get /sources/{source_id}/raw
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:
  /sources/{source_id}/raw:
    get:
      tags:
        - sources
      summary: Download crawl source raw file
      description: >
        <p> Downloads the file content stored from crawl. Only crawl source IDs
        returned as content.source_id from /search, GET /contents/{id}, or POST
        /completions citations are valid. Local file source IDs accepted by GET
        /sources/{source_id} return 404 here. </p> <p> The endpoint checks
        tenant ownership of the crawl source and returns the entire stored file.
        It does not apply per-chunk authorization policies; applications using
        enforce authorization should decide whether to expose raw files to each
        principal. </p> <p> Required roles: All, App </p>
      operationId: downloadSourceRaw
      parameters:
        - name: source_id
          in: path
          required: true
          description: Crawl source ID returned in content.source_id
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Stored crawl file content
          headers:
            Content-Type:
              description: MIME type derived from the crawl content label
              schema:
                type: string
            Content-Disposition:
              description: Attachment filename for the downloaded file
              schema:
                type: string
            Content-Length:
              description: Size in bytes of the returned content
              schema:
                type: integer
                format: int64
            X-Content-Type-Options:
              description: Always set to nosniff
              schema:
                type: string
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
          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
            )
            response = client.sources.download_raw(
                "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
            )
            print(response)
            content = response.read()
            print(content)
components:
  schemas:
    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
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: API key for authentication

````