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

# Export Query

> Run a constrained string query and stream the result as an Excel workbook (or CSV/Parquet).

auth(india:read + data:export) -> OPA(export prices) -> as-of lakehouse read -> legal_basis drop ->
project -> serialize. The default ``fmt=xlsx`` is the analyst surface (SPEC.md §8
"Query -> Excel"); ``csv``/``parquet`` are the same panel in other encodings.



## OpenAPI

````yaml /openapi.json post /india/exports
openapi: 3.1.0
info:
  title: Corpus API
  description: >-
    Point-in-time financial and governed-document data for the US, India, and
    China.
  version: '2026-07-20'
servers:
  - url: https://corpus-api.onera.app
    description: Production
security: []
paths:
  /india/exports:
    post:
      tags:
        - India · Exports
      summary: Export Query
      description: >-
        Run a constrained string query and stream the result as an Excel
        workbook (or CSV/Parquet).


        auth(india:read + data:export) -> OPA(export prices) -> as-of lakehouse
        read -> legal_basis drop ->

        project -> serialize. The default ``fmt=xlsx`` is the analyst surface
        (SPEC.md §8

        "Query -> Excel"); ``csv``/``parquet`` are the same panel in other
        encodings.
      operationId: export_query_india_exports_post
      parameters:
        - name: q
          in: query
          required: true
          schema:
            type: string
            description: >-
              Constrained string query, e.g. 'prices isin=INE_AAA,INE_BBB
              start=2020-01-01 end=2020-12-31 columns=close,volume'.
            title: Q
          description: >-
            Constrained string query, e.g. 'prices isin=INE_AAA,INE_BBB
            start=2020-01-01 end=2020-12-31 columns=close,volume'.
        - name: fmt
          in: query
          required: false
          schema:
            enum:
              - xlsx
              - csv
              - parquet
            type: string
            default: xlsx
            title: Fmt
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 200000
            minimum: 1
            default: 50000
            title: Limit
      responses:
        '200':
          description: Governed export bytes in the requested format.
          content:
            application/vnd.openxmlformats-officedocument.spreadsheetml.sheet:
              schema:
                type: string
                format: binary
            text/csv:
              schema:
                type: string
                format: binary
            application/vnd.apache.parquet:
              schema:
                type: string
                format: binary
        '400':
          description: Invalid parameter combination
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Insufficient jurisdiction or scope
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Unknown resource
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Request schema validation failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: Source content is unavailable or still processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - X-API-KEY: []
components:
  schemas:
    ErrorResponse:
      properties:
        error:
          type: string
          title: Error
        message:
          type: string
          title: Message
        request_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Request Id
      type: object
      required:
        - error
        - message
      title: ErrorResponse
  securitySchemes:
    X-API-KEY:
      type: apiKey
      in: header
      name: X-API-KEY
      description: >-
        Provisioned Corpus API key with the required jurisdiction and operation
        scopes.

````