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

# Query data

> Triggers a data export for the given company and date range.

<Warning>
  The `presigned_url` returned by this endpoint is not always ready immediately.
  Poll it with `Range: bytes=0-0` every 10 seconds until it returns `200` or
  `206`, then download the full file.
</Warning>


## OpenAPI

````yaml api-reference/openapi-latest.json GET /query-data
openapi: 3.1.0
info:
  title: Webless API
  description: >-
    Reference for the latest Webless API surface. New integrations should use
    the /api/v1 endpoints.
  version: v1
servers:
  - url: https://api.webless.ai
    description: Production Search API
security: []
paths:
  /query-data:
    get:
      tags:
        - Data API
      summary: Generate a pre-signed export URL
      description: Triggers a data export for the given company and date range.
      operationId: queryData
      parameters:
        - name: company
          in: query
          required: true
          schema:
            type: string
          description: Your client code.
          example: webless
        - name: start_date
          in: query
          required: true
          schema:
            type: string
            format: date
          description: Inclusive start date in YYYY-MM-DD format.
          example: '2025-07-01'
        - name: end_date
          in: query
          required: true
          schema:
            type: string
            format: date
          description: Inclusive end date in YYYY-MM-DD format.
          example: '2025-07-03'
      responses:
        '202':
          description: Accepted. The export is being prepared.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueryDataResponse'
        '400':
          description: Missing or invalid parameter
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
        '404':
          description: Incorrect endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - ApiKeyAuth: []
      servers:
        - url: https://portal.webless.ai
          description: Production Data API
components:
  schemas:
    QueryDataResponse:
      type: object
      properties:
        presigned_url:
          type: string
          format: uri
          example: >-
            https://webless-client-data.s3.us-west-1.amazonaws.com/athena-results/QUERY_ID.csv?X-Amz-...
    ErrorResponse:
      type: object
      properties:
        detail:
          oneOf:
            - type: string
            - type: array
              items: {}
        error:
          type: string
    MessageResponse:
      type: object
      properties:
        message:
          type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````