# Instagram shares in the PubNio analytics API

PubNio's Instagram `shares` is Meta's `shares` count. When Meta also returns `reposts`, that number rides along in `breakdown.reposts` but is not added in. If a post returns only `reposts`, that becomes the value. Capabilities describe the source as `shares+reposts`; the read does not sum them.

## What PubNio returns

| Metric | Scope | Instagram field | Unit | Combines by |
| --- | --- | --- | --- | --- |
| `shares` | post | `shares`, else `reposts` when `shares` is absent; never the sum of the two | count | sum |
| `shares` | account | not returned: `not_exposed` | count | sum |
| `comments` | post | `comments` (feed posts, carousels, Reels); `replies` (Stories) | count | sum |
| `comments` | account | not returned: `not_exposed` | count | sum |

`shares`: Shares, reposts, quotes, or retweets.

`comments`: Comments, replies, or comment-like responses.

## How PubNio reads it

- Comments follow the same pattern: feed posts, carousels, and Reels ask for `comments`, Stories ask for `replies`, and whichever is present becomes `comments`. Capabilities call that source `comments+replies`.
- Account-level shares and comments are unsupported (`not_exposed`).

## Example

The capabilities endpoint answers without calling Instagram. Under the Instagram provider, these are its entries for `shares`.

```http
GET /api/v1/workspaces/4e5f6a7b-8c9d-4e0f-9a1b-2c3d4e5f6a7b/analytics/capabilities
Authorization: Bearer pn_live_***
```

```json
[
  {
    "key": "shares",
    "scope": "post",
    "granularity": "day",
    "unit": "count",
    "aggregation": "sum",
    "availability": "available",
    "supported": true,
    "renamedFrom": "shares+reposts"
  },
  {
    "key": "shares",
    "scope": "account",
    "granularity": "day",
    "unit": "count",
    "aggregation": "sum",
    "availability": "unsupported",
    "supported": false,
    "reason": "not_exposed"
  }
]
```

## Limits

- PubNio stops re-reading an Instagram post 90 days after it is published, so a post's `shares` stops changing then.
- A metric Instagram does not report comes back with `value: null` and an availability state that says why. A post with no stored values whose last read failed on permissions, a rate limit, or a transient error answers with that error instead.

## Related

- [Instagram analytics API: the metrics PubNio reads](https://pubnio.com/platforms/instagram/analytics)
- [Instagram OAuth scopes](https://pubnio.com/docs/providers/instagram/scopes/)
- [API reference: analytics capabilities](https://pubnio.com/docs/reference/analytics-capabilities-get/)

