This is the main endpoint for querying data from PostHog. It is used for many kinds of queries including TrendsQuery, FunnelsQuery, ActorsQuery, EventsQuery, and more.
The most useful for you is likely HogQLQuery. This enables you to query PostHog using SQL. For example, to get events where the $current_url contains blog:
It is also useful for querying non-event data like persons, data warehouse, session replay metadata, and more. For example, to get a list of all people with the email property:
Note: This endpoint is limited to 10,000 rows at 120 requests per hour. If you need more, use batch exports.
To learn more, read the query endpoint code on GitHub or search for query requests in your browser's network tab in PostHog.