> For the complete documentation index, see [llms.txt](https://v2.dataos.info/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://v2.dataos.info/references/interfaces/apis/data-product-apis/querying-data-products.md).

# Querying Data Products

Guidance for matching Data Product query interfaces to integration and analytics needs.

Choose the method that best fits your application, analytical workflow, or reporting use case.

## Choose a query method

| If you need to...                                         | Use                                                                                                                        | Why                                                                                              |
| --------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ |
| Build a dashboard, application, or repeatable integration | [REST](https://v2.dataos.info/references/interfaces/apis/data-product-apis/querying-data-products/rest.md)                 | Structured JSON is easy to generate, validate, and parameterize.                                 |
| Explore governed data using familiar SQL                  | [Semantic SQL](https://v2.dataos.info/references/interfaces/apis/data-product-apis/querying-data-products/semantic-sql.md) | Query semantic members and invoke governed calculations through `MEASURE(...)`.                  |
| Select typed fields and receive nested JSON               | [GraphQL](https://v2.dataos.info/references/interfaces/apis/data-product-apis/querying-data-products/graphql.md)           | Schema introspection and inline results suit frontend and API clients.                           |
| Read one approved KPI with minimal query construction     | [Metrics](https://v2.dataos.info/references/interfaces/apis/data-product-apis/querying-data-products/metrics.md)           | The metric fixes the measure and time axis; you choose the grain, slices, and filters.           |
| Publish and reuse a stable saved result                   | [Perspectives](https://v2.dataos.info/references/interfaces/apis/data-product-apis/querying-data-products/perspectives.md) | A slug, access controls, cached result, and refresh behavior turn a query into a reusable asset. |

{% hint style="info" %}
Prefer a semantic interface for business-facing integrations. Use [Source SQL](https://v2.dataos.info/references/interfaces/apis/data-product-apis/querying-data-products/advanced/source-sql.md) only when the semantic layer cannot express the question; it couples the consumer to physical models and warehouse SQL.
{% endhint %}

## Understand the query vocabulary

* A **measure** is a governed calculation, such as total revenue or units sold.
* A **dimension** groups or filters a calculation, such as store region or brand.
* A **time dimension** filters time and can bucket results into a grain such as day or month.
* A **segment** is a reusable filter defined by the Data Product author.
* A **metric** is a named time series with a fixed measure and time axis.
* A **perspective** saves a successful query and exposes its latest result through a stable slug.

REST, Semantic SQL, Metrics, and Source SQL return `202 Accepted`. Poll the statement and fetch its result after `SUCCESS`. GraphQL normally returns data inline and returns `202` only if its synchronous wait window expires. See [Query lifecycle](https://v2.dataos.info/references/interfaces/apis/data-product-apis/querying-data-products/advanced/query-lifecycle.md).

## Advanced reading

* [Choosing a query method](https://v2.dataos.info/references/interfaces/apis/data-product-apis/querying-data-products/advanced/choosing-a-query-method.md)
* [Query lifecycle](https://v2.dataos.info/references/interfaces/apis/data-product-apis/querying-data-products/advanced/query-lifecycle.md)
* [Measure and dimension behavior](https://v2.dataos.info/references/interfaces/apis/data-product-apis/querying-data-products/advanced/measure-and-dimension-behavior.md)
* [Cross-model queries](https://v2.dataos.info/references/interfaces/apis/data-product-apis/querying-data-products/advanced/cross-model-queries.md)
* [Source SQL](https://v2.dataos.info/references/interfaces/apis/data-product-apis/querying-data-products/advanced/source-sql.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://v2.dataos.info/references/interfaces/apis/data-product-apis/querying-data-products.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
