---
title: Query data
meta:
  description: Learn the ways to query data in Tinybird.
---

# Query data

Tinybird gives you several ways to query data, depending on where the query runs and who consumes the result.

Use [API Endpoints](/forward/query-data/api-endpoints) when an application, dashboard, or agent needs a stable HTTP API. Use the Query API or ClickHouse interface when a tool needs to run ad hoc SQL. Use Playgrounds, Explorations, and Time Series when you are investigating data inside Tinybird Cloud.

## Query from outside Tinybird

**[API Endpoints](/forward/query-data/api-endpoints)** publish the result of a Pipe as a REST API. They are the production path for serving query results to applications, user interfaces, dashboards, and agents. Use Tinybird's [templating language](/forward/core-concepts/templating-language) to add typed query parameters, filters, sorting, and limits.

**[Query API](/forward/query-data/sql-api)** runs SQL directly against Pipes and Data Sources in your Workspace through the `/v0/sql` endpoint. Use it for internal tools, automation, notebooks, scripts, and ad hoc queries that do not need a published Endpoint contract.

**[ClickHouse® interface](/forward/query-data/clickhouse-interface)** lets ClickHouse-compatible clients, BI tools, and SQL IDEs query Tinybird Data Sources over HTTPS.

**[MCP](/forward/query-data/mcp)** lets AI agents query your Workspace and use published API Endpoints as tools through the [Model Context Protocol](https://modelcontextprotocol.io).

## Query inside Tinybird

**[Playgrounds](/forward/query-data/playgrounds)** let you write and test SQL interactively before moving finished logic into Pipes.

**[Explorations](/forward/query-data/explorations)** is a conversational UI in Tinybird Cloud for asking questions about your data in natural language.

**[Time Series](/forward/query-data/time-series)** visualizes time-based metrics from Data Sources, Service Data Sources, and Endpoints.

## Next steps

- Learn how to [query API Endpoints](/forward/query-data/api-endpoints).
- Learn about the [Query API](/forward/query-data/sql-api).
- Learn about the [templating language](/forward/core-concepts/templating-language).
- Learn about the [ClickHouse interface](/forward/query-data/clickhouse-interface).
- Learn about [Explorations](/forward/query-data/explorations), [Playgrounds](/forward/query-data/playgrounds), and [Time Series](/forward/query-data/time-series).
