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

# Post Analytics

> Retrieve all current analytics for a published post in one call

### Endpoint

```http theme={null}
GET https://api.joinoverlap.com/post-analytics?companyId={companyId}&postId={postId}
```

One call returns everything Overlap currently knows about a published post's performance: the post's identity, the normalized counters (views, likes, comments, shares, engagement score), and the platform's own advanced metrics from the latest refresh — the same data behind the post analytics page in the Overlap dashboard.

Find `postId`s with [`GET /posts`](/api-reference/posts).

### Authentication

```http theme={null}
Authorization: Bearer YOUR_API_KEY
```

## Query Parameters

| Parameter   | Required | Description                                      |
| ----------- | -------- | ------------------------------------------------ |
| `companyId` | Yes      | Your Overlap company or organization identifier. |
| `postId`    | Yes      | The post id from `GET /posts`.                   |

<Info>
  The same lookup is also available at `GET /companies/{companyId}/posts/{postId}/analytics`.
</Info>

<RequestExample>
  ```bash cURL theme={null}
  curl "https://api.joinoverlap.com/post-analytics?companyId=YOUR_COMPANY_ID&postId=POST_ID" \
    -H "Authorization: Bearer YOUR_API_KEY"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://api.joinoverlap.com/post-analytics?companyId=YOUR_COMPANY_ID&postId=POST_ID',
    { headers: { Authorization: 'Bearer YOUR_API_KEY' } }
  );
  const { post, analytics } = await response.json();
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      "https://api.joinoverlap.com/post-analytics",
      params={"companyId": "YOUR_COMPANY_ID", "postId": "POST_ID"},
      headers={"Authorization": "Bearer YOUR_API_KEY"},
  )
  data = response.json()
  print(data["analytics"]["views"], data["analytics"]["likes"])
  ```
</RequestExample>

## Response

```json theme={null}
{
  "post": {
    "id": "uV9LKKuVU2IiRcwv7UvY",
    "platform": "youtube",
    "text": "Top agent Jarred Arfa and promoter Danny Hayes say fans finally figured out the game...",
    "postUrl": "https://youtu.be/3j6-UUMa6WE",
    "nativeId": "3j6-UUMa6WE",
    "clipId": "6dd94ba0-908c-4489-897f-4bc02fe96650",
    "status": "success",
    "mediaUrl": "https://.../exported-6dd94ba0.mp4",
    "thumbnailUrl": "https://.../thumb.jpg",
    "createdAt": "2026-07-10T19:31:30+00:00"
  },
  "analytics": {
    "views": 969,
    "likes": 9,
    "comments": 0,
    "shares": 0,
    "engagementScore": 27.69,
    "growthRate": 9.1,
    "lastAnalyticsUpdate": "2026-07-10T23:10:31+00:00",
    "platformMetrics": {
      "youtube": {
        "analytics": {
          "viewCount": 969,
          "likeCount": 9,
          "averageViewDuration": 21,
          "estimatedMinutesWatched": 346,
          "subscribersGained": 1
        }
      }
    }
  }
}
```

Field definitions live in the [Analytics Model reference](/api-reference/analytics-model).

<Info>
  `analytics.platformMetrics` carries the platform's own advanced metrics from
  the most recent refresh — whatever the platform reports (e.g. YouTube
  `averageViewDuration` / `estimatedMinutesWatched`, TikTok watch time and
  retention, Facebook impression breakdowns, X organic metrics). Its shape
  mirrors the platform's analytics API and may change without notice; the
  normalized counters above are the stable contract.
</Info>

## Data freshness

Overlap refreshes post analytics from the social platforms on a rolling schedule: new posts are refreshed frequently in their first days, then roughly every 6 hours. `analytics.lastAnalyticsUpdate` tells you when the data was last refreshed.

Platform caveats to be aware of:

* **YouTube** analytics lag roughly 48 hours behind real time.
* **X (Twitter)** exposes detailed metrics only for 30 days after posting; older posts stop receiving updates.
* **Bluesky** does not report per-post view counts, so `views` stays `0` there.
* Watch-time and other advanced fields in `platformMetrics` are only present on platforms that report them.

<CardGroup cols={2}>
  <Card title="List Posts" icon="list" href="/api-reference/posts">
    Discover post ids and browse rolled-up metrics.
  </Card>

  <Card title="Analytics Model" icon="table" href="/api-reference/analytics-model">
    Field-by-field response reference.
  </Card>
</CardGroup>
