PostHog
| Metadata | Value |
|---|---|
| Category | web |
| Capabilities | http |
| Website | https://posthog.com |
Returns shapes
Section titled “Returns shapes”event— fromget_eventevent[]— fromlist_eventsperson— fromget_personperson[]— fromlist_persons,search_persons
Connections
Section titled “Connections”api
Readme
Section titled “Readme”Product analytics — events, persons, and session recordings.
- Go to Personal API Keys in PostHog
- Create a key with scopes:
person:read,query:read,session_recording:read - Add the key to AgentOS credentials
Finding your project ID
Section titled “Finding your project ID”Call the get_projects utility — it returns all projects you have access to. The id field (numeric) is the project ID needed for all other operations.
person.list / person.search / person.get
Section titled “person.list / person.search / person.get”Query PostHog persons. Search works by email or name. Persons map to the AgentOS person entity type.
event.list / event.get
Section titled “event.list / event.get”List recent events. The events API is deprecated by PostHog — for complex queries, use the query utility with HogQL instead.
Note: Without after/before params, event.list only returns the last 24 hours.
Utilities
Section titled “Utilities”The recommended way to query event data. Accepts a HogQL query string:
query({ project_id: "70599", hogql: "SELECT event, count() FROM events WHERE timestamp > now() - interval 7 day GROUP BY event ORDER BY count() DESC LIMIT 20" })get_event_definitions
Section titled “get_event_definitions”Lists all event names with 30-day volume — useful for discovering what’s being tracked.
list_recordings
Section titled “list_recordings”Session recording metadata. Returns start/end times, duration, clicks, keypresses, and start URL.
Rate Limits
Section titled “Rate Limits”- Analytics endpoints: 240/minute, 1200/hour
- Query endpoint: 2400/hour