Skip to main content

PostHog

This page contains the setup guide and reference information for the PostHog source connector.

Prerequisites

  • api_key - obtain Private API Key for your account following these steps
  • base_url - 'https://app.posthog.com' by default, but it can be different if self-hosted posthog instances is used

Setup guide

Step 1: Set up PostHog

  • PostHog Account

Step 2: Set up the PostHog connector in Airbyte

For Airbyte Cloud:

  1. Log into your Airbyte Cloud account.
  2. In the left navigation bar, click Sources. In the top-right corner, click +new source.
  3. On the Set up the source page, enter the name for the PostHog connector and select PostHog from the Source type dropdown.
  4. Enter your apikey.
  5. Enter your start_date.
  6. Change default base_url if self-hosted posthog instances is used
  7. Click Set up source.

For Airbyte OSS:

  1. Navigate to the Airbyte Open Source dashboard.
  2. Set the name for your source.
  3. Enter your api_key.
  4. Enter your start_date.
  5. Change default base_url if self-hosted posthog instances is used
  6. Click Set up source.

Supported streams and sync modes

Rate limiting

Private GET, POST, PATCH, DELETE endpoints are rate limited. Public POST-only endpoints are not rate limited. A rule of thumb for whether rate limits apply is if the personal API key is used for authentication.

There are separate limits for different kinds of resources.

  • For all analytics endpoints (such as calculating insights, retrieving persons, or retrieving session recordings), the rate limits are 240/minute and 1200/hour.

  • The HogQL query endpoint (/api/project/:id/query) has a rate limit of 120/hour.

  • For the rest of the create, read, update, and delete endpoints, the rate limits are 480/minute and 4800/hour.

  • For Public POST-only endpoints like event capture (/capture) and feature flag evaluation (/decide), there are no rate limits.

These limits apply to the entire team (i.e. all users within your PostHog organization). For example, if a script requesting feature flag metadata hits the rate limit, and another user, using a different personal API key, makes a single request to the persons API, this gets rate limited as well.

For large or regular exports of events, use batch exports.

Want to use the PostHog API beyond these limits? Email Posthog at customers@posthog.com.

Reference

Config fields reference

Field
Type
Property name
string
start_date
string
api_key
string
base_url
integer
events_time_step

Changelog

Expand to review
VersionDatePull RequestSubject
1.1.72024-08-1744350Update dependencies
1.1.62024-08-1344016Fix events stream pagniator to workaround PostHog API issue #13508
1.1.52024-08-1043488Update dependencies
1.1.42024-08-0343232Update dependencies
1.1.32024-07-2742769Update dependencies
1.1.22024-07-2042151Update dependencies
1.1.12024-07-1341823Update dependencies
1.1.02024-06-2039763Add properties and uuid attributes to persons stream
1.0.02023-12-0428593Fix events.event type
0.1.152023-10-2831265Fix Events stream datetime format
0.1.142023-08-2929947Add optional field to spec: events_time_step
0.1.132023-07-1928461Fixed EventsSimpleRetriever declaration
0.1.122023-06-2827764Update following state breaking changes
0.1.112023-06-0927135Fix custom EventsSimpleRetriever
0.1.102023-04-1524084Increase events streams batch size
0.1.92023-02-1322906Specified date formatting in specification
0.1.82022-11-1118993connector migrated to low-code, added projects,insights streams, added project based slicing for all other streams
0.1.72022-07-2614585Add missing 'properties' field to event attributes
0.1.62022-01-208617Update connector fields title/description
0.1.52021-12-249082Remove obsolete session_events and insights streams
0.1.42021-09-146058Support self-hosted posthog instances
0.1.32021-07-204001Incremental streams read only relevant pages
0.1.22021-07-154692Use account information for checking the connection
0.1.12021-07-054539Add AIRBYTE_ENTRYPOINT env variable for kubernetes support
0.1.02021-06-083768Initial Release