# Instagram post & reel metrics API

Fetch the public metrics and available caption or media metadata for a single Instagram post or reel URL. Use it to inspect a particular post after discovering it in a profile feed.

Canonical: https://fetchfox.net/docs/instagram-post-stats-api

## Request

GET /instagram/stats (query parameters) or POST /instagram/stats (JSON). Authenticate with x-access-key. Keep keys server-side.

Credits: 1 credit per successful post lookup.

### curl

```
curl --fail-with-body --get 'https://api.fetchfox.net/instagram/stats' \
  -H 'x-access-key: YOUR_KEY' \
  --data-urlencode 'url=https://www.instagram.com/p/POST_ID/'
```

### JavaScript

```
// Run on your server with FETCHFOX_API_KEY set.
const url = new URL('https://api.fetchfox.net/instagram/stats');
url.searchParams.set('url', 'https://www.instagram.com/p/POST_ID/');
const response = await fetch(url, {
  headers: { 'x-access-key': process.env.FETCHFOX_API_KEY },
  signal: AbortSignal.timeout(130000)
});
if (!response.ok) throw new Error('HTTP ' + response.status);
const result = await response.json();
if (!result.success) throw new Error('Request unsuccessful');
console.log(result.data);
```

### Python

```
import json, os
from urllib.parse import urlencode
from urllib.request import Request, urlopen

query = urlencode({"url":"https://www.instagram.com/p/POST_ID/"})
request = Request('https://api.fetchfox.net/instagram/stats?' + query,
    headers={'x-access-key': os.environ['FETCHFOX_API_KEY']})
with urlopen(request, timeout=130) as response:
    result = json.load(response)
if not result.get('success'):
    raise RuntimeError('Request unsuccessful')
print(result['data'])
```

## Optional views versus required views

By default, requireViews is false. The API can return available media and metrics even if verified video views are unavailable; unavailable views remain null. Image and carousel view counts are also null because that metric is not applicable. Null is not a zero-view count.

Set requireViews=true only when a verified video view count is essential. If strict recovery cannot find a verified count, the request returns HTTP 503 without a processing charge. Operational rate and daily safety limits still apply.

## Record one observation per request

Save the original post URL, retrieval time, and returned metrics together. Public metrics can change between reads. Build historical comparisons from your own snapshots rather than treating one response as a time series.

## Read the comments behind the count

A public comment count is not the comment text. Use the separate comments endpoint or browser viewer to retrieve an available comment batch.

[Open the Instagram comments viewer](https://fetchfox.net/tools/instagram-comments-viewer)

[Export Instagram comments to CSV and Excel](https://fetchfox.net/guides/export-instagram-comments-csv)

## Related pages

- https://fetchfox.net/docs/instagram-posts-api

- https://fetchfox.net/docs/instagram-reels-api

- https://fetchfox.net/guides/instagram-creator-research

