APIs / Social media / Instagram
1 credit per call12 endpoints
Instagram API
Instagram API for public posts, comments, hashtag search, popular posts and reels by audio as JSON. 12 endpoints, 1 credit per call.
curl "https://api.perceptlayer.com/v1/instagram/hashtags-search?q=nature" \
-H "X-API-Key: $API_KEY"Playground
Run this API
curl "https://api.perceptlayer.com/v1/instagram/hashtags-search?q=nature" \
-H "X-API-Key: $API_KEY"Instagram · 12 endpoints
Endpoints
Every endpoint takes the same key. Open one for its parameters, the fields it returns and an example request.
| Endpoint | Required parameters | Returns | Cost |
|---|---|---|---|
GET/v1/instagram/audio-reels | audio_id+1 optionalNeeds terms | foundaudio_idreelsreels_countmore_available | 1 credit |
GET/v1/instagram/hashtags-search | qNeeds terms | idnamemedia_countformatted_media_countsearch_result_subtitle | 1 credit |
GET/v1/instagram/post | none+2 optionalNeeds terms | idshortcodemedia_typecaptiontaken_attaken_at_timestamp+8 more | 1 credit |
GET/v1/instagram/post-comments | shortcode+1 optionalNeeds terms | foundshortcodecommentscomments_countmore_available | 1 credit |
GET/v1/instagram/search-popular | qNeeds terms | foundmediamedia_countrelated_keywordsdescription | 1 credit |
GET/v1/instagram/user | none+2 optionalNeeds terms | JSON | 1 credit |
GET/v1/instagram/user-basic | user_idNeeds terms | founduser_iduser | 1 credit |
GET/v1/instagram/user-embed | usernameNeeds terms | foundusernameembed_urlembed_html | 1 credit |
GET/v1/instagram/user-highlights | highlight_idNeeds terms | JSON | 1 credit |
GET/v1/instagram/user-posts | username+1 optionalNeeds terms | foundpostsposts_countmore_available | 1 credit |
GET/v1/instagram/user-reels | none+3 optionalNeeds terms | founduser_idusernamereelsreels_countmore_available | 1 credit |
GET/v1/instagram/user-v2 | none+2 optionalNeeds terms | founduser | 1 credit |
Overview
About the Instagram API
What you can get
The Instagram API returns public Instagram data as JSON through 12 endpoints. These are restricted endpoints: the restricted-endpoint terms apply, and they don't permit collecting personal data without a lawful basis or using it to contact people.
- Hashtags and discovery:
hashtags-searchandsearch-popularfor a query inq. - Posts:
postbyurlorshortcode, andpost-commentsbyshortcode. - Reels by sound:
audio-reelsfor anaudio_id. - Public accounts:
user,user-v2anduser-embedbyusername,user-basicbyuser_id, the account'suser-postsanduser-reels, anduser-highlightsbyhighlight_id.
The list endpoints (post-comments, audio-reels, user-posts, user-reels) also take max_id.
How a call works
Start from a hashtag or a post. GET /v1/instagram/hashtags-search?q=coffee searches hashtags; GET /v1/instagram/post?url=... returns one public post, and post-comments takes the same post's shortcode. Every successful call costs 1 credit; failed calls cost nothing.
More social media APIs
Use cases
Measure how a hashtag or topic trends in public posts
Use the Instagram API to measure how a hashtag or topic trends in public postsTrack public reaction to your brand's own posts through their comments
Use the Instagram API to track public reaction to your brand's own posts through their commentsFollow which sounds are spreading through reels
Use the Instagram API to follow which sounds are spreading through reelsReview your own or a partner's public account content in one place
Use the Instagram API to review your own or a partner's public account content in one placeFAQ
Questions
Do I need an Instagram API key?
No. You call this Instagram API with your Perceptlayer key in the `X-API-Key` header, so there's no separate app or access token to set up. You still need to accept the restricted-endpoint terms first.
How much does the Instagram API cost?
Each successful call costs one credit, on every endpoint. New accounts get free credits to start, and credit packs bring the price down as you scale.
What format are responses in?
Every endpoint returns JSON, with no HTML parsing on your side.
Is this the official Instagram API?
No. Perceptlayer is an independent service and is not affiliated with Instagram. It returns Instagram data as JSON with a Perceptlayer key, so there is no Instagram developer account, app review or partner approval to get first. It only reads data: if Instagram has an official API and you need to act on your own Instagram account, such as posting, managing orders or reading private data, use that one.
Should I build an Instagram scraper instead?
You can, but an Instagram scraper is code you maintain: page changes break it, requests get blocked, and Instagram's terms govern how you collect data. The Instagram API gives you 12 endpoints of named JSON fields for 1 credit per successful call, and failed calls cost nothing. A scraper makes sense only for data these endpoints don't return, so check the response in the playground on this page first. Some of these endpoints return social or personal data and need the restricted-endpoint terms; collect only what you have a lawful basis for.
Try the Instagram API with 100 free credits
No credit card. Failed calls are never billed.