[Go to site: main page, start]

Endpoints: turn a PostHog query into an API that powers your analytics
EndpointsBeta

Custom API endpoints powered by your PostHog data

Use them to build embedded analytics, data feeds, and more – no backend required. Endpoints are how your product's context flows out to the agents and tools that make it self-driving.

Get started - free

Install with AI in a single prompt

Paste into your terminal or code editor and make AI do the work.

Learn more

MCPWatch a demoTalk to a human

What does it do?

Endpoints turns any saved insight or SQL query into a stable, authenticated HTTP URL. You define the query once in PostHog – filters, breakdowns, variables, and all – and your app, agent, or internal tool fetches the results over HTTP. No custom analytics backend, no CSV exports on Monday, no Query API spaghetti. Versioning, caching, materialization, and an OpenAPI spec come with it.

Who is it for?

Endpoints is used across teams depending on your role.

Role
Use cases
Product Engineers
Ship customer-facing analytics or data feeds without building and owning an analytics API
PMs & ops
Turn a saved insight into a production URL – no ticket to data engineering required
AI / agent builders
Give MCP clients and agent runtimes stable HTTP access to live product context
Growth & marketing
Automate reports and rankings that used to mean CSV exports or brittle Query API calls
Data teams
Stop being the bottleneck on getting numbers out of PostHog and into other tools

How do I use it?

There are a few ways to explore Endpoints.

Manage endpoints from your editor

Create, run, version, and debug endpoints from Claude Code, Cursor, or any MCP-compatible agent.

Create and update endpoints
Create endpoints from a SQL or insight query, and list what already exists in the project.
Run with real variables
Execute an endpoint and read the rows back to check the response shape before writing client code.
Manage versions and logs
List saved versions with query snapshots, and read execution logs filtered by level, time range, or text.
Materialization and OpenAPI
Preview materialization, check status, ask for a rewrite when a query isn't eligible, and fetch an OpenAPI spec.

Install the PostHog MCP

Learn more
npx @posthog/wizard mcp add

Supports Next.js, React, Python, and

Top features

A dashboard powered by endpoints

Build your own dashboards

Use your PostHog data to power dashboards outside the PostHog UI.

Expose metrics as APIs
Create endpoints from insights or SQL and fetch the results from your application.
Use the queries you already have
Endpoints run the exact insight or SQL query defined in PostHog, including filters, breakdowns, and time range.
Designed to be called over and over
Endpoints are intended to be called regularly by dashboards, with higher rate limits than standard API queries.

AI prompts

Ask PostHog AI to create, run, debug, and materialize endpoints. Works in PostHog AI (in-app chat), PostHog Desktop (our AI code editor), and in your product editor (using the MCP). Already signed in? Click a prompt to try it.

Feature comparison

Tinybird
ClickHouse Cloud
Data source
PostHog product analytics data
Ingested event/log data
Raw data in ClickHouse
Create APIs from predefined queries
Create APIs from product insights
SQL-based query support
Materialized queries
Stable, named API endpoints
Built-in caching for API responses
Higher limits for predefined API queries
Embedded analytics use cases
Product analytics context (events, users, cohorts)
Real-time analytics on raw data streams
General-purpose analytics database
No separate ingestion or data modeling required
Open core

Questions?

Answers

There are a few ways you can get answers to specific questions about Endpoints.

  1. Check the docs

    We have an entire docs-wizard dedicated to docs gardening.

  2. Search the community forums

    21 discussions about Endpoints, there's a good chance your answer is already answered!

  3. Ask PostHog AI

    It's an incredibly useful AI chat that understands the product, docs, community questions, our codebase, GitHub issues, and industry knowledge.

  4. Talk to a human

    Dedicated humans are standing by and ready to assist. Best for questions about volume pricing, terms, and sexy legal stuff.

Recent discussions

Works with other PostHog tools

Use Endpoints with these other PostHog apps to maximize shareholder value.

Works with...

  • Product Analytics

    Create insights in PostHog and expose their results through endpoints. Use trends, funnels, or retention analyses to power dashboards, feeds, or summaries in your application, without rebuilding the query elsewhere.

  • Managed warehouse

    Combine product analytics data with other datasets using SQL in PostHog's data warehouse. Expose the results through endpoints when you need more control over how data is shaped or joined.

Get started – free

No credit card required.

Install with AI

Run this command in your terminal or AI editor.
npx -y @posthog/wizard@latest

Supports Next.js, React, Python, and

Install without AI

Sign up for a free account and follow the install instructions for your stack.

Get started - free