Request
- Base URL: https://us.posthog.com
- URL: https://us.posthog.com/api/projects/{project_id}/insights/
- Auth: HTTP bearer
Path parameters
Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.
Query parameters
Return basic insight metadata only (no results, faster).
JSON-encoded array of user IDs. Only returns insights whose created_by is in the list, e.g. [1,42].
Filter by created_at > created_date_from. Accepts absolute or relative dates.
Filter by created_at < created_date_to. Accepts absolute or relative dates.
JSON-encoded array of dashboard IDs. Returns insights attached to every listed dashboard (AND).
Filter by last_modified_at > date_from. Accepts absolute dates (2025-04-23) or relative strings (-7d, -1m).
Filter by last_modified_at < date_to. Accepts absolute dates or relative strings.
Exclude Business intelligence worksheets from the insight list.
Include this parameter (any value) to restrict results to insights marked as favorited.
Opt in to receiving the deprecated dashboards field in insight payloads. Once opt-in enforcement is enabled, API-token callers stop receiving it by default; use dashboard_tiles instead.
Restrict to a single insight type. JSON matches non-wrapper query insights; SQL matches HogQL queries; BI matches editable worksheets.
Filter by last_viewed_at > last_viewed_date_from. Accepts absolute or relative dates.
Filter by last_viewed_at < last_viewed_date_to. Accepts absolute or relative dates.
Number of results to return per page.
The initial index from which to return the results.
Sort by an insight field, with a leading minus for descending order. Supports last_modified_at and last_viewed_at.
Whether to refresh the retrieved insights, how aggressively, and if sync or async:
- 'force_cache' - return cached data or a cache miss; always completes immediately as it never calculates
- 'blocking' - calculate synchronously (returning only when the query is done), UNLESS there are very fresh results in the cache
- 'async' - kick off background calculation (returning immediately with a query status), UNLESS there are very fresh results in the cache
- 'lazy_async' - kick off background calculation, UNLESS there are somewhat fresh results in the cache
- 'force_blocking' - calculate synchronously, even if fresh results are already cached
- 'force_async' - kick off background calculation, even if fresh results are already cached Background calculation can be tracked using the query_status response field.
When truthy, restricts results to insights that are saved (or attached to a visible dashboard). When falsy, only unsaved insights.
Search term matched across name, derived_name, description, and tag names. Returns exact (case-insensitive substring) matches only; if no exact match exists, returns similar (fuzzy trigram) matches instead. Each result's search_match_type is exact or similar.
JSON-encoded array of tag names. Returns insights with any of the listed tags.
Include this parameter (any value) to restrict results to insights created by the authenticated user.
Response
Changes
No recorded changes to this operation across all 1 revision of this API.