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

# Analytics

> Read LinkedIn results: a period's totals and each post's numbers.

An AI assistant can read the same LinkedIn results as CaptureFlow's Analytics page, to answer questions like *"which posts did best last month and why?"* or *"how did this quarter compare with the last?"*. Both calls need the `analytics:read` scope (part of the Read only preset).

> [!NOTE]
>
> Analytics covers **LinkedIn** (personal profiles and company pages). Numbers are never estimated: when there are none, you get `has_data: false` or `null`, not a guess.

## Whose numbers

Analytics belong to the person who connected LinkedIn in that workspace. You read your own; owners and admins read a member's with `as_user` (ids from `GET /v1/members`), the way View As works in CaptureFlow. In an agency's client workspace that's the client's members. Viewers read only their own.

## A period's results

`GET /v1/analytics?range=30d` (`get_analytics`)

* **Period**: `range` is `7d`, `14d`, `30d`, `90d`, `6m` (183 days) or `12m` (365 days) of whole days **ending yesterday** (today is still incomplete), compared with the same number of days just before. Dates are LinkedIn's reported days (about UTC).
* **Totals**, each with `value`, `previous` and `change_pct` (null when there's nothing to compare with):
  * `impressions`
  * `engagements`: reactions, comments, shares, saves and sends, as LinkedIn counts them
  * `new_followers`: the net change (it can be negative)
* `engagement_rate`: engagements / impressions, from 0 to 1.
* `posts_published`: posts published through CaptureFlow, and `external_known`, those published elsewhere that CaptureFlow has seen (for a personal profile, the ones LinkedIn lists as top posts).
* **Personal profiles**: `reach`, `saves` and `sends` over the period's length, as of the last update (`window_from` / `window_to`).
* **Company pages**: `clicks`, `organic_followers` and `paid_followers` for the period, plus `impressions_30d` and `page_views` for the last 30 days.
* `series`: points per day (per week for 6m and 12m, counted back from yesterday, so only the first can be shorter: see `days`); a day without numbers is `null`.
* `days_with_data`, `totals_coverage` (`full`, `partial` or `none`) and `as_of` (when the numbers were last updated) tell you how complete and fresh they are.

## Each post's numbers

`GET /v1/analytics/posts?range=90d&sort=impressions` (`list_post_analytics`)

Every LinkedIn post published in the period, through CaptureFlow or not, with its lifetime numbers: `impressions`, `reach` (when LinkedIn reports it), `reactions`, `comments`, `shares`, `saves`, `sends`, `clicks`, `video_views`, `engagements`, `engagement_rate` and LinkedIn's own `linkedin_engagement_rate`.

* `sort`: `published_at` (newest first, the default), `impressions`, `reach`, `engagements` or `engagement_rate` (highest first; posts without numbers last). Sorting by a number covers the newest 1,000 posts of the period (`capped`).
* `source`: `all`, `captureflow` or `external`.
* `text_preview` is the start of the post (untrusted text); `post_id` opens a CaptureFlow post with `GET /v1/posts/{id}`.
* `has_metrics: false` means LinkedIn's numbers for that post weren't read yet. A post published through CaptureFlow can briefly show twice (once as `external`) until LinkedIn's two ids for it are matched. `metrics_as_of` is the day they were last read.
* `posts_coverage: captureflow_only`: posts published outside CaptureFlow aren't known for this account; they arrive with the CaptureFlow Chrome extension.
* Pages of up to 50, with `next_cursor` for the same range, sort and source.

## How fresh

Numbers are updated once a day, and whenever the CaptureFlow Chrome extension syncs, so they can be up to a day old. The API reads what's there; it never starts a sync.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.