---
title: DDSQL
description: Execute DDSQL queries against the Datadog data catalog and poll for their results.
breadcrumbs: Docs > API > DDSQL
---

> For the complete documentation index, see [llms.txt](https://dnd37xeb23o8n.cloudfront.net/stefon.simmons/docs-astro-web-10435/llms.txt).

# DDSQL

Execute DDSQL queries against the Datadog data catalog and poll for their results.
Queries are dispatched asynchronously: the initial request may return a `running` state with
a `query_id`, and clients poll the fetch endpoint until the response transitions to
`completed` with a column-major result set.

## [Execute a tabular DDSQL query](https://dnd37xeb23o8n.cloudfront.net/stefon.simmons/docs-astro-web-10435/api/latest/ddsql/execute-a-tabular-ddsql-query.md)

| Datadog site      | API endpoint                                                  |
| ----------------- | ------------------------------------------------------------- |
| app.datadoghq.com | POST https://api.datadoghq.com/api/v2/ddsql/query/tabular     |
| us3.datadoghq.com | POST https://api.us3.datadoghq.com/api/v2/ddsql/query/tabular |
| us5.datadoghq.com | POST https://api.us5.datadoghq.com/api/v2/ddsql/query/tabular |
| app.datadoghq.eu  | POST https://api.datadoghq.eu/api/v2/ddsql/query/tabular      |
| ap1.datadoghq.com | POST https://api.ap1.datadoghq.com/api/v2/ddsql/query/tabular |
| ap2.datadoghq.com | POST https://api.ap2.datadoghq.com/api/v2/ddsql/query/tabular |
| uk1.datadoghq.com | POST https://api.uk1.datadoghq.com/api/v2/ddsql/query/tabular |
| app.ddog-gov.com  | POST https://api.ddog-gov.com/api/v2/ddsql/query/tabular      |
| us2.ddog-gov.com  | POST https://api.us2.ddog-gov.com/api/v2/ddsql/query/tabular  |

## [Fetch the result of a DDSQL query](https://dnd37xeb23o8n.cloudfront.net/stefon.simmons/docs-astro-web-10435/api/latest/ddsql/fetch-the-result-of-a-ddsql-query.md)

| Datadog site      | API endpoint                                                        |
| ----------------- | ------------------------------------------------------------------- |
| app.datadoghq.com | POST https://api.datadoghq.com/api/v2/ddsql/query/tabular/fetch     |
| us3.datadoghq.com | POST https://api.us3.datadoghq.com/api/v2/ddsql/query/tabular/fetch |
| us5.datadoghq.com | POST https://api.us5.datadoghq.com/api/v2/ddsql/query/tabular/fetch |
| app.datadoghq.eu  | POST https://api.datadoghq.eu/api/v2/ddsql/query/tabular/fetch      |
| ap1.datadoghq.com | POST https://api.ap1.datadoghq.com/api/v2/ddsql/query/tabular/fetch |
| ap2.datadoghq.com | POST https://api.ap2.datadoghq.com/api/v2/ddsql/query/tabular/fetch |
| uk1.datadoghq.com | POST https://api.uk1.datadoghq.com/api/v2/ddsql/query/tabular/fetch |
| app.ddog-gov.com  | POST https://api.ddog-gov.com/api/v2/ddsql/query/tabular/fetch      |
| us2.ddog-gov.com  | POST https://api.us2.ddog-gov.com/api/v2/ddsql/query/tabular/fetch  |
