Returns insights ranked by view count over the last N days (default 7), highest first. Each result includes the same metadata as the standard insights list, plus a view_count and up to 3 recent viewers. Useful for surfacing the most-used insights in a project.
Request
- Base URL: https://us.posthog.com
- URL: https://us.posthog.com/api/projects/{project_id}/insights/trending/
- 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
Time window in days to compute view counts over. Defaults to 7. Larger windows surface consistently popular insights; smaller windows surface what's hot right now.
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.
Maximum number of insights to return. Defaults to 10. Capped at 100.
The initial index from which to return the results.
Response
Example response
{
"count": 123,
"next": "http://api.example.org/accounts/?offset=400&limit=100",
"previous": "http://api.example.org/accounts/?offset=200&limit=100"
}Changes
No recorded changes to this operation across all 1 revision of this API.