Get Instagram Public data with one API
The Instagram API returns public Instagram data — profiles, posts, reels and hashtags — as clean JSON.
10 active endpoints. Every call is 1 credit.
- POST/instagram/v1/profile
- POST/instagram/v1/posts
- POST/instagram/v1/reels
- POST/instagram/v1/similar_accounts
- POST/instagram/v1/search
- POST/instagram/v1/users_search
- POST/instagram/v1/hashtag_search
- +3 more
What Instagram Public Data endpoints does ReefAPI ship?
10 live read endpoints. Read-only data API: no writes, no account actions, no dashboard access on the target site.
Instagram Public Data API
3 of 10 endpoints, ready to run
public profile facts and first-page recent posts.
{ "ok": true, "meta": { "api": "instagram", "endpoint": "profile", "mode": "live", "latency_ms": 3336, "record_count": 1, "cache_hit": false }, "data": { "biography": "Just Do It.", "bio_links": [ { "url": "http://empli.fi/nike", "link_type": "external" } ], "pronouns": [], "follower_count": 291393115, "following_count": 264, "post_count": 1670, "is_verified": true, "is_private": false, "is_business": false, "bio_mentions": [], "bio_hashtags": [], "profile_pic": "https://scontent-lga3-2.cdninstagram.com/v/t51.82787-19/551608484_18567162979020081_1135468084872726555_n.jpg?efg=eyJ2ZW5jb2RlX3RhZyI6InByb2ZpbGVfcGljLmRqYW5nby4zOTkuYzIifQ&_nc_ht=scontent-lga3-2.cdninstagram.com&_nc_cat=1&_nc_oc=Q6cZ2gEcpNEAo8gckPyPTthKBU8r41X-iRegzuarlDD28lRmwkKkzqJ_0lRiYpa75LF7Lfo&_nc_ohc=z1UGMiUiRjQQ7kNvwEhTIfv&_nc_gid=x97CaF1q6jM03CNxp29Yrw&edm=ALGbJPMBAAAA&ccb=7-5&oh=00_AQF6rCUwBezAvV1md8d1u8pQHSp8F0CuCETSdhP8aOYOvA&oe=6A96603A&_nc_sid=7d3ac5", "external_url": "http://empli.fi/nike", "user_id": "13460080", "fbid": "17841400602400210", "is_regulated_c18": false, "recent_posts": [ { "media_id": "3973168148123211095", "shortcode": "Dcjh2FFx9VX", "media_type": "video", "display_url": "https://scontent-fra3-2.cdninstagram.com/v/t51.82787-15/788562814_18658305418020081_8049223232898323984_n.jpg?stp=dst-jpg_e15_tt6&_nc_ht=scontent-fra3-2.cdninstagram.com&_nc_cat=1&_nc_oc=Q6cZ2gGWOzswKyYp9C8OKJ_ALjjKxBgNpy05jxoFrf7N_ekCx7ejj2rweTBkv1xKJ8e6Da0&_nc_ohc=5-xyYufZkC8Q7kNvwEd0VIs&_nc_gid=27lbe1hlvEWjoKzE8BgaxA&edm=APU89FABAAAA&ccb=7-5&oh=00_AQHB3V9Mpei-nO0sShz5Pm2Iwyyjrn3SMtm5zergGAeH3g&oe=6A96631B&_nc_sid=bc0c2c", "caption": "New record just dropped.\n\nThe 100M hurdles World Record belongs to @masai_russell. And it’s flying off the shelves.", "like_count": 5995, "comment_count": 184, "taken_at_timestamp": 1787858651, "is_video": true, "video_view_count": 66803, "dimensions": { "height": 1921, "width": 1080 }, "tagged_users": [ { "user_id": "286654768", "is_verified": true, "x": 0, "y": 0 }, { "user_id": "29999202", "is_verified": true, "x": 0, "y": 0 }, { "user_id": "604164382", "is_verified": true, "x": 0, "y": 0 } ], "coauthor_producers": [ { "user_id": "286654768", "is_verified": true } ] }, { "media_id": "3969188148291564527", "shortcode": "DcVY5dZm_Pv", "media_type": "carousel", "display_url": "https://scontent-fra5-2.cdninstagram.com/v/t51.82787-15/784252020_18656598970020081_4373176743203571146_n.jpg?stp=dst-jpg_e35_p1080x1080_sh2.08_tt6&_nc_ht=scontent-fra5-2.cdninstagram.com&_nc_cat=109&_nc_oc=Q6cZ2gGWOzswKyYp9C8OKJ_ALjjKxBgNpy05jxoFrf7N_ekCx7ejj2rweTBkv1xKJ8e6Da0&_nc_ohc=QJuDELkB5X0Q7kNvwErvoVM&_nc_gid=27lbe1hlvEWjoKzE8BgaxA&edm=APU89FABAAAA&ccb=7-5&oh=00_AQEKObTdY_c8swVYXVRS2BrHJjXxQAdFiJpP77ZcVPD7RQ&oe=6A9696D0&_nc_sid=bc0c2c", "caption": "The most powerful muscle is the one above your shoulders. \n\n@bokrugby play a game they keep reinventing. \n\nFour tests. Everything on the line.", "like_count": 80669, "comment_count": 390, "taken_at_timestamp": 1787384120, "is_video": false, "dimensions": { "height": 1440, "width": 1080 }, "carousel_media": [ { "media_id": "3969183624779469085", "is_video": false, "display_url": "https://scontent-fra5-2.cdninstagram.com/v/t51.82787-15/784252020_18656598970020081_4373176743203571146_n.jpg?stp=dst-jpg_e35_p1080x1080_sh2.08_tt6&_nc_ht=scontent-fra5-2.cdninstagram.com&_nc_cat=109&_nc_oc=Q6cZ2gGWOzswKyYp9C8OKJ_ALjjKxBgNpy05jxoFrf7N_ekCx7ejj2rweTBkv1xKJ8e6Da0&_nc_ohc=QJuDELkB5X0Q7kNvwErvoVM&_nc_gid=27lbe1hlvEWjoKzE8BgaxA&edm=APU89FABAAAA&ccb=7-5&oh=00_AQEKObTdY_c8swVYXVRS2BrHJjXxQAdFiJpP77ZcVPD7RQ&oe=6A9696D0&_nc_sid=bc0c2c", "dimensions": { "height": 1440, "width": 1080 }, "tagged_users": [] }, { "media_id": "3969183627086306164", "is_video": false, "display_url": "https://scontent-fra5-2.cdninstagram.com/v/t51.82787-15/781053459_18656598985020081_9102968515559776644_n.jpg?stp=dst-jpg_e35_p1080x1080_sh2.08_tt6&_nc_ht=scontent-fra5-2.cdninstagram.com&_nc_cat=109&_nc_oc=Q6cZ2gGWOzswKyYp9C8OKJ_ALjjKxBgNpy05jxoFrf7N_ekCx7ejj2rweTBkv1xKJ8e6Da0&_nc_ohc=t5ZBAn5wcjwQ7kNvwGy3sY-&_nc_gid=27lbe1hlvEWjoKzE8BgaxA&edm=APU89FABAAAA&ccb=7-5&oh=00_AQE842GezlY9W3UbaZXkDB99qndvD3OZ44yO_fBw8NiPuw&oe=6A966BDF&_nc_sid=bc0c2c", "dimensions": { "height": 1440, "width": 1080 }, "tagged_users": [] } ] }, { "media_id": "3965098051206886784", "shortcode": "DcG26tpx7WA", "media_type": "video", "display_url": "https://scontent-fra5-2.cdninstagram.com/v/t51.82787-15/773820927_18654615157020081_5228882958429413387_n.jpg?stp=dst-jpg_e15_tt6&_nc_ht=scontent-fra5-2.cdninstagram.com&_nc_cat=109&_nc_oc=Q6cZ2gGWOzswKyYp9C8OKJ_ALjjKxBgNpy05jxoFrf7N_ekCx7ejj2rweTBkv1xKJ8e6Da0&_nc_ohc=OdrhJM_m6OAQ7kNvwFWyt4f&_nc_gid=27lbe1hlvEWjoKzE8BgaxA&edm=APU89FABAAAA&ccb=7-5&oh=00_AQFfSUZNHVtX9WeCY6Y5BvBHhT-v95I_7KiBqcwS034tcw&oe=6A96838B&_nc_sid=bc0c2c", "caption": "Just look up. \n\nThe All-Time Leading Scorer’s number 3 is headed to the rafters. Diana Taurasi, forever part of Phoenix Mercury history.", "like_count": 73798, "comment_count": 947, "taken_at_timestamp": 1786896583, "is_video": true, "video_view_count": 550379, "dimensions": { "height": 1333, "width": 750 }, "tagged_users": [ { "user_id": "306787899", "is_verified": true, "x": 0, "y": 0 }, { "user_id": "376999500", "is_verified": true, "x": 0, "y": 0 }, { "user_id": "294585732", "is_verified": true, "x": 0, "y": 0 } ], "coauthor_producers": [ { "user_id": "376999500", "is_verified": true }, { "user_id": "294585732", "is_verified": true }, { "user_id": "42141463", "is_verified": true } ] } ], "timeline_page_info": { "has_next_page": true, "end_cursor": "QVFBQTI4cnhwWUV4UXVoQjFVVmRnZDFlOEJvY2NBMUVWZ0JZQk9XYVVoWjB6blRJZmFVUW1COExzWklhN1Jlem1heXJZMzcwV0FyeG5ZbnZVaE9HV0NNYg==" } } }
How the Instagram Public Data API works
Instagram Public Data is a normal ReefAPI surface — the same four rules that hold for every other engine on the key.
No OAuth app, no request signing, no per-site account. One key covers all 185 engines.
Every route is a POST with a JSON body. Parameters are validated against the published schema before anything is charged.
Credits, not seats. Failed and blocked calls are never charged, and cache hits cost nothing.
One envelope everywhere. meta carries latency_ms, record_count and the endpoint that answered.
Every id form Instagram uses, and which one each action will accept
Instagram identifies the same post three different ways and the same account two different ways, and the values are not interchangeable. This table is the mapping, taken from measured responses on @nasa and @natgeo. The row that costs people the most time is the third: post_info returns a media_id it will not accept back.
| Id | Format | Where it comes from and what takes it |
|---|---|---|
| shortcode | 11 characters, mixed case, e.g. DcOX3hWFiey | The code in instagram.com/p/<code>/ or /reel/<code>/. Accepted by post_info and post_comments, and a full post URL works too. |
| media_id (bare) | 19-digit numeric string, e.g. 3967213292204992434 | Returned by profile, posts and reels. Accepted by post_info and post_comments. |
| media_id (from post_info) | The same number with a POLARIS_ prefix, e.g. POLARIS_3967213292204992434 | post_info returns this form. It is not accepted as input: a measured call with the prefixed value came back MISSING_PARAM. Strip POLARIS_ before sending it back. |
| user_id | Numeric string, no fixed length | 528817151 for @nasa, 787132 for @natgeo, 25025320 for @instagram. Accepted wherever an id-based lookup is offered. |
| fbid | 17 digits, starting 1784 | 17841401474538262 for @nasa. Returned only by profile. It is a second account identifier, not a substitute for user_id. |
| comment_id | 17 digits | 17914942803450269, returned by post_comments. |
| hashtag id | 17 digits | 17843701351037088 for #nasa, returned by hashtag_search and search alongside media_count 10088759. |
| audio_id | Numeric string | Read it from post_info as post.music.audio_id and feed it to audio_media. |
Instagram never hands you a shortcode for a carousel slide. carousel_media[] entries carry their own media_id, media_type, display_url and dimensions, but no shortcode of their own, because the shortcode belongs to the album as a whole.
What people build with Instagram Public Data
The jobs this data is most often used for.
endpoints
credit per call
Creator and influencer platforms call profile to pull follower counts, verification and bio for any public account.
Brand-monitoring tools use hashtag_search and posts to track a campaign's reach and engagement.
Social-analytics products use reels and post_comments to measure content performance and audience sentiment.
What Instagram Public Data data costs
The cheapest call here is 1 credit, so $15/mo (Pro) buys 10,000 of them — $1.50 per 1,000 credits. Credits roll over and never expire, and failed or blocked calls are not charged.
Full pricing →- 1,000 free credits on signup, no card
- One key, all 185 APIs, one credit pool
- Failed and blocked calls are never charged
- Credits roll over and never expire
Call it in two lines
Sign up, get 1,000 credits and one key that works on every engine. Then this is the whole protocol.
curl -X POST https://api.reefapi.com/instagram/v1/profile \
-H "x-api-key: $REEF_KEY" \
-H "content-type: application/json" \
-d '{"username":"nike"}'import requests
r = requests.post(
"https://api.reefapi.com/instagram/v1/profile",
headers={"x-api-key": REEF_KEY},
json={
"username": "nike"
},
)
print(r.json()["data"])Have a question? We got answers.
The questions people actually ask before wiring up Instagram Public Data.
Get a free key →I passed the media_id that post_info gave me straight back and got MISSING_PARAM. Why?▾
post_info reports media_id with a POLARIS_ prefix, and the parameter only takes the bare number. A measured call with media_id "POLARIS_3967213292204992434" returned MISSING_PARAM ("missing: shortcode or media_id") in 32 ms, while the same call with "3967213292204992434" returned the post. The bare form is what profile, posts and reels give you, so round-tripping from those needs no handling. Store the shortcode if you want one key that works everywhere.
media_type is a word in one action and a number in another. Which is which?▾
posts, reels and profile.recent_posts return media_type as a string, and the measured values were "image", "video" and "carousel". post_info returns Instagram's own numeric enum instead: 1 for an image, 2 for a video, 8 for a carousel, all three confirmed on live posts. post_info also adds product_type, which is finer grained: "feed" for a normal image, "clips" for a reel, "carousel_container" for an album. Normalize at your boundary if you key on type.
How does a carousel (album) post come back?▾
As one post with carousel_media[] attached. A measured @natgeo album returned media_type 8, product_type "carousel_container" and five entries in carousel_media[], each with its own media_id, media_type, display_url and dimensions, and no shortcode. The album's own display_url is the first slide, so a feed that reads only display_url shows the cover and silently drops the other four. The list action flags them too: a carousel row in posts has media_type "carousel" and carries the same array.
Which fields come back null, and which are simply absent?▾
The distinction matters if you key on presence. Fields Instagram has no value for are usually dropped rather than nulled: video_view_count exists only on video rows (measured 480980 on one, with the key entirely missing on every image row), and tagged_users and coauthor_producers appear only when the post actually has them. category on profile came back null on all four accounts measured, @nasa and @instagram included. Write your reader to treat missing and null the same way.
What time format are the timestamps in?▾
Unix seconds, UTC, as integers. taken_at_timestamp on a post measured 1787148707, and created_at on a comment measured 1787782760, so the same unit under a different field name, which is worth knowing when you join posts to their comments. Nothing here is milliseconds and nothing is a formatted string, so multiply by 1000 before handing either to a JavaScript Date.
How do I page through posts and comments?▾
Two different cursors. For posts and reels, page_info returns next_max_id and end_cursor holding the identical base64 string, and you pass either back as max_id (cursor is accepted as an alias). For comments, next_cursor is a JSON document serialized into a string, measured as {"is_server_cursor_inverse":true,"server_cursor":"AQHT..."}, so pass it back verbatim as cursor without trying to parse it. Stop when has_more is false or next_cursor is null.
Does comment_count match the number of comments I can pull?▾
comment_count is the total on the post; returned_count is what this call handed you. A measured @nasa post reported comment_count 2994 with returned_count 5 for a limit of 5. Comments come back newest first and paging with cursor walks backwards from there. The two numbers will not converge on a busy post because new comments arrive while you page, so use comment_count as the denominator for a progress bar and not as a termination condition.
A username that does not exist returned TARGET_BLOCKED rather than NOT_FOUND. Is that a bug?▾
It is expected, and worth designing around. A measured call for a handle that does not exist came back TARGET_BLOCKED with retryable true rather than NOT_FOUND, because the public surface does not distinguish the two clearly enough for us to promise a difference, and telling you an account is gone when it might be a transient miss would be worse. Retry a TARGET_BLOCKED once; if one handle keeps returning it while other handles succeed in the same window, treat it as gone.
What is the Instagram Public Data API?▾
Instagram Public Data API is a ReefAPI endpoint group for instagram public data It returns live JSON through POST requests under /instagram/v1.
Is the Instagram Public Data API free to try?▾
Yes. ReefAPI starts with 1,000 free credits, no card required. Instagram Public Data calls use the same shared credit balance as every other ReefAPI engine.
Do I need an Instagram Public Data login or account?▾
No login to Instagram Public Data is needed for the API response. You call ReefAPI with your x-api-key header, and the playground can run live examples before you create a production key.
How fresh is the Instagram Public Data data?▾
The page example is captured from a live profile call, and production requests fetch live data through ReefAPI rather than a static sample.
How many credits does the Instagram Public Data API use?▾
Instagram Public Data actions currently cost 1 credit per successful call. Failed or blocked calls are free, and all APIs draw from one credit pool.
Can I call Instagram Public Data from an AI assistant or MCP client?▾
Yes. Connect ReefAPI once through MCP and your assistant can call instagram actions with the same key, credit pool and JSON envelope used by normal REST requests.
10 Social Media APIs on the same key
One key, one credit pool, one response envelope. If you are pulling Instagram Public Data, you are one call away from the rest of the category — no second contract, no second integration.
Try it on your own data before you pay anything
The call above is the real endpoint, not a recording. A free key gives you 1,000 credits, the other 184 APIs, and the same envelope everywhere.
Endpoints, parameters and credit costs on this page are read from the live catalog and cannot drift from what the API accepts.