---
title: DDSQL
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: Docs > API Reference > DDSQL
---

> For the complete documentation index, see [llms.txt](https://docs.datadoghq.com/llms.txt).

# DDSQL
Copy pageCopied
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 →{% #execute-a-tabular-ddsql-query %}

| Datadog site      | API endpoint                                                  |
| ----------------- | ------------------------------------------------------------- |
| 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 |
| app.datadoghq.eu  | POST https://api.datadoghq.eu/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  |
| uk1.datadoghq.com | POST https://api.uk1.datadoghq.com/api/v2/ddsql/query/tabular |
| 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 |

## Fetch the result of a DDSQL query →{% #fetch-the-result-of-a-ddsql-query %}

| Datadog site      | API endpoint                                                        |
| ----------------- | ------------------------------------------------------------------- |
| 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 |
| app.datadoghq.eu  | POST https://api.datadoghq.eu/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  |
| uk1.datadoghq.com | POST https://api.uk1.datadoghq.com/api/v2/ddsql/query/tabular/fetch |
| 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 |
