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#
| Endpoint | What it does | Parameters | Credits | Status |
|---|---|---|---|---|
audio_reels | List Instagram reels using an audio track. | audio_id*, cursor | 2 | beta needs a pack |
basic_profile | Basic Instagram profile by user id. | user_id* | 2 | beta needs a pack |
comment | Look up one Instagram comment by post URL. | url* | 2 | beta needs a pack |
comment_likers | List accounts that liked an Instagram comment. | comment_id*, cursor | 2 | beta needs a pack |
comments | Comments on an Instagram post (needs the numeric media id). | media_id* | 3 | beta needs a pack |
engagement | Get Instagram engagement statistics. | handle* | 2 | beta needs a pack |
followers | Followers of an Instagram user (login-gated: needs a session cookie). | user_id* | 6 | beta needs a pack |
following | Accounts an Instagram user follows (login-gated: needs a session cookie). | user_id* | 6 | beta needs a pack |
hashtag | Instagram hashtag info: post count. | tag* | 2 | beta needs a pack |
highlight_detail | Get the items inside one Instagram story highlight. | id* | 2 | beta needs a pack |
highlights | Story highlights tray of an Instagram user (login-gated). | user_id* | 2 | beta needs a pack |
location | Get an Instagram location's profile. | location_id* | 2 | beta needs a pack |
location_posts | List recent posts at an Instagram location. | location_id*, cursor | 3 | beta needs a pack |
media_screen_text | Get Instagram post on-screen text. | url* | 2 | beta needs a pack |
media_transcript | Get Instagram media transcript. | url* | 2 | beta needs a pack |
music_trending | List trending Instagram music. | - | 3 | beta needs a pack |
post | A single Instagram post/reel by shortcode (graphql doc_id drifts, override via param). | shortcode*, doc_id | 2 | beta needs a pack |
post_comment_replies | List replies under an Instagram comment. | url*, comment_id*, cursor | 2 | beta needs a pack |
post_likers | List Instagram post likers. | url* | 3 | beta needs a pack |
post_oembed | Instagram post oEmbed: caption, author, thumbnail (public posts). | shortcode* | 1 | stable may need a pack |
post_stats | Get Instagram post stats including the share count. | url* | 2 | beta needs a pack |
posts | Recent posts of an Instagram profile (public accounts). | handle*, cursor | 2 | beta needs a pack |
profile | Instagram profile: bio, followers, following, post count, verification, avatar. | handle* | 2 | beta needs a pack |
profile_about | Get Instagram account transparency details. | handle* | 2 | beta needs a pack |
profile_full | Instagram profile, recent posts, and computed analytics in one call. | handle* | 2 | beta needs a pack |
profile_posts_full | Instagram posts with views, likes, comments, and per-post share counts where available, in one call. | handle, user_id | 3 | beta needs a pack |
profile_reels_full | Instagram reels with views, likes, comments, and per-reel share counts where available, in one call. | handle, user_id | 3 | beta needs a pack |
reels | Recent reels (video timeline) of an Instagram profile. | handle*, cursor | 2 | beta needs a pack |
reels_trending | Get trending Instagram reels. | - | 3 | beta needs a pack |
search | Search Instagram accounts, hashtags and places. | query* | 2 | beta needs a pack |
search_hashtags | Search Instagram hashtags by keyword (topsearch). | q* | 2 | beta needs a pack |
search_location | Search Instagram locations. | query* | 3 | beta needs a pack |
search_music | Search Instagram music. | query*, cursor | 3 | beta needs a pack |
search_popular | Search popular Instagram posts. | query*, cursor | 2 | beta needs a pack |
search_reels | Search Instagram reels. | query*, cursor | 2 | beta needs a pack |
search_users | Search Instagram users by keyword (topsearch). | q* | 2 | beta needs a pack |
similar | List similar Instagram accounts. | handle, user_id | 3 | beta needs a pack |
stories | List an Instagram user's active stories. | handle, user_id | 3 | beta needs a pack |
story_download | Download a single Instagram story. | story_id*, user_id, handle | 2 | beta needs a pack |
tagged | List posts an Instagram user is tagged in. | handle, user_id, cursor | 3 | beta needs a pack |
user_embed | Get Instagram user embed HTML. | handle* | 2 | beta needs a pack |
username_suggestions | Get Instagram username suggestions. | query* | 3 | beta 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.
| Field | Type | Endpoints |
|---|---|---|
author.username | string | 31 |
content.text | string | 22 |
content.id | string | 20 |
engagement.comments | integer | 18 |
engagement.likes | integer | 18 |
media.thumbnailUrl | URL | 18 |
content.createdAt | ISO 8601 date | 17 |
engagement.views | integer | 15 |
author.avatarUrl | URL | 13 |
author.id | string | 13 |
author.displayName | string | 12 |
content.title | string | 12 |
engagement.shares | integer | 12 |
author.verified | boolean | 11 |
content.url | URL | 11 |
author.followers | integer | 6 |
entity.id | string | 6 |
entity.name | string | 6 |
author.contentCount | integer | 3 |
author.following | integer | 3 |
author.url | URL | 3 |
media.durationSeconds | number | 3 |
author.bio | string | 2 |
content.language | string | 2 |
entity.url | URL | 2 |
media.audioUrl | URL | 2 |
place.lat | number | 2 |
place.lon | number | 2 |
author.country | string | 1 |
author.createdAt | ISO 8601 date | 1 |
author.website | URL | 1 |
engagement.bookmarks | integer | 1 |
entity.category | string | 1 |
entity.stats.itemCount | integer | 1 |
place.address | string | 1 |
place.city | string | 1 |
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.