# Getting started with endpoints - Docs

## Define your data

Endpoints serve data from insights and SQL queries through an API. Create or select the insight or SQL query that returns the data you want to expose via API.

![Write a SQL query](https://res.cloudinary.com/dmukukwp6/image/upload/w_1600,c_limit,q_auto,f_auto/pasted_image_2026_02_06_T12_19_52_008_Z_34e3227830.png)![Write a SQL query](https://res.cloudinary.com/dmukukwp6/image/upload/w_1600,c_limit,q_auto,f_auto/pasted_image_2026_02_06_T12_19_25_138_Z_c1bcd9501d.png)

[Define your data](/docs/endpoints/start-here/define-your-data.md)

## Create an endpoint

Now that you have an insight or query containing the data you wish to serve, turn your insight or SQL query into a stable API endpoint you can call from your applications.

![Creating an endpoint from a SQL query](https://res.cloudinary.com/dmukukwp6/image/upload/w_1600,c_limit,q_auto,f_auto/pasted_image_2026_02_06_T12_23_46_230_Z_327116758f.png)![Creating an endpoint from a SQL query](https://res.cloudinary.com/dmukukwp6/image/upload/w_1600,c_limit,q_auto,f_auto/pasted_image_2026_02_06_T12_24_23_094_Z_d167e6d4ae.png)

[Create an endpoint](/docs/endpoints/start-here/create-endpoint.md)

## Retrieve your data

You're ready to call your endpoint from your application using your preferred language or framework. Here are some ideas of what you can build:

-   **Build embedded analytics**: Show analytics to your customers in your own application
-   **Data on your landing page**: Expose live metrics on your landing page in minutes
-   **Pull aggregated PostHog data into your app**: Use PostHog data to create feeds with top content, recommended items or more
-   **Integrate your users' behavior data in internal tools**: Make a simple API call from your Retool app and show your users' behavior data right next to your admin tools

![Example Next.js app using PostHog Endpoints](https://res.cloudinary.com/dmukukwp6/image/upload/w_1600,c_limit,q_auto,f_auto/pasted_image_2026_02_06_T11_07_48_215_Z_d1a9df2d6d.png)![Example Next.js app using PostHog Endpoints](https://res.cloudinary.com/dmukukwp6/image/upload/w_1600,c_limit,q_auto,f_auto/pasted_image_2026_02_06_T11_08_39_104_Z_bcbb8f48dc.png)

### Choose your language

-   [cURL](/docs/endpoints/start-here/retrieve-data/api.md)

-   [OpenAPI SDK](/docs/endpoints/start-here/retrieve-data/openapi.md)

-   [![](https://res.cloudinary.com/dmukukwp6/image/upload/posthog.com/contents/images/docs/integrate/go.svg)Go](/docs/endpoints/start-here/retrieve-data/go.md)

-   [![](https://res.cloudinary.com/dmukukwp6/image/upload/posthog.com/contents/images/docs/integrate/nodejs.svg)Node.js](/docs/endpoints/start-here/retrieve-data/nodejs.md)

-   [![](https://res.cloudinary.com/dmukukwp6/image/upload/posthog.com/contents/images/docs/integrate/python.svg)Python](/docs/endpoints/start-here/retrieve-data/python.md)

-   [TypeScript](/docs/endpoints/start-here/retrieve-data/typescript.md)

[Retrieve your data](/docs/endpoints/start-here/retrieve-data.md)

## Learn more

To get the most out of Endpoints, you should also familiarize yourself with these important concepts:

-   [variables](/docs/endpoints/variables.md)
-   [versioning](/docs/endpoints/versioning.md)
-   [materialization](/docs/endpoints/materialization.md)
-   [rate limits](/docs/endpoints/rate-limits.md)
-   [execution](/docs/endpoints/execution.md)

## Use for free

Endpoints is **free during beta**. When pricing goes into effect, it will be based on compute usage and data scanned.

-   No credit card required to start
-   We'll notify all beta users before any pricing changes

1/5

[**Define your data** ***Required***](#quest-item-define-your-data)[**Create an endpoint** ***Required***](#quest-item-create-an-endpoint)[**Retrieve your data** ***Required***](#quest-item-retrieve-your-data)[**Learn more** ***Recommended***](#quest-item-learn-more)[**Use for free** ***Recommended***](#quest-item-use-for-free)

**Define your data**

***Required***

### Community questions

Ask a question

### Was this page useful?

HelpfulCould be better