Instagram API

Get Instagram data as clean JSON with one key: 42 endpoints, 1 to 6 credits per call, the same response shape as every other platform.

What you get#

Onekey exposes Instagram as 42 endpoints behind one API key: 15 endpoints return one record (data is an object) and 27 endpoints return a list (data is an array). Every answer uses the same envelope (success, data, metadata, error), the cost is reported in metadata.credits_charged, and fields are mapped onto the unified schema so the code you write for Instagram also works for the rest of the social networks category.

Endpoints#

EndpointWhat it doesParametersCreditsStatus
audio_reelsList Instagram reels using an audio track.audio_id*, cursor2beta needs a pack
basic_profileBasic Instagram profile by user id.user_id*2beta needs a pack
commentLook up one Instagram comment by post URL.url*2beta needs a pack
comment_likersList accounts that liked an Instagram comment.comment_id*, cursor2beta needs a pack
commentsComments on an Instagram post (needs the numeric media id).media_id*3beta needs a pack
engagementGet Instagram engagement statistics.handle*2beta needs a pack
followersFollowers of an Instagram user (login-gated: needs a session cookie).user_id*6beta needs a pack
followingAccounts an Instagram user follows (login-gated: needs a session cookie).user_id*6beta needs a pack
hashtagInstagram hashtag info: post count.tag*2beta needs a pack
highlight_detailGet the items inside one Instagram story highlight.id*2beta needs a pack
highlightsStory highlights tray of an Instagram user (login-gated).user_id*2beta needs a pack
locationGet an Instagram location's profile.location_id*2beta needs a pack
location_postsList recent posts at an Instagram location.location_id*, cursor3beta needs a pack
media_screen_textGet Instagram post on-screen text.url*2beta needs a pack
media_transcriptGet Instagram media transcript.url*2beta needs a pack
music_trendingList trending Instagram music.-3beta needs a pack
postA single Instagram post/reel by shortcode (graphql doc_id drifts, override via param).shortcode*, doc_id2beta needs a pack
post_comment_repliesList replies under an Instagram comment.url*, comment_id*, cursor2beta needs a pack
post_likersList Instagram post likers.url*3beta needs a pack
post_oembedInstagram post oEmbed: caption, author, thumbnail (public posts).shortcode*1stable may need a pack
post_statsGet Instagram post stats including the share count.url*2beta needs a pack
postsRecent posts of an Instagram profile (public accounts).handle*, cursor2beta needs a pack
profileInstagram profile: bio, followers, following, post count, verification, avatar.handle*2beta needs a pack
profile_aboutGet Instagram account transparency details.handle*2beta needs a pack
profile_fullInstagram profile, recent posts, and computed analytics in one call.handle*2beta needs a pack
profile_posts_fullInstagram posts with views, likes, comments, and per-post share counts where available, in one call.handle, user_id3beta needs a pack
profile_reels_fullInstagram reels with views, likes, comments, and per-reel share counts where available, in one call.handle, user_id3beta needs a pack
reelsRecent reels (video timeline) of an Instagram profile.handle*, cursor2beta needs a pack
reels_trendingGet trending Instagram reels.-3beta needs a pack
searchSearch Instagram accounts, hashtags and places.query*2beta needs a pack
search_hashtagsSearch Instagram hashtags by keyword (topsearch).q*2beta needs a pack
search_locationSearch Instagram locations.query*3beta needs a pack
search_musicSearch Instagram music.query*, cursor3beta needs a pack
search_popularSearch popular Instagram posts.query*, cursor2beta needs a pack
search_reelsSearch Instagram reels.query*, cursor2beta needs a pack
search_usersSearch Instagram users by keyword (topsearch).q*2beta needs a pack
similarList similar Instagram accounts.handle, user_id3beta needs a pack
storiesList an Instagram user's active stories.handle, user_id3beta needs a pack
story_downloadDownload a single Instagram story.story_id*, user_id, handle2beta needs a pack
taggedList posts an Instagram user is tagged in.handle, user_id, cursor3beta needs a pack
user_embedGet Instagram user embed HTML.handle*2beta needs a pack
username_suggestionsGet Instagram username suggestions.query*3beta needs a pack

A * marks a required parameter. Each endpoint name links to its reference page with the full parameter table, caching window and a recorded response.

Make a request#

This calls instagram.post_oembed (1 credit, stable). Replace YOUR_API_KEY with your key; sign up, no card. 1,000 free credits cover the open-platform endpoints. Hard-to-reach platforms (X, TikTok, Instagram, Reddit, and others marked on their page) need a verified email and a purchased pack.

curl "https://api.onekey.dev/v1/instagram/post_oembed?shortcode=CUbHfhpswxt" \
  -H "x-api-key: YOUR_API_KEY"

Fields you get back#

These unified fields come back from Instagram, with the same names as on every other platform. The count is how many of its 42 mapped endpoints return the field; a field the source lacks is null, never missing. 14 platform-specific fields (ext.<name>) come on top, documented on each endpoint page.

FieldTypeEndpoints
author.usernamestring31
content.textstring22
content.idstring20
engagement.commentsinteger18
engagement.likesinteger18
media.thumbnailUrlURL18
content.createdAtISO 8601 date17
engagement.viewsinteger15
author.avatarUrlURL13
author.idstring13
author.displayNamestring12
content.titlestring12
engagement.sharesinteger12
author.verifiedboolean11
content.urlURL11
author.followersinteger6
entity.idstring6
entity.namestring6
author.contentCountinteger3
author.followinginteger3
author.urlURL3
media.durationSecondsnumber3
author.biostring2
content.languagestring2
entity.urlURL2
media.audioUrlURL2
place.latnumber2
place.lonnumber2
author.countrystring1
author.createdAtISO 8601 date1
author.websiteURL1
engagement.bookmarksinteger1
entity.categorystring1
entity.stats.itemCountinteger1
place.addressstring1
place.citystring1

The full schema is in Unified schema.

Pricing#

Instagram calls cost 1 to 6 credits, flat per endpoint. Free when served from cache (0.2 credit for a cached response over 100 KB). Invalid, failed or not-found calls are not charged. See pricing for credit packs.