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

# List Queries

> List all queries with their current status

## Authentication

<ParamField header="X-API-Key" type="string" required>
  Your API key for authentication
</ParamField>

## Response Fields

<ResponseField name="queries" type="array">
  Array of query objects

  <Expandable title="Query Object">
    <ResponseField name="id" type="string">
      The unique query identifier
    </ResponseField>

    <ResponseField name="status" type="string">
      Current status: `pending`, `processing`, `completed`, or `failed`
    </ResponseField>

    <ResponseField name="destination" type="object">
      Destination configuration for the query
    </ResponseField>

    <ResponseField name="createdAt" type="string">
      ISO 8601 timestamp when query was created
    </ResponseField>

    <ResponseField name="updatedAt" type="string">
      ISO 8601 timestamp when query was last updated
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="total" type="number">
  Total number of queries
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET https://api.hypermodel.ai/api/v1/queries \
    -H "X-API-Key: your-api-key"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://api.hypermodel.ai/api/v1/queries', {
    method: 'GET',
    headers: {
      'X-API-Key': 'your-api-key',
    },
  });

  const data = await response.json();
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      'https://api.hypermodel.ai/api/v1/queries',
      headers={
          'X-API-Key': 'your-api-key',
      },
  )

  data = response.json()
  ```
</RequestExample>

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "queries": [
      {
        "id": "query_1234567890_abc123",
        "status": "completed",
        "destination": {
          "type": "URL"
        },
        "createdAt": "2025-01-01T00:00:00Z",
        "updatedAt": "2025-01-01T00:01:00Z"
      },
      {
        "id": "query_0987654321_xyz789",
        "status": "processing",
        "destination": {
          "type": "Snowflake"
        },
        "createdAt": "2025-01-01T00:02:00Z",
        "updatedAt": "2025-01-01T00:02:30Z"
      },
      {
        "id": "query_1111222233_def456",
        "status": "pending",
        "destination": {
          "type": "Sheets"
        },
        "createdAt": "2025-01-01T00:03:00Z",
        "updatedAt": "2025-01-01T00:03:00Z"
      }
    ],
    "total": 3
  }
  ```
</ResponseExample>

<Info>
  Queries are sorted by creation date (newest first)
</Info>
