> ## Documentation Index
> Fetch the complete documentation index at: https://domoinc-openapi-sync-dataflows.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Query Dataset API

## Query Dataset

<Card horizontal arrow title="Playground" icon="code" href="/api-reference/query-dataset-api/query-dataset" />

**Method**: `POST`\
**Endpoint**: `api/query/v1/execute/export/<DATASET_ID>?includeHeader=true`

**Example**:

```json theme={"dark"}
{
  "method": "POST",
  "url": "https://{instance}.domo.com/api/query/v1/execute/export/<DATASET_ID>?includeHeader=true",
  "headers": {
    "X-DOMO-Developer-Token": "",
    "Content-Type": "application/json"
  },
  "body": { "sql": "SELECT * FROM `<DATASET_ID>` WHERE status='error'" }
}
```

**Response**:\
Description of the Response with an example of the data

```json theme={"dark"}
200:
{
    "datasource": "<DATASET_ID>",
    "columns": [
    ],
    "metadata": [
    ],
    "numColumns": 10,
    "rows": [
    ],
    "numRows": 15
}
```
