provider insights GET
/api/projects/{project_id}/insights/trending/ @utdk/posthog
/api/projects/{project_id}/insights/trending/ insights_trending_retrieve
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.
- days query
- 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.
- integer
- format query
- enum: csv, json
- limit query
- Maximum number of insights to return. Defaults to 10. Capped at 100.
- integer
- offset query
- The initial index from which to return the results.
- integer
- project_id path required
- Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.
- string
Try it
Authentication
Configure credentials for PostHog API
Code snippet
Updates live as you fill in the form above.
TypeScript
import posthog from '@utdk/posthog';
await posthog.insightsTrendingRetrieve()