Last updated
ChangelogInstagram API
HealthyRead-onlyPublic Instagram profiles and posts as JSON: follower and post counts, latest posts with captions, hashtags, likes, comments, views, images and video, plus a merged feed across creators. Generated from www.instagram.com.
/profiles/{username}/recent-posts5 credits per callRecent Posts
The newest posts of a public profile (Instagram shows at most the 6 newest without login): id, shortcode, url, type, caption, hashtags, mentions, likes, comments, video plays, publish time, cover image, video file and duration, size, location, owner with follower count, and every image/video of a carousel. Also the profile's total post count. Raises not found for an unknown account.
Authorization: Bearer <key> on every request.Parameters
Instagram username, with or without @
only posts of this kind: image, video or carousel (any kind when omitted)
order of the posts: recent (newest first), likes or comments (most first)
Response fields
usernamee.g."natgeo"posts_counte.g.32218counte.g.6posts
ide.g."4039253819871911016"shortcodee.g."DgOT_LDGtxo"urle.g."https://www.instagram.com/p/DgOT_LDGtxo/"typee.g."carousel"product_typecaptione.g."Eel reproduction was first photographed in the wild by National Geographic photographer @tonywu98, and he and his team have continued to document this secretive event by spending hundreds of hours submerged in the waters of Kagoshima. National Geographic’s Pictures of the Year 2026 includes these moray eels in the act of ejecting their gametes, a process that occurs in less than two seconds.\n\nNational Geographic photographers ventured to places far and wide to capture the year’s most fascinating images. Out of millions of photos, just 25 were selected as our Pictures of the Year. See them all at the link in bio."hashtagsmentionslike_counte.g.84983comment_counte.g.275view_counttaken_ate.g."2026-11-26T23:43:19.000Z"display_urle.g."https://scontent.cdninstagram.com/v/t51.82787-15/930382505_18723120067019133_7440139847351550069_n.jpg?stp=dst-jpg_e35_p1080x1080_sh2.08_tt6&_nc_cat=1&ig_cache_key=NDAzOTI1MjQ4NjY1MTkxOTQ4Mw%3D%3D.3-ccb7-5&ccb=7-5&_nc_sid=58cdad&efg=eyJ2ZW5jb2RlX3RhZyI6IkNBUk9VU0VMX0lURU0ueHBpZHMuMjA0OC5zZHIucmVndWxhcl9waG90by5DMyJ9&_nc_ohc=VogRwE_nH_4Q7kNvwEePunG&_nc_oc=Adp4QIYDL-KB5Jn5_rbWN0Ct0RhHqEmBHD_sZi88genX1GK9-jDUqGETvWiSm-ouPZw&_nc_zt=23&_nc_ht=scontent.cdninstagram.com&_nc_gid=Fdw29QrZDQfRLbdDQBmEPA&_nc_ss=79789&_nc_ct=RQosPBUIFQIlBAAAAA&oh=00_AQWqzC7PmJ5Fb9s2sKGvVw05nv5H01HQb-zRwwcj1_8DTA&oe=6B0F421D"video_urlvideo_durationwidthe.g.1080heighte.g.1350accessibility_captionis_paid_partnershipe.g.falselocationowner
ide.g."787132"usernamee.g."natgeo"is_verifiede.g.trueprofile_pic_urle.g."https://scontent.cdninstagram.com/v/t51.82787-19/683576066_18653628823019133_9051036240972105113_n.jpg?stp=dst-jpg_s150x150_tt6&_nc_cat=1&ig_cache_key=GAKLvih9nsRnYEVCAJlFVLiBvZt9bmNDAQAB1501500j-ccb7-5&ccb=7-5&_nc_sid=669407&efg=eyJ2ZW5jb2RlX3RhZyI6InByb2ZpbGVfcGljLnd3dy40MDAuQzMifQ%3D%3D&_nc_ohc=Fzq-SLmj7IoQ7kNvwGpGgyW&_nc_oc=AdoSMy3X79OMsDhxuGaGueLvYRgHskmAnnMjOhIp964NrFIS5KIhjVsiNvzJcx_on5M&_nc_zt=24&_nc_ht=scontent.cdninstagram.com&_nc_gid=Fdw29QrZDQfRLbdDQBmEPA&_nc_ss=79789&_nc_ct=RQosPBUCFQIAAAA&oh=00_AQWjvhxastkp47DrsN6I5eZUvvrxnymxJhyvmUrshCO-HQ&oe=6B0F1CEB"followers_counte.g.267196027media
ide.g."4039252486651919483"shortcodee.g."DgOTrxZADx7"typee.g."image"display_urle.g."https://scontent.cdninstagram.com/v/t51.82787-15/930382505_18723120067019133_7440139847351550069_n.jpg?stp=dst-jpg_e35_p1080x1080_sh2.08_tt6&_nc_cat=1&ig_cache_key=NDAzOTI1MjQ4NjY1MTkxOTQ4Mw%3D%3D.3-ccb7-5&ccb=7-5&_nc_sid=58cdad&efg=eyJ2ZW5jb2RlX3RhZyI6IkNBUk9VU0VMX0lURU0ueHBpZHMuMjA0OC5zZHIucmVndWxhcl9waG90by5DMyJ9&_nc_ohc=VogRwE_nH_4Q7kNvwEePunG&_nc_oc=Adp4QIYDL-KB5Jn5_rbWN0Ct0RhHqEmBHD_sZi88genX1GK9-jDUqGETvWiSm-ouPZw&_nc_zt=23&_nc_ht=scontent.cdninstagram.com&_nc_gid=Fdw29QrZDQfRLbdDQBmEPA&_nc_ss=79789&_nc_ct=RQosPBUIFQIlBAAAAA&oh=00_AQWqzC7PmJ5Fb9s2sKGvVw05nv5H01HQb-zRwwcj1_8DTA&oe=6B0F421D"video_urlwidthe.g.1080heighte.g.1350accessibility_captionpagination
counte.g.6has_moree.g.falsenext_cursorfetched_ate.g."2026-11-27T10:16:52.010Z"agee.g.0curl "https://api.maviapi.com/v1/sites/instagram/profiles/natgeo/recent-posts?sort=recent" \-H "Authorization: Bearer $MAVI_KEY"
{
"username": "natgeo",
"posts_count": 32218,
"count": 6,
"posts": [
{
"id": "4039253819871911016",
"shortcode": "DgOT_LDGtxo",
"url": "https://www.instagram.com/p/DgOT_LDGtxo/",
"type": "carousel",
"product_type": null,
"caption": "Eel reproduction was first photographed in the wild by National Geographic photographer @tonywu98, and he and his team have continued to document this secretive event by spending hundreds of hours submerged in the waters of Kagoshima. National Geographic’s Pictures of the Year 2026 includes these moray eels in the act of ejecting their gametes, a process that occurs in less than two seconds.\n\nNational Geographic photographers ventured to places far and wide to capture the year’s most fascinating images. Out of millions of photos, just 25 were selected as our Pictures of the Year. See them all at the link in bio.",
"hashtags": [
null
],
"mentions": [
"tonywu98"
],
"like_count": 84983,
"comment_count": 275,
"view_count": null,
"taken_at": "2026-11-26T23:43:19.000Z",
"display_url": "https://scontent.cdninstagram.com/v/t51.82787-15/930382505_18723120067019133_7440139847351550069_n.jpg?stp=dst-jpg_e35_p1080x1080_sh2.08_tt6&_nc_cat=1&ig_cache_key=NDAzOTI1MjQ4NjY1MTkxOTQ4Mw%3D%3D.3-ccb7-5&ccb=7-5&_nc_sid=58cdad&efg=eyJ2ZW5jb2RlX3RhZyI6IkNBUk9VU0VMX0lURU0ueHBpZHMuMjA0OC5zZHIucmVndWxhcl9waG90by5DMyJ9&_nc_ohc=VogRwE_nH_4Q7kNvwEePunG&_nc_oc=Adp4QIYDL-KB5Jn5_rbWN0Ct0RhHqEmBHD_sZi88genX1GK9-jDUqGETvWiSm-ouPZw&_nc_zt=23&_nc_ht=scontent.cdninstagram.com&_nc_gid=Fdw29QrZDQfRLbdDQBmEPA&_nc_ss=79789&_nc_ct=RQosPBUIFQIlBAAAAA&oh=00_AQWqzC7PmJ5Fb9s2sKGvVw05nv5H01HQb-zRwwcj1_8DTA&oe=6B0F421D",
"video_url": null,
"video_duration": null,
"width": 1080,
"height": 1350,
"accessibility_caption": null,
"is_paid_partnership": false,
"location": null,
"owner": {
"id": "787132",
"username": "natgeo",
"is_verified": true,
"profile_pic_url": "https://scontent.cdninstagram.com/v/t51.82787-19/683576066_18653628823019133_9051036240972105113_n.jpg?stp=dst-jpg_s150x150_tt6&_nc_cat=1&ig_cache_key=GAKLvih9nsRnYEVCAJlFVLiBvZt9bmNDAQAB1501500j-ccb7-5&ccb=7-5&_nc_sid=669407&efg=eyJ2ZW5jb2RlX3RhZyI6InByb2ZpbGVfcGljLnd3dy40MDAuQzMifQ%3D%3D&_nc_ohc=Fzq-SLmj7IoQ7kNvwGpGgyW&_nc_oc=AdoSMy3X79OMsDhxuGaGueLvYRgHskmAnnMjOhIp964NrFIS5KIhjVsiNvzJcx_on5M&_nc_zt=24&_nc_ht=scontent.cdninstagram.com&_nc_gid=Fdw29QrZDQfRLbdDQBmEPA&_nc_ss=79789&_nc_ct=RQosPBUCFQIAAAA&oh=00_AQWjvhxastkp47DrsN6I5eZUvvrxnymxJhyvmUrshCO-HQ&oe=6B0F1CEB",
"followers_count": 267196027
},
"media": [
{
"id": "4039252486651919483",
"shortcode": "DgOTrxZADx7",
"type": "image",
"display_url": "https://scontent.cdninstagram.com/v/t51.82787-15/930382505_18723120067019133_7440139847351550069_n.jpg?stp=dst-jpg_e35_p1080x1080_sh2.08_tt6&_nc_cat=1&ig_cache_key=NDAzOTI1MjQ4NjY1MTkxOTQ4Mw%3D%3D.3-ccb7-5&ccb=7-5&_nc_sid=58cdad&efg=eyJ2ZW5jb2RlX3RhZyI6IkNBUk9VU0VMX0lURU0ueHBpZHMuMjA0OC5zZHIucmVndWxhcl9waG90by5DMyJ9&_nc_ohc=VogRwE_nH_4Q7kNvwEePunG&_nc_oc=Adp4QIYDL-KB5Jn5_rbWN0Ct0RhHqEmBHD_sZi88genX1GK9-jDUqGETvWiSm-ouPZw&_nc_zt=23&_nc_ht=scontent.cdninstagram.com&_nc_gid=Fdw29QrZDQfRLbdDQBmEPA&_nc_ss=79789&_nc_ct=RQosPBUIFQIlBAAAAA&oh=00_AQWqzC7PmJ5Fb9s2sKGvVw05nv5H01HQb-zRwwcj1_8DTA&oe=6B0F421D",
"video_url": null,
"width": 1080,
"height": 1350,
"accessibility_caption": null
}
]
}
],
"pagination": {
"count": 6,
"has_more": false,
"next_cursor": null
},
"fetched_at": "2026-11-27T10:16:52.010Z",
"age": 0
}Get all the data, no code
Collect every page of GET /profiles/natgeo/recent-posts into a dataset, for one request or for a whole list of them, then download it as CSV or JSON. A page costs the same as one call of the endpoint; the download is free.
Use Instagram API from Claude, ChatGPT and your coding tools
Add this URL as a custom connector and sign in to maviapi. Nothing to install.
https://mcp.maviapi.com/mcpOr run it locally, with each endpoint of Instagram API as its own tool:
claude mcp add maviapi -e MAVIAPI_TOOLS=instagram -- npx -y '@maviapi/mcp'Import Instagram API into Postman and other tools
How to importPaste a link into Postman, Insomnia, an agent framework or a no-code tool to get every endpoint with its parameters and response fields. The link always serves the current endpoints, so importing it again picks up new ones.
- OpenAPI 3.1
https://api.maviapi.com/v1/apis/instagram/openapi.json - Postman
https://api.maviapi.com/v1/apis/instagram/postman.json
The Postman collection sends the shared demo key until you put your own key in its maviapi_key variable.
Build with the Instagram API
Choose a starting endpoint
- Recent Posts
GET /profiles/{username}/recent-postsThe newest posts of a public profile (Instagram shows at most the 6 newest without login): id, shortcode, url, type, caption, hashtags, mentions, likes, comments, video plays, publish time, cover image, video file and duration, size, location, owner with follower count, and every image/video of a carousel. Also the profile's total post count. Raises not found for an unknown account.
Parameters and response fields for GET /profiles/{username}/recent-posts
Request parameters Name Type / location Required Description username string / path Yes Instagram username, with or without @ type string / query No only posts of this kind: image, video or carousel (any kind when omitted) sort string / query No order of the posts: recent (newest first), likes or comments (most first) Allowed values: recent, likes, comments. Response fields Field Type Description username string posts_count integer count integer posts object[] posts[].id string posts[].shortcode string posts[].url string posts[].type string posts[].product_type null posts[].caption string posts[].hashtags string[] posts[].mentions string[] posts[].like_count integer posts[].comment_count integer posts[].view_count null posts[].taken_at string posts[].display_url string posts[].video_url null posts[].video_duration null posts[].width integer posts[].height integer posts[].accessibility_caption null posts[].is_paid_partnership boolean posts[].location null posts[].owner object posts[].owner.id string posts[].owner.username string posts[].owner.is_verified boolean posts[].owner.profile_pic_url string posts[].owner.followers_count integer posts[].media object[] posts[].media[].id string posts[].media[].shortcode string posts[].media[].type string posts[].media[].display_url string posts[].media[].video_url null posts[].media[].width integer posts[].media[].height integer posts[].media[].accessibility_caption null pagination object pagination.count integer pagination.has_more boolean pagination.next_cursor null fetched_at string age integer - Feed
GET /feedOne merged feed of the newest posts (up to 6 each) of up to 5 public profiles, each post with caption, hashtags, mentions, likes, comments, video plays, time, images/video and its creator's follower count; plus one line per profile (name, followers, verification, posts in the feed). A profile that cannot be found is listed with error "not_found" ("unavailable" when private or not loadable) instead of failing the feed.
Parameters and response fields for GET /feed
Request parameters Name Type / location Required Description usernames string / query No comma-separated Instagram usernames, 1 to 5 (e.g. natgeo,nasa) sort string / query No order of the posts: recent (newest first), likes or comments (most first) Allowed values: recent, likes, comments. type string / query No only posts of this kind: image, video or carousel (any kind when omitted) Response fields Field Type Description sort string type null profiles object[] profiles[].username string profiles[].full_name string profiles[].followers_count integer profiles[].is_verified boolean profiles[].posts integer profiles[].error null count integer posts object[] posts[].id string posts[].shortcode string posts[].url string posts[].type string posts[].product_type null posts[].caption string posts[].hashtags string[] posts[].mentions string[] posts[].like_count integer posts[].comment_count integer posts[].view_count null posts[].taken_at string posts[].display_url string posts[].video_url null posts[].video_duration null posts[].width integer posts[].height integer posts[].accessibility_caption null posts[].is_paid_partnership boolean posts[].location null posts[].owner object posts[].owner.id string posts[].owner.username string posts[].owner.is_verified boolean posts[].owner.profile_pic_url string posts[].owner.followers_count integer posts[].media object[] posts[].media[].id string posts[].media[].shortcode string posts[].media[].type string posts[].media[].display_url string posts[].media[].video_url null posts[].media[].width integer posts[].media[].height integer posts[].media[].accessibility_caption null fetched_at string age integer - Profile
GET /profiles/{username}A public Instagram profile: id, name, verification, follower and post counts, avatar, whether a story is live, pronouns, and its 6 newest posts (type, likes, comments, time, cover image). Raises not found for an account that does not exist.
Parameters and response fields for GET /profiles/{username}
Request parameters Name Type / location Required Description username string / path Yes Instagram username, with or without @ (a profile URL works too) Response fields Field Type Description id string username string full_name string is_verified boolean profile_pic_url string followers_count integer posts_count integer has_public_story boolean pronouns string[] url string recent_posts object[] recent_posts[].shortcode string recent_posts[].url string recent_posts[].type string recent_posts[].like_count integer recent_posts[].comment_count integer recent_posts[].taken_at string recent_posts[].display_url string pagination object pagination.count integer pagination.has_more boolean pagination.next_cursor null fetched_at string age integer - Post
GET /posts/{shortcode}One public post or reel: id, type, reel flag, caption, hashtags, mentions, likes, comments, video plays, upload time, cover image, video file and duration, size, location, the author with follower count (rounded, e.g. 267000000, on single-image posts), and every image/video of a carousel. Raises not found for a post that does not exist or is not public.
Parameters and response fields for GET /posts/{shortcode}
Request parameters Name Type / location Required Description shortcode string / path Yes post shortcode, the id in instagram.com/p/<shortcode>/ (a full post or reel URL works too) Response fields Field Type Description id string shortcode string url string type string product_type null caption string hashtags string[] mentions string[] like_count integer comment_count integer view_count null taken_at string display_url string video_url null video_duration null width integer height integer accessibility_caption string is_paid_partnership null location null owner object owner.id string owner.username string owner.is_verified boolean owner.profile_pic_url string owner.followers_count integer media object[] media[].id string media[].shortcode string media[].type string media[].display_url string media[].video_url null media[].width integer media[].height integer pagination object pagination.count integer pagination.has_more boolean pagination.next_cursor null fetched_at string age integer
Export Instagram data to CSV
Each list below downloads as a CSV file with one row per record. Collect it into a dataset with "Get all the data, no code" under the console above. The dataset reads the list page by page, and you download it as CSV, JSON or JSONL.
| List | CSV columns |
|---|---|
Recent PostsGET /profiles/{username}/recent-posts | id, shortcode, url, type, product_type, caption, hashtags, mentions, like_count, comment_count, view_count, taken_at, display_url, video_url, video_duration, width, height, accessibility_caption, is_paid_partnership, location, owner, media |
ProfileGET /profiles/{username} | shortcode, url, type, like_count, comment_count, taken_at, display_url |
PostGET /posts/{shortcode} | id, shortcode, type, display_url, video_url, width, height |
A nested value (a list or an object) is written as JSON in one cell. How datasets and exports work
Instagram API questions
What you get, what it costs and how to call it.
Is there an official Instagram API?
Yes. Meta offers the Instagram Platform, a collection of APIs that let an app access data for Instagram professional (business and creator) accounts. Source: Instagram Platform (checked 2026-11-25). This Instagram API is a separate, unofficial one: an independent, hosted API from maviapi for the public data on instagram.com. It is not made, endorsed or supported by Instagram.
What data can I get from the Instagram API?
The Instagram API has 4 endpoints. Each returns JSON with the parameters and fields documented above:
- GET
/profiles/{username}/recent-posts: The newest posts of a public profile (Instagram shows at most the 6 newest without login): id, shortcode, url, type, caption, hashtags, mentions, likes… - GET
/feed: One merged feed of the newest posts (up to 6 each) of up to 5 public profiles, each post with caption, hashtags, mentions, likes, comments, video plays, time… - GET
/profiles/{username}: A public Instagram profile: id, name, verification, follower and post counts, avatar, whether a story is live, pronouns, and its 6 newest posts (type, likes… - GET
/posts/{shortcode}: One public post or reel: id, type, reel flag, caption, hashtags, mentions, likes, comments, video plays, upload time, cover image, video file and duration…
How much does the Instagram API cost?
Calls are paid in credits from your maviapi plan, and only successful calls are charged. Every endpoint of this API costs 5 credits per call. On the Hobby plan ($49 a month for 250,000 credits), 1,000 calls cost about $0.98. Failed calls are free. The Free plan gives you 1,000 credits a month, with no credit card required. See plans and credit prices for everything after that.
How do I call the Instagram API?
Send an HTTPS request to the endpoint with your API key in the Authorization header. For example, GET /profiles/{username}/recent-posts:
curl 'https://api.maviapi.com/v1/sites/instagram/profiles/natgeo/recent-posts' \
-H "Authorization: Bearer $MAVI_KEY"Create a key on your API keys page, or try any endpoint first in the console above with the free test key.
What are the ways to get Instagram data as JSON?
Each way to get Instagram data as JSON fits a different need:
- Instagram Platform: Meta offers the Instagram Platform, a collection of APIs that let an app access data for Instagram professional (business and creator) accounts. Better when you need write access, account data or an agreement with Instagram.
- Your own scraper: Full control and no vendor, but the parsing, the blocked requests and the repairs after every change on instagram.com are yours. Better for a one-off pull from a page that rarely changes.
- Apify: A marketplace of Actors you run, where input, output and price are set by each Actor. Better when an Actor already returns what you need, or you want to host your own code. See maviapi vs Apify.
- RapidAPI: A hub of APIs added by many providers, called with one RapidAPI key and priced per API. Better when you already use the hub and one of its APIs covers what you need. Source: RapidAPI docs.
- maviapi: The Instagram API on this page: 4 documented endpoints, a published response schema and one key for the whole catalog. Better when this data is part of your product and you do not want to maintain a scraper.
What happens when instagram.com changes its layout?
Your code does not change. maviapi keeps the Instagram API working when instagram.com changes its pages, so you keep calling the same endpoints and get JSON in the shape documented here. See its current health on the status page and what changed in its changelog.
Will an update break my Instagram API integration?
No. An endpoint you use never changes shape: new fields, optional parameters and endpoints are added beside it, and a change that would break a call ships as a new endpoint. Ignore response fields you do not know, and follow the changelog for what is new.
Related APIs
- YouTube API
YouTube data as JSON: search videos, shorts, channels and playlists, video details and comments, channel profiles and…
- Tripadvisor API
Trip-planning data from Tripadvisor: geo search plus attractions, restaurants and hotels by location (geo_id), with…
- Google Maps API
Structured data from maps.google.com.