Instagram Graph API: Get Posts, Fields, and Pagination
To get posts with the Instagram Graph API, call GET /{ig-user-id}/media with a fields list such as caption, media_type, media_url, permalink, and timestamp, then follow the paging cursors. It returns up to the 10,000 most recent posts of a professional account that authorized your app. Carousel items come from the children edge. Adeli lists posts from every connected account through one endpoint.
To get posts with the Instagram Graph API, send GET /{ig-user-id}/media with the fields you want, then follow the paging cursors until there are no more pages. Each item is an IG Media object with a caption, a media type, a media URL, a permalink, and a timestamp. Carousels need one extra call to their children edge.
Whose posts you can read is the limit. The endpoint only works for a professional account that authorized your app, which matters if you're building a product where your customers connect their own Instagram accounts. For the bigger picture, start with our Instagram API guide.
Which Instagram accounts can you get posts from?
The Instagram Graph API returns posts from Instagram professional accounts (Business or Creator) that granted your app access. Three cases cover almost every "get posts by user" request:
| Whose posts | How to read them | What you get |
|---|---|---|
| An account that authorized your app | GET /{ig-user-id}/media |
Every field below, up to the 10,000 most recent posts |
| Another Business or Creator account | business_discovery on your own IG user, by username |
Public fields of that account's media |
| A personal account, or any arbitrary public post | Not possible | Nothing |
Business discovery is covered in our Instagram followers count guide, which uses the same call. Meta shut down the old consumer API that read personal accounts. As Shravya Garlapati wrote on the Meta for Developers blog on September 4, 2024:
"Starting on December 4th, 2024, Instagram Basic Display API will no longer be available."
For you, that means "get public posts" has no official answer for personal accounts. Tools that claim otherwise scrape Instagram outside the official API.
Instagram Login or Facebook Login: which do you need to get posts?
Both versions of the Instagram API can read an account's own posts; they differ in host, token, and permissions. Pick Instagram Login unless you also need business discovery or hashtag search, which Meta documents for Facebook Login.
| Instagram API with Instagram Login | Instagram API with Facebook Login | |
|---|---|---|
| Host | graph.instagram.com |
graph.facebook.com |
| Token | Instagram User access token | Facebook User access token |
| Permission to read media | instagram_business_basic |
instagram_basic plus pages_read_engagement |
| Facebook Page needed | No | Yes, linked to the Instagram account |
| Business discovery | Not documented | Yes |
Source: Meta's IG Media reference. With Facebook Login, a user who got their Page role through Business Manager also needs ads_management or ads_read. Our Instagram API permissions post lists every scope and how Meta reviews it.
How to get all posts from an Instagram user
Call the media edge on the IG user ID with a fields parameter. Without fields, Meta returns only each post's id. With Instagram Login:
curl -G "https://graph.instagram.com/v26.0/<IG_USER_ID>/media" \
-H "Authorization: Bearer $IG_ACCESS_TOKEN" \
--data-urlencode "fields=id,caption,media_type,media_url,thumbnail_url,permalink,timestamp,like_count,comments_count"The response puts posts in data and cursors in paging:
{
"data": [
{
"id": "17895695668004550",
"caption": "New drop this Friday",
"media_type": "CAROUSEL_ALBUM",
"media_url": "https://scontent.cdninstagram.com/...",
"permalink": "https://www.instagram.com/p/.../",
"timestamp": "2026-10-20T15:04:11+0000",
"like_count": 120,
"comments_count": 8
}
],
"paging": {
"cursors": { "before": "QVFIU...", "after": "QVFIU..." },
"next": "https://graph.instagram.com/v26.0/<IG_USER_ID>/media?after=QVFIU..."
}
}To get all posts, request the next URL until the response has no next. Meta's media edge reference caps the edge at the 10,000 most recently created posts, so very old posts on a large account are out of reach.
For a time window, the edge also supports time-based pagination: add since and until as Unix timestamps. A sync job that asks only for posts since its last run makes far fewer calls.
Which post data can you request?
IG Media fields cover the post itself, its engagement counts, and where it was published. These are the ones most products need, per Meta's IG Media reference:
| Field | What it returns | Watch out for |
|---|---|---|
caption |
The caption text | Not set on carousel children |
media_type |
IMAGE, VIDEO, or CAROUSEL_ALBUM |
Reels come back as VIDEO |
media_product_type |
FEED, STORY, REELS, or AD |
Tells a Reel apart from a feed video |
media_url |
The image or video file | Omitted for video with copyrighted or licensed audio |
thumbnail_url |
A cover image | VIDEO only |
permalink |
The post's public URL | Not available on carousel children |
timestamp |
Creation time, ISO 8601 in UTC | |
like_count |
Likes | Omitted when the owner hides like counts |
comments_count |
Comments, including replies | |
shortcode, username, alt_text |
Identifiers and accessibility text |
Treat media_url as optional. Meta also omits it for Reels whose owner turned off downloads when you read someone else's media. Fall back to thumbnail_url or permalink in your UI. For reach, views, and saves, you need the insights edge, covered in our Instagram insights API guide.
How do you get the images in a carousel post?
Ask for the children edge, either nested in the media request or on the carousel's own ID. A carousel's top-level media_type is CAROUSEL_ALBUM, and its media_url is only the first item. Field expansion gets every item in one call:
curl -G "https://graph.instagram.com/v26.0/<IG_USER_ID>/media" \
-H "Authorization: Bearer $IG_ACCESS_TOKEN" \
--data-urlencode "fields=id,media_type,permalink,children{id,media_type,media_url,thumbnail_url}"Children carry their own media_type and media_url, but no caption, no permalink, and no like or comment counts. Those live on the parent. Our Instagram carousel API post covers the publishing side.
What are the limits when you get Instagram posts?
The media edge has a few hard limits beyond the general Graph API call budget.
- 10,000 posts. The edge returns the most recent 10,000 posts and no older ones.
- No Stories. Stories aren't returned by
/media. UseGET /{ig-user-id}/storieswhile they are live. - Live video. Meta's reference says live video media is readable only while it's being broadcast.
- Professional accounts only. Meta's IG Media reference says data is returned only for professional accounts.
- Call limits. Every read counts toward the app's rate limit for that account. Our Instagram API rate limit guide has the formula and the error codes.
Polling every account every few minutes is the fastest way to hit the rate limit. Use since to fetch only new posts, and use webhooks for comments rather than re-reading media to find them.
How do you get Instagram posts for every customer with Adeli?
Adeli's List posts endpoint, GET /api/v1/posts, returns posts from every Instagram account connected to one of your user profiles, newest first. Adeli holds the Meta developer app, carried Meta's review, and refreshes every connected account's tokens, so your code holds one API key:
curl -G "https://app.tryadeli.com/api/v1/posts" \
-H "Authorization: Bearer $ADELI_API_KEY" \
--data-urlencode "profileId=00000000-0000-4000-8000-000000000001" \
--data-urlencode "platform=instagram"What changes compared with calling Meta directly:
- One shape for every network. Each post comes back with
caption,media,permalink,engagement(likes and comments), andpublishedAt, the same shape as TikTok, YouTube, Facebook, and Bluesky posts. - No cursors to manage. Adeli follows Instagram's pagination internally.
- Your users' own accounts. Each of your users connects their own Instagram account through Adeli's hosted connect flow.
If you're building analytics into a product, the social media analytics API page shows the rest of the read endpoints, and Instagram on Adeli covers publishing. Your first 2 user profiles are free on pricing.