Instagram API for AI agents
Read public Instagram profiles, posts, reels, stories, highlights, comments, audio, transcripts and location pages by username or shortcode.
Using ChatGPT, Claude Code or another client? See the setup steps
Use Instagram records as evidence, not glue code.
UnifAPI keeps the public Instagram surface discoverable through MCP and callable over HTTP. Agents can inspect the schema, fetch only the records needed for the task, and return the result with request, pagination, and billing metadata intact.
Benchmark public profiles, posts, reels, stories, comments, and location pages for creator or competitor research.
Resolve URL-visible usernames and shortcodes into normalized records an agent can compare against TikTok, YouTube, X, or Reddit evidence.
Feed social listening, content audit, and influencer discovery Skills without asking the user to wire a separate Instagram collector.
Agents & Skills that use the Instagram API
You rarely call an API by hand. These prebuilt agents and skills already read Instagram records inside Claude or Codex — start from one of them, or call the endpoints below yourself.
41 ready-to-call endpoints
Get an Instagram audio track
Returns an Instagram audio track (song or original audio) by id: title, artist, duration and usage count. Returns `not_found` when it does not exist.
List Instagram posts that use an audio track
Returns Reels and posts that use an Instagram audio track. Paginate with `cursor`.
Browse Instagram's Explore feed
Return a flattened feed of posts from Instagram's Explore tab — the algorithmic discovery surface — as a paginated list. Useful for sampling trending and recommended public content across the platform.
Get an Instagram hashtag
Returns an Instagram hashtag page summary: name, post count and related information. Returns `not_found` when the hashtag does not exist.
List Instagram posts for a hashtag
Return posts under an Instagram hashtag as a cursor-paginated list. Pass the tag without the leading `#`.
Get an Instagram story highlight
Returns one Instagram story highlight by id with its title, cover and story items. Returns `not_found` when the highlight does not exist.
Get an Instagram location by id
Return an Instagram location page by its ID, including its name, coordinates, and category. Useful for resolving a place before pulling its tagged posts or nearby locations.
List Instagram locations near a location
Return the Instagram location pages geographically near a given location ID, as a fixed set of nearby map pins. Useful for local discovery and clustering place-tagged content by area.
List posts tagged with an Instagram location
Return the posts tagged with a given Instagram location, by location ID, as a paginated list. Useful for local content monitoring, event coverage, and place-based audience research.
Search Instagram locations by coordinates
Return Instagram location pages near a latitude and longitude as a fixed, non-paginated list.
Get an Instagram post by shortcode
`shortcode` is the slug from the post URL, e.g. `DUajw4YkorV` in `instagram.com/p/DUajw4YkorV/`.
List comments on an Instagram post
Return the comments on an Instagram post by its shortcode, as a cursor-paginated list. Useful for analyzing audience response and sentiment around a post.
List replies to an Instagram comment
Return the replies to a specific comment on an Instagram post, identified by the post shortcode and comment ID, as a paginated list. Useful for following threaded conversations and analyzing audience discussion.
Get downloadable media URLs for an Instagram post
Get image or video URLs and previews for a public post or carousel. URLs expire; request fresh links before downloading. Returns one post containing its media assets.
List users who liked an Instagram post
Return the public profiles visible in Instagram's liker list for a post shortcode. Instagram returns this as a fixed set without pagination.
Get the transcript of an Instagram video
Returns the spoken-word transcript of an Instagram video post or Reel by shortcode, for videos up to a few minutes long. Returns `not_found` when the post does not exist.
Browse Instagram's recommended Reels feed
Return posts from Instagram's algorithmic recommended Reels feed, as a paginated list. Useful for sampling trending short-form video and discovering surfacing creators.
List trending Instagram Reels
Returns the Reels currently trending on Instagram with captions, owners, play counts and video URLs.
Resolve an Instagram shortcode to a media ID
Convert an Instagram post shortcode into its numeric `media_id`. A lookup helper — useful for pre-resolving and caching the ID that some media-level operations require. Computed locally; it does not check that the post exists.
Extract a post shortcode from an Instagram URL
Extract the post shortcode from a full Instagram post URL (e.g. `instagram.com/p/<shortcode>`). A lookup helper — useful for normalizing user-supplied links before fetching a post.
Convert an Instagram numeric media_id into its shortcode
Convert a numeric Instagram `media_id` back into its post shortcode — the inverse of the shortcode-to-media-id lookup. Useful for reconstructing shareable post URLs from stored IDs. Accepts the `<media_id>_<owner_id>` form too. Computed locally; it does not check that the post exists.
Convert an Instagram username into its numeric user_id (pk)
Convert an Instagram username into its numeric user ID. A lookup helper — useful for pre-resolving and caching the ID so later profile and media calls skip the extra resolution step.
Resolve an Instagram user ID to a username
Resolve a numeric Instagram user ID to its current username and canonical public profile. This is the inverse of `/instagram/resolve/user-id`.
Cross-type Instagram search (posts/reels)
Search Instagram across content types (posts and reels) by query string, returning matching results as a paginated list. Useful for keyword, hashtag, and topic discovery on the platform.
Search Instagram audio
Returns Instagram audio tracks (songs and original audio) that match a keyword, with ids for /instagram/audio/{id}.
Search Instagram hashtags
Find Instagram hashtags matching a keyword, including public post counts when available. Returns one batch without pagination. Use /instagram/hashtags/{tag}/posts to retrieve posts.
Search Instagram places by keyword
Find Instagram places matching a name or keyword. Coordinates and street addresses are included when available. Returns one batch without pagination; this does not perform a nearby-coordinate search.
Search Instagram Reels
Returns Instagram Reels that match a keyword with captions, owners, play counts and video URLs. Paginate with `cursor`.
Search Instagram accounts
Search public Instagram accounts by name or keyword. Returns the available ranked matches in one batch; pagination is not supported.
List posts for an Instagram topic
Returns posts and Reels that Instagram groups under a topic such as `harry potter`. Paginate with `cursor`.
Get an Instagram user profile by username
Return the canonical public Instagram profile for a username — display name, bio, follower and following counts, post count, verification status, and profile picture. Useful as the entry point for any account-level research.
Audit an Instagram account's engagement
Returns an engagement audit of a public Instagram account from its recent posts: engagement rate, average likes and comments, best and worst posts, content segments and outliers. Returns `not_found` when the account does not exist or is private.
List followers of an Instagram user
Return the accounts that follow a given Instagram user, by username, as a paginated list of profiles. Useful for audience analysis and mapping a creator's or brand's following.
List accounts an Instagram user follows
Return the accounts a given Instagram user follows, by username, as a paginated list of profiles. Useful for mapping an account's interest graph and the people it engages with.
Count an Instagram user's former usernames
Return how many times an Instagram account has changed its username, with the month it joined and the country it is based in, from Instagram's About this account information. Instagram shows the count only, not the former usernames or the dates they changed. Useful for identity verification and spotting rebrands.
List Instagram highlight reels for a user (metadata only)
Return the metadata for an Instagram user's highlight reels (titles and covers); the stories inside each highlight are not included. Useful for cataloging a profile's pinned highlights.
List feed posts authored by an Instagram user
Return the feed posts authored by an Instagram user, by username, as a paginated list. Useful for profiling a creator's content, monitoring a brand, or building an archive.
List reels authored by an Instagram user
Return the reels (short-form videos) authored by an Instagram user, by username, as a paginated list. Useful for analyzing a creator's video output and performance.
List accounts similar to an Instagram user
Return Instagram's recommended similar accounts for a username.
List active Instagram stories for a user
Returns the user's currently-live story tray (empty when the user has no active stories).
List posts an Instagram user is tagged in
Return the posts a given Instagram user is tagged in, by username, as a paginated list. Useful for tracking brand mentions, collaborations, and user-generated content.
APIs to pair with Instagram
YouTube API
Channels, videos, comments, captions, playlists, hashtags, search, trending
LinkedIn API
People, companies, posts, jobs, ads, search
Twitter / X API
Users, posts, search, trends, lists, communities
TikTok API
Videos, creators, comments, hashtags, music
Threads API
Posts, replies, reposts, search
Amazon API
Creator storefronts