Endpoint

An endpoint in Tinybird is a published SQL pipe exposed as an HTTPS API, with query parameters, authentication, and a JSON response, ready to be called from any application.

Most analytical databases stop at the query: you write SQL, run it from a client, and that is the contract. An endpoint turns that SQL into an addressable, parameterized HTTP resource. The same pipe that aggregates events for a chart becomes the API your frontend calls.

Endpoints handle the parts that are tedious to build by hand: request validation, token-based auth, observability of latency and error rates, and rate limiting. Because they are defined in SQL, the contract between data and product is one file, versioned in git.

An endpoint is the read side of Tinybird. Materialized views, copy pipes, and ingest sources feed it; endpoints are how user-facing features consume the result.

Pipe parameter syntax used inside an endpoint

NODE top_pages
SQL >
  %
  SELECT path, count() AS views
  FROM pageviews
  WHERE tenant_id = {{ String(tenant_id) }}
    AND timestamp >= now() - INTERVAL {{ Int32(hours, 24) }} HOUR
  GROUP BY path
  ORDER BY views DESC
  LIMIT {{ Int32(limit, 10) }}

Related terms

Where it shows up in Tinybird

Full reference in the docs
Tinybird wordmark