Instagram Public Data API & Scraper
The Instagram API returns public Instagram data — profiles, posts, reels and hashtags — as clean JSON.
🤖 Using an AI assistant? Copy this link into ChatGPT / Claude / Cursor — it reads every endpoint and parameter instantly and tells you if this API fits your use case.
The primary profile endpoint returns a username's full name, biography, follower and following counts, verified and private flags, account type (business, creator or personal), category when the account shows one and profile picture, by username or by user id — no login or scraping. You can also pull a user's posts and reels with like and play counts, pinned flags and, with details, each post's date, comment count and tagged accounts in the same call, run a users_search, expand a post's info and comments, and fetch hashtag results and post audio. It is built for social-analytics tools, creator platforms and brand-monitoring products that need live public Instagram data without account pools or a fragile scraper. One ReefAPI key, one shared credit pool, the standard { ok, data, meta, error } envelope.
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 by profile, posts and reels in place of username, and it survives a handle change. |
| 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.
Real request and response JSON
Captured from the indexed primary action, profile, on .
{
"method": "POST",
"url": "https://api.reefapi.com/instagram/v1/profile",
"headers": {
"x-api-key": "$REEF_KEY",
"content-type": "application/json"
},
"body": {
"username": "nike"
}
}{
"ok": true,
"meta": {
"api": "instagram",
"endpoint": "profile",
"mode": "live",
"latency_ms": 3094,
"record_count": 1,
"bytes": 19335,
"cache_hit": false,
"content_type": "application/json",
"status": 200,
"charged_credits": 1,
"version": "0.1.0"
},
"data": {
"username": "nike",
"full_name": "Nike",
"biography": "Just Do It.",
"bio_links": [
{
"url": "http://empli.fi/nike",
"link_type": "external"
}
],
"pronouns": [],
"follower_count": 291153768,
"following_count": 266,
"is_verified": true,
"is_private": false,
"is_business": false,
"bio_mentions": [],
"bio_hashtags": [],
"profile_pic": "https://scontent-mia3-3.cdninstagram.com/v/t51.82787-19/551608484_18567162979020081_1135468084872726555_n.jpg?_nc_cat=1&ccb=7-5&_nc_sid=bf7eb4&efg=eyJ2ZW5jb2RlX3RhZyI6InByb2ZpbGVfcGljLnd3dy4zOTkuQzMifQ%3D%3D&_nc_ohc=l3wg8iAkAc4Q7kNvwGrv800&_nc_oc=AdqsIB_UOVqhBZnp6TJTqHBH1XRZljJXcvBXfKI_9-ttkC0MUWZB6sM08v-_LGymyWE&_nc_zt=24&_nc_ht=scontent-mia3-3.cdninstagram.com&_nc_gid=sbg46OqaQb5lcAz2cmF4xQ&_nc_ss=7fa8c&oh=00_AQJHYUHf-MOZmJSq0zMFg4S_plavbGYKu5DepYJDjpTNMw&oe=6ABA30FA",
"external_url": "http://empli.fi/nike",
"user_id": "13460080",
"fbid": "17841400602400210",
"is_regulated_c18": false,
"recent_posts": [
{
"media_id": "3991849403537918302",
"shortcode": "Ddl5eH-u4le",
"media_type": "video",
"product_type": "clips",
"caption": "*Just a normal day for @caitlinclark22.\n\nWake up. Eat cereal. Lace up the Caitlin 1. Sell out arenas. Repeat.",
"accessibility_caption": "Video by Nike on September 22, 2026. May be an image of text.",
"display_url": "https://scontent-lax3-2.cdninstagram.com/v/t51.82787-15/809201733_18666457525020081_2045154896762681305_n.jpg?stp=dst-jpg_e35_s640x640_tt6&_nc_cat=106&ccb=7-5&_nc_sid=18de74&efg=eyJlZmdfdGFnIjoiQ0xJUFMuYmVzdF9pbWFnZV91cmxnZW4uQzMifQ%3D%3D&_nc_ohc=m52AhuHtrL0Q7kNvwE-cB_0&_nc_oc=Ado5_OotZvfMHfOg-jv6DFj47RMIf7ym8bNxWqIdJ5FD3TgQOfvKgGTFmHQVIu-EQpQ&_nc_zt=23&_nc_ht=scontent-lax3-2.cdninstagram.com&_nc_gid=cjyCyOR_pnVchGF7cIwh2g&_nc_ss=7f289&oh=00_AQJc0g1w_beKo84ePao6wNvGReRZtaNIxVGsWz6AhmNUUw&oe=6ABA1FFB",
"is_video": true,
"user": {
"user_id": "13460080",
"username": "nike"
}
},
{
"media_id": "3989102691637366197",
"shortcode": "DdcI8NLmY21",
"media_type": "carousel",
"product_type": "carousel_container",
"caption": "Nike Atelier for Sha’Carri Richardson reflects the beauty of London after rainfall through luminous details, weathered textures, and sculptural silhouettes defined by strength and movement.\n\nThe bespoke look debuts on the red carpet at @athlos A26 in London. \n\nBuilt to push beyond convention, the Nike FlyWeb bra uses computational design to engineer fit and support down to the millimeter. Precision-made for an athlete redefining power on and off the track.\n\nThe Nike Atelier Vomero Premium takes a performance silhouette into new territory, embellished with hand-set Swarovski® Crystals shimmering like water droplets above reflective Air Zoom units.\n\n“You don’t have to choose one version of yourself. Every side of you can be powerful.”\n\nSha’Carri Richardson\n\nLight and movement shape every detail of the Nike Atelier jacket, with hand-set Swarovski® Crystals that catch the light like raindrops across the reflective outer layer.\n\nMade in Japan from premium crackled leather, the Nike Atelier Duffel Mini is accessorized with oversized custom charms that celebrate Sha’Carri’s connection to the track.\n\nNike Atelier. One of One.",
"accessibility_caption": "Photo by Nike on September 18, 2026. May be an image of text that says 'NIKE NIKEATELIER ATELIER'.",
"display_url": "https://scontent-lax3-2.cdninstagram.com/v/t51.82787-15/796460834_18665219536020081_4779922114140616445_n.jpg?stp=dst-jpg_e35_s640x640_tt6&_nc_cat=1&ccb=7-5&_nc_sid=18de74&efg=eyJlZmdfdGFnIjoiQ0FST1VTRUxfSVRFTS5iZXN0X2ltYWdlX3VybGdlbi5DMyJ9&_nc_ohc=YlZ6-T_wry4Q7kNvwFIMtmx&_nc_oc=AdpRdR4k9xAESwxtb1g1SpRu0Tj39RhdI3xeuDPVJN7LYKmbnJKhOA3iflt-k0MiQ_M&_nc_zt=23&_nc_ht=scontent-lax3-2.cdninstagram.com&_nc_gid=cjyCyOR_pnVchGF7cIwh2g&_nc_ss=7f289&oh=00_AQIW71i4FrdpF3anZ42fuxOlUwRSC-ys7IS0fQyQSMuaQw&oe=6ABA143B",
"is_video": false,
"carousel_media_count": 7,
"user": {
"user_id": "13460080",
"username": "nike"
}
},
{
"media_id": "3984877986863034700",
"shortcode": "DdNIWqQPrFM",
"media_type": "image",
"product_type": "feed",
"caption": "Respectfully brutal. @bokrugby tough out a series only rugby’s greatest can produce.",
"accessibility_caption": "Photo by Nike on September 12, 2026. May be an image of football, ball, sports equipment and text that says 'รรร Grecn and gold. The last thing you see before it goes all black.'.",
"display_url": "https://scontent-lax3-2.cdninstagram.com/v/t51.82787-15/808535567_18663415465020081_8300401525546067823_n.jpg?stp=dst-jpg_e35_s640x640_tt6&_nc_cat=106&ccb=7-5&_nc_sid=18de74&efg=eyJlZmdfdGFnIjoiRkVFRC5iZXN0X2ltYWdlX3VybGdlbi5DMyJ9&_nc_ohc=snAr8GCGKeoQ7kNvwGy6SIk&_nc_oc=AdrgR4qwzX1u22_miZbdiqOM9_mAB_lD7guFhf-SPyo5-2vw7XOSVb42EUlUh-5msMM&_nc_zt=23&_nc_ht=scontent-lax3-2.cdninstagram.com&_nc_gid=cjyCyOR_pnVchGF7cIwh2g&_nc_ss=7f289&oh=00_AQJIvzFWpfWhjsKnKQ6z_Ybx6KKlgNZpus0pAfJ6pEIx7Q&oe=6ABA3255",
"is_video": false,
"user": {
"user_id": "13460080",
"username": "nike"
}
},
{
"media_id": "3984692633858210943",
"shortcode": "DdMeNa0O_x_",
"media_type": "image",
"product_type": "feed",
"caption": "New York, Paris, Melbourne, and London have one thing in common. @nielsvink goes four for four on the year, securing the calendar year Grand Slam, by winning major titles in every corner of the globe.",
"accessibility_caption": "Niels Vink celebrates a point in New York in a wheelchair, tongue out, wearing a black Nike tennis kit. Headline \"Won all 4. Hungry for more.\" and the Nike logo.",
"display_url": "https://scontent-lax3-2.cdninstagram.com/v/t51.82787-15/806299551_18663322408020081_1997829106507125055_n.jpg?stp=dst-jpg_e35_s640x640_tt6&_nc_cat=1&ccb=7-5&_nc_sid=18de74&efg=eyJlZmdfdGFnIjoiRkVFRC5iZXN0X2ltYWdlX3VybGdlbi5DMyJ9&_nc_ohc=MZGYYjwo-iUQ7kNvwFNOJ4w&_nc_oc=Adr1r7GSgqdwMplrldAtSMATpQocDqVIqU84VH28_pgaOt4P1r2og94fP4EQBM-PMj0&_nc_zt=23&_nc_ht=scontent-lax3-2.cdninstagram.com&_nc_gid=cjyCyOR_pnVchGF7cIwh2g&_nc_ss=7f289&oh=00_AQLNculwOdRy6yBiV9JMoAm0wQziL5hMAmBHZZF6wt9Etg&oe=6ABA1C8E",
"is_video": false,
"user": {
"user_id": "13460080",
"username": "nike"
}
},
{
"media_id": "3977354183208478944",
"shortcode": "DcyZo6EDijg",
"media_type": "carousel",
"product_type": "carousel_container",
"caption": "No moment is too small to win.\n\nGrab the Sabrina 4 “The Switch” launching 9.5",
"accessibility_caption": "Photo by Nike Basketball on September 02, 2026. May be an image of text.",
"display_url": "https://scontent-lax3-2.cdninstagram.com/v/t51.82787-15/791144760_18627521548035900_8030782657832792891_n.jpg?stp=dst-jpg_e35_s640x640_tt6&_nc_cat=106&ccb=7-5&_nc_sid=18de74&efg=eyJlZmdfdGFnIjoiQ0FST1VTRUxfSVRFTS5iZXN0X2ltYWdlX3VybGdlbi5DMyJ9&_nc_ohc=7qTi-KvZvmYQ7kNvwEPGb51&_nc_oc=Adq3arDygwl7rc2RhRx5VtOpUyi8_PxU6ZLHI0lq8-BGXihLXEHrHz4AxaoVXDU0UFg&_nc_zt=23&_nc_ht=scontent-lax3-2.cdninstagram.com&_nc_gid=cjyCyOR_pnVchGF7cIwh2g&_nc_ss=7f289&oh=00_AQI7Lxp_vsJkV6Elshnhpz5paYM5_R7AzEC2RLGnrr300g&oe=6ABA278A",
"is_video": false,
"carousel_media_count": 4,
"user": {
"user_id": "306787899",
"username": "nikebasketball"
}
},
{
"media_id": "3976711603135381072",
"shortcode": "DcwHiIvDv5Q",
"media_type": "carousel",
"product_type": "carousel_container",
"caption": "These games mean more than just the standings. \n\nThe 2026 Nike x NFL Rivalries Collection. Built from competition and inspired by communities that make up the AFC South and NFC North. \n\nAvailable now.",
"accessibility_caption": "Photo by Nike on September 01, 2026. May be an image of text.",
"display_url": "https://scontent-lax3-1.cdninstagram.com/v/t51.82787-15/793028537_18659928706020081_2345019189057705402_n.jpg?stp=dst-jpg_e35_s640x640_tt6&_nc_cat=108&ccb=7-5&_nc_sid=18de74&efg=eyJlZmdfdGFnIjoiQ0FST1VTRUxfSVRFTS5iZXN0X2ltYWdlX3VybGdlbi5DMyJ9&_nc_ohc=-RuiD_kbZUwQ7kNvwEjAHzK&_nc_oc=Adpedy-TJhxkmYxMEVBDRJw5kJ8Ipl0ZdeslqBAxVcITPnScL91N-fbEbCIIjvjsIas&_nc_zt=23&_nc_ht=scontent-lax3-1.cdninstagram.com&_nc_gid=cjyCyOR_pnVchGF7cIwh2g&_nc_ss=7f289&oh=00_AQK78QDmRjJ7_PsDpceVvxkMM17hhPMqCvSl6C8hZQIsJw&oe=6ABA3139",
"is_video": false,
"carousel_media_count": 8,
"user": {
"user_id": "13460080",
"username": "nike"
}
},
{
"media_id": "3975901976486041392",
"shortcode": "DctPchKOVcw",
"media_type": "video",
"product_type": "clips",
"caption": "If you’re going to play, play with fire.\n\n@carlitosalcarazz is back and coming in hot.",
"accessibility_caption": "Video by Nike on August 31, 2026. May be an image of tennis, racket and text.",
"display_url": "https://scontent-lax3-2.cdninstagram.com/v/t51.82787-15/791906938_18659541199020081_1978858658127689682_n.jpg?stp=dst-jpg_e35_s640x640_tt6&_nc_cat=106&ccb=7-5&_nc_sid=18de74&efg=eyJlZmdfdGFnIjoiQ0xJUFMuYmVzdF9pbWFnZV91cmxnZW4uQzMifQ%3D%3D&_nc_ohc=WkSeclJk2LwQ7kNvwEPoeyM&_nc_oc=Adry6xOcEZ6tDjoMNWjccQENWVFGpdcsFZG9vFwC60LZpYpGeyam2_GmFt_cPcL-UTA&_nc_zt=23&_nc_ht=scontent-lax3-2.cdninstagram.com&_nc_gid=cjyCyOR_pnVchGF7cIwh2g&_nc_ss=7f289&oh=00_AQJD2xh8PXNcpHkjYdnxIAbv9DE9uqLeE0Mqve-X84dh2g&oe=6ABA03B3",
"is_video": true,
"user": {
"user_id": "13460080",
"username": "nike"
}
},
{
"media_id": "3973168148123211095",
"shortcode": "Dcjh2FFx9VX",
"media_type": "video",
"product_type": "clips",
"caption": "New record just dropped.\n\nThe 100M hurdles World Record belongs to @masai_russell. And it’s flying off the shelves.",
"accessibility_caption": "Video by Nike on August 27, 2026. May be an image of record player, record and text.",
"display_url": "https://scontent-lax7-1.cdninstagram.com/v/t51.82787-15/788562814_18658305418020081_8049223232898323984_n.jpg?stp=dst-jpg_e35_s640x640_tt6&_nc_cat=105&ccb=7-5&_nc_sid=18de74&efg=eyJlZmdfdGFnIjoiQ0xJUFMuYmVzdF9pbWFnZV91cmxnZW4uQzMifQ%3D%3D&_nc_ohc=Gt1xwlxQuGUQ7kNvwGhGCEo&_nc_oc=AdosNCTMFsRZ4uG_2HlRImxicbGm33UMQBkjcArd6JsNZ-IUTMVmHjMS9PPDB7znSNA&_nc_zt=23&_nc_ht=scontent-lax7-1.cdninstagram.com&_nc_gid=cjyCyOR_pnVchGF7cIwh2g&_nc_ss=7f289&oh=00_AQJbXs2nEFiqyVeHmWvdVg1Ri-uBkVQadCiY6zXEJ1Ua9Q&oe=6ABA33DB",
"is_video": true,
"user": {
"user_id": "13460080",
"username": "nike"
}
},
{
"media_id": "3969188148291564527",
"shortcode": "DcVY5dZm_Pv",
"media_type": "carousel",
"product_type": "carousel_container",
"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.",
"accessibility_caption": "Photo by Nike on August 22, 2026. May be an image of text that says 'OUTTHINK YESTERDAY لحر'.",
"display_url": "https://scontent-lax3-2.cdninstagram.com/v/t51.82787-15/784252020_18656598970020081_4373176743203571146_n.jpg?stp=dst-jpg_e35_s640x640_tt6&_nc_cat=111&ccb=7-5&_nc_sid=18de74&efg=eyJlZmdfdGFnIjoiQ0FST1VTRUxfSVRFTS5iZXN0X2ltYWdlX3VybGdlbi5DMyJ9&_nc_ohc=SiMJCRIQOewQ7kNvwEt8E7A&_nc_oc=AdrrUccECiW9t_5Gk2YqUVeB1z2hUD4J-hPwRdHZaTdSePTzfeJklR7MYI50R5Z4J7o&_nc_zt=23&_nc_ht=scontent-lax3-2.cdninstagram.com&_nc_gid=cjyCyOR_pnVchGF7cIwh2g&_nc_ss=7f289&oh=00_AQKg4l2KqV0-VV2wBcGeiw6sgQo7nGJSozus8nEqJrOEGg&oe=6ABA2F50",
"is_video": false,
"carousel_media_count": 2,
"user": {
"user_id": "13460080",
"username": "nike"
}
},
{
"media_id": "3965098051206886784",
"shortcode": "DcG26tpx7WA",
"media_type": "video",
"product_type": "clips",
"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.",
"accessibility_caption": "Video by Nike on August 16, 2026. May be a black-and-white image of one or more people and text.",
"display_url": "https://scontent-lax7-1.cdninstagram.com/v/t51.82787-15/773820927_18654615157020081_5228882958429413387_n.jpg?stp=dst-jpg_e35_s640x640_tt6&_nc_cat=105&ccb=7-5&_nc_sid=18de74&efg=eyJlZmdfdGFnIjoiQ0xJUFMuYmVzdF9pbWFnZV91cmxnZW4uQzMifQ%3D%3D&_nc_ohc=OP749EKbxqMQ7kNvwG-_maF&_nc_oc=Adpj6xWMxswfvpaLJMcKkzbt1y5FcfrxPyB-cvwTQSK-U1V0eHzS_qJdxwXTYfozL_Y&_nc_zt=23&_nc_ht=scontent-lax7-1.cdninstagram.com&_nc_gid=cjyCyOR_pnVchGF7cIwh2g&_nc_ss=7f289&oh=00_AQLPVPuGAevEg0h-T7AbFfkpO7Z9acFS1QrHjOfs2bpAAQ&oe=6ABA1C0B",
"is_video": true,
"user": {
"user_id": "13460080",
"username": "nike"
}
},
{
"media_id": "3961499929595472898",
"shortcode": "Db6EzJxRewC",
"media_type": "video",
"product_type": "clips",
"caption": "Don’t Sleep on Ja. This is your wakeup call.\n\nJa 4 ‘Nightmare’ arrives on 8.13.",
"accessibility_caption": "Video by Nike on August 11, 2026. May be an image of digital watch, timer and text.",
"display_url": "https://scontent-lax3-2.cdninstagram.com/v/t51.82787-15/772101971_18652763158020081_7353952094575095987_n.jpg?stp=dst-jpg_e35_s640x640_tt6&_nc_cat=103&ccb=7-5&_nc_sid=18de74&efg=eyJlZmdfdGFnIjoiQ0xJUFMuYmVzdF9pbWFnZV91cmxnZW4uQzMifQ%3D%3D&_nc_ohc=TI3Jsi6F7dYQ7kNvwGuMJTn&_nc_oc=Adpn33XcXQYg25nzZ82aaOIfvR-dlVvzJtuTwduDk9b4NDwfBmmR1qF253K-dhQCoKk&_nc_zt=23&_nc_ht=scontent-lax3-2.cdninstagram.com&_nc_gid=cjyCyOR_pnVchGF7cIwh2g&_nc_ss=7f289&oh=00_AQKArx7EkllXVWa4o7266nWWZcF5q5AyrWvdohhhobZHog&oe=6ABA2F12",
"is_video": true,
"user": {
"user_id": "13460080",
"username": "nike"
}
},
{
"media_id": "3953495852743039876",
"shortcode": "Dbdo4gTupuE",
"media_type": "video",
"product_type": "clips",
"caption": "The game looks different from here.",
"accessibility_caption": "Video by Nike on July 31, 2026. May be an image of text.",
"display_url": "https://scontent-lax3-2.cdninstagram.com/v/t51.82787-15/762586131_18649234189020081_1896116944945693077_n.jpg?stp=dst-jpg_e35_s640x640_tt6&_nc_cat=100&ccb=7-5&_nc_sid=18de74&efg=eyJlZmdfdGFnIjoiQ0xJUFMuYmVzdF9pbWFnZV91cmxnZW4uQzMifQ%3D%3D&_nc_ohc=xyGxhaNxHd4Q7kNvwFLT5dC&_nc_oc=AdqKXwKMm7UGfHcTHgW4B0-ipGQDEarocR9Cvpl6zVxfW0fOg1HIDTX9JvtH5D2isT0&_nc_zt=23&_nc_ht=scontent-lax3-2.cdninstagram.com&_nc_gid=cjyCyOR_pnVchGF7cIwh2g&_nc_ss=7f289&oh=00_AQKwRdhjbNT2Sg23KKJC9VmdllzJ-kbY6ZRUL1CgFacnsQ&oe=6ABA1656",
"is_video": true,
"user": {
"user_id": "13460080",
"username": "nike"
}
}
],
"timeline_page_info": {
"has_next_page": true,
"end_cursor": "AQHTUhTjfuWr15bemUTyV0v8DpJnnyoA3FSEQPoWwfBCgQhhTSnUBsaIzT6wNo78B0hZ7E6FKFxD8Egde9dlx_tzNw",
"next_max_id": "AQHTUhTjfuWr15bemUTyV0v8DpJnnyoA3FSEQPoWwfBCgQhhTSnUBsaIzT6wNo78B0hZ7E6FKFxD8Egde9dlx_tzNw",
"max_id": "AQHTUhTjfuWr15bemUTyV0v8DpJnnyoA3FSEQPoWwfBCgQhhTSnUBsaIzT6wNo78B0hZ7E6FKFxD8Egde9dlx_tzNw"
}
}
}What the Instagram Public Data API does
| Action | Description | Concrete use case | Key params |
|---|---|---|---|
| profile | public profile facts and first-page recent posts | Social-listening tools call profile to get public profile facts and first-page recent posts. | username, user_id |
| posts | public profile grid posts, newest first, with max_id pagination | Creator and influencer platforms call posts to get public profile grid posts, newest first, with max_id pagination. | username, user_id, limit, max_id, cursor, ... |
| reels | public profile reels tab, newest first, with max_id pagination | Brand-monitoring teams call reels to get public profile reels tab, newest first, with max_id pagination. | username, user_id, limit, max_id, cursor, ... |
| similar_accounts | public related profiles from web_profile_info | Audience analysts call similar_accounts to get public related profiles from web_profile_info. | username, limit |
| search | topsearch blended public users, hashtags, and places | Social-listening tools call search to get topsearch blended public users, hashtags, and places. | query |
| users_search | public user lookup by handle (exact / near-exact match) | Creator and influencer platforms call users_search to get public user lookup by handle (exact / near-exact match). | query |
| hashtag_search | topsearch public hashtags only | Brand-monitoring teams call hashtag_search to get topsearch public hashtags only. | query |
| post_info | maximally-complete public post/reel detail by shortcode (URL) or media_id | Audience analysts call post_info to get maximally-complete public post/reel detail by shortcode (URL) or media_id. | shortcode, media_id |
| post_comments | public comments for a post/reel by shortcode (URL) or media_id, with CURSOR pagination | Social-listening tools call post_comments to get public comments for a post/reel by shortcode (URL) or media_id, with CURSOR pagination. | shortcode, media_id, limit, cursor |
| audio_media | public reels feed that use a given audio/music track, with pagination | Creator and influencer platforms call audio_media to get public reels feed that use a given audio/music track, with pagination. | audio_id, limit, max_id, cursor |
Call profile from your stack
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"])const res = await fetch("https://api.reefapi.com/instagram/v1/profile", {
method: "POST",
headers: {
"x-api-key": process.env.REEF_KEY,
"content-type": "application/json",
},
body: JSON.stringify({
"username": "nike"
}),
});
const { ok, data, meta, error } = await res.json();Ask your MCP-connected assistant: call reefapi.instagram.profile with {"username":"nike"}.Who uses this API and why
- 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.
Questions developers ask before integrating
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 is present only when the account chooses to show one: measured "Clothing (Brand)" on @zara and "Artist" on @reynmen, absent on @natgeo and @nike. 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.
How do I get dates and comment counts for a whole page of posts in one call?
Send details: true to posts or reels. Each row then also carries taken_at_timestamp, comment_count, tagged_users, coauthor_producers and location, and reels rows get their caption, while play_count stays. Every row says details_status "ok" or "unavailable"; an unavailable row keeps its list fields and is not charged. Measured on 11 accounts, 12 rows each: 132 of 132 rows came back ok, in 3.9 to 7.7 seconds per call. Without details the grid still gives like_count, and play_count on videos. The price is the list price plus 1 credit for every row that came back ok, the same as one post_info call, and the response shows the total in meta.charged_credits.
Which posts are pinned?
Rows on the first page of posts carry is_pinned. Pinned posts lead the grid regardless of their date, so the flag tells you which leading rows to skip when you want the newest post: @natgeo and @enesbatur measured three pinned posts, @cznburak one, @nike none. reels rows carry is_pinned for the reels tab. Later pages leave the field out, a pinned post that is also the account's newest reads false, and when the grid order cannot be read the field is left out rather than guessed.
How do I keep tracking an account after it changes its handle?
Store user_id and send it instead of username to profile, posts or reels. The response carries the account's current username, so you also learn the new handle. If both are sent, user_id wins. An id with no public account behind it returns NOT_FOUND; a non-numeric value returns INVALID_PARAM.
Is an account a business or a creator?
Read account_type on profile: "business", "creator" or "personal". is_business and is_professional are derived from it. Measured: @nike, @zara and @enesbatur are business, @mrbeast, @cznburak and @reynmen are creator. Logged-out Instagram sends its own is_business flag as false on every account, business ones included, which is why the engine does not use it.
A username that does not exist returned NOT_FOUND. Can it also return TARGET_BLOCKED?
Yes, and the two mean different things. NOT_FOUND with retryable false means Instagram answered and said there is no public account with that handle, or the account is private. TARGET_BLOCKED with retryable true means the request was refused this time and is worth one retry. Neither is charged.
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.