> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hunch.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# PostHog

> Connect your PostHog account to Hunch

This guide will help you securely connect your PostHog account to Hunch in just a few minutes.

***

## ✅ What You'll Need

* PostHog Account
* PostHog Project ID
* PostHog Project Region
* PostHog API Key

***

## 1️⃣ Find Your Project ID and Region

1. Log into your [PostHog account](https://app.posthog.com)
2. In PostHog, click on **⚙️ Settings** > scroll down until you see **Project ID**
3. Copy the **Project ID**, and the **Project region**

{" "}

<img src="https://mintcdn.com/hunch-ac9ddd82/8-JWcEs7ZydEJuN2/public/images/posthog-integration/posthog-settings.png?fit=max&auto=format&n=8-JWcEs7ZydEJuN2&q=85&s=36f22521e6fdd8fab8453576213061ef" alt="PostHog Settings" className="w-full rounded-lg shadow-lg my-4" width="3464" height="2080" data-path="public/images/posthog-integration/posthog-settings.png" />

***

## 2️⃣ Create an API key in PostHog

2. In PostHog, click on **⚙️ Settings** > In the settings pane, click on **Personal API keys**

{" "}

<img src="https://mintcdn.com/hunch-ac9ddd82/8-JWcEs7ZydEJuN2/public/images/posthog-integration/posthog-settings-api-keys.png?fit=max&auto=format&n=8-JWcEs7ZydEJuN2&q=85&s=f3f855ef0ae91be1ac35d4934635097d" alt="PostHog Personal API Keys Settings" className="w-full rounded-lg shadow-lg my-4" width="3580" height="2080" data-path="public/images/posthog-integration/posthog-settings-api-keys.png" />

3. Click **Create new API key**

{" "}

<img src="https://mintcdn.com/hunch-ac9ddd82/8-JWcEs7ZydEJuN2/public/images/posthog-integration/posthog-create-api-key.png?fit=max&auto=format&n=8-JWcEs7ZydEJuN2&q=85&s=4e16d4b47441527171b2d6e4c09394a2" alt="PostHog Create API Key" className="w-full rounded-lg shadow-lg my-4" width="3580" height="2080" data-path="public/images/posthog-integration/posthog-create-api-key.png" />

4. Give your API key a descriptive name (e.g., "hunch-integration")
5. For **Organization & project access**, click on **Projects** > In the select box, choose the desired project you want Hunch to analyze

{" "}

<img src="https://mintcdn.com/hunch-ac9ddd82/8-JWcEs7ZydEJuN2/public/images/posthog-integration/posthog-api-key-form-top.png?fit=max&auto=format&n=8-JWcEs7ZydEJuN2&q=85&s=ff6dbf0aa490f963e7dcfbeac2340f63" alt="PostHog API Key Settings" className="w-full rounded-lg shadow-lg my-4" width="3580" height="2080" data-path="public/images/posthog-integration/posthog-api-key-form-top.png" />

6. From the available permissions, enable **Read** permissions to:

* **Query**
* **Property definition**
* **Event definition**

  <img src="https://mintcdn.com/hunch-ac9ddd82/8-JWcEs7ZydEJuN2/public/images/posthog-integration/posthog-api-key-form-bottom.png?fit=max&auto=format&n=8-JWcEs7ZydEJuN2&q=85&s=2b1e623987ace9e20d9e2f1b2ddb5f8c" alt="PostHog API Key Permissions" className="w-full rounded-lg shadow-lg my-4" width="3580" height="2080" data-path="public/images/posthog-integration/posthog-api-key-form-bottom.png" />

7. Click on **Create key** > Copy the generated API key and store it securely - **you won't be able to see it again!**

***

## 3️⃣ Connect PostHog to Hunch

1. Log into [Hunch.dev](https://app.hunch.dev/login)
2. Click on your organization name > **Connect Data**

<img src="https://mintcdn.com/hunch-ac9ddd82/8-JWcEs7ZydEJuN2/public/images/shared/platform-connect-data.png?fit=max&auto=format&n=8-JWcEs7ZydEJuN2&q=85&s=b99e941c687a6833d004f27f16613f71" alt="Platform Settings" className="w-full rounded-lg shadow-lg my-4" width="2856" height="1354" data-path="public/images/shared/platform-connect-data.png" />

3. Click **Configure** on the PostHog row

{" "}

<img src="https://mintcdn.com/hunch-ac9ddd82/8-JWcEs7ZydEJuN2/public/images/posthog-integration/posthog-platform-integration.png?fit=max&auto=format&n=8-JWcEs7ZydEJuN2&q=85&s=334e1b3d6b2b00b399843448b183f630" alt="PostHog Platform Integration" className="w-full rounded-lg shadow-lg my-4" width="3592" height="2070" data-path="public/images/posthog-integration/posthog-platform-integration.png" />

4. Fill the form with:
   * Project ID
   * Project Region
   * API Key

{" "}

<img src="https://mintcdn.com/hunch-ac9ddd82/8-JWcEs7ZydEJuN2/public/images/posthog-integration/posthog-platform-form.png?fit=max&auto=format&n=8-JWcEs7ZydEJuN2&q=85&s=998c306c25fce0cd06e22772425abdae" alt="PostHog Platform Form" className="w-full rounded-lg shadow-lg my-4" width="3592" height="2070" data-path="public/images/posthog-integration/posthog-platform-form.png" />

5. Click **Submit**

***

### 🎉 Done! You're now connected

Need help? Ping us at [support@hunch.dev](mailto:support@hunch.dev)

***

## 🔒 Security Note

> Hunch uses API keys to securely access your PostHog data. We recommend using a read-only API key for maximum security. Your API key is encrypted and stored securely in our system.
