Instagram API
Public-data Instagram endpoints.
Public-data Instagram endpoints.
When To Use This API
The Instagram API is for agent workflows that need public, platform-native data without writing a custom collector for every task. Use it when a prompt needs evidence from live social records, when a Skill needs repeatable enrichment, or when product code needs the same contract an agent discovered through MCP.
This section lists 34 live Instagram operations from the canonical OpenAPI spec. Each operation page documents the route, method, parameters, response envelope, pagination behavior when available, and the error vocabulary shared across UnifAPI.
- Audit public creator profiles before outreach, including recent post activity and profile context.
- Pull post, reel, comment, and location data into social listening or competitor research workflows.
- Resolve URL-visible identifiers into stable response shapes that agents can compare across platforms.
Agent Contract Notes
Agents usually discover these endpoints with the hosted UnifAPI MCP server, inspect the operation schema, then call only the records needed for the current task. Developers can call the same endpoints over HTTP with an API key, which makes the path from exploratory agent run to production integration direct.
Every successful response uses a stable envelope with a request id, data payload, optional pagination cursor, and billing metadata. Errors use the same closed vocabulary across platforms, so retry logic, user-facing explanations, and cost reporting can stay consistent even when a workflow spans multiple public-data sources.
When you are choosing an operation, start from the public identifier the user already has: a profile username, post id, channel id, subreddit name, search term, or URL-derived slug. Prefer the narrowest endpoint that answers the question, then expand only when the agent needs more evidence. This keeps record usage predictable, makes citations easier to explain, and avoids turning a focused research task into an expensive crawl.
Operations
Explore
GET /instagram/explore— Browse Instagram's Explore feed — Return a flattened feed of posts from Instagram's Explore tab — the algorithmic discovery surface — as a paginated list.GET /instagram/explore/sections/{id}/posts— Browse posts in an Instagram Explore section — Return the current batch of posts in a known Explore category (for example, Games: 10156104417160727).
Hashtags
GET /instagram/hashtags/{tag}/posts— List Instagram posts for a hashtag — Return posts under an Instagram hashtag as a cursor-paginated list.
Locations
GET /instagram/locations/{id}/nearby— List Instagram locations geographically near a given location — Return the Instagram location pages geographically near a given location ID, as a fixed set of nearby map pins.GET /instagram/locations/{id}/posts— List posts tagged with an Instagram location — Return the posts tagged with a given Instagram location, by location ID, as a paginated list.GET /instagram/locations/{id}— Get an Instagram location by id — Return an Instagram location page by its ID, including its name, coordinates, and category.GET /instagram/locations/cities/{cityId}/places— List Instagram places in a city — Browse Instagram's place directory using a city ID from /instagram/locations/countries/{countryCode}/cities.GET /instagram/locations/countries/{countryCode}/cities— List Instagram cities in a country — Browse Instagram's location directory by two-letter country code, such as US.GET /instagram/locations/search— Search Instagram locations by coordinates — Return Instagram location pages near a latitude and longitude as a fixed, non-paginated list.
Posts
GET /instagram/posts/{shortcode}/comments/{commentId}/replies— 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.GET /instagram/posts/{shortcode}/comments— List comments on an Instagram post — Return the comments on an Instagram post by its shortcode, as a cursor-paginated list.GET /instagram/posts/{shortcode}/download— Get downloadable media URLs for an Instagram post — Get image or video URLs and previews for a public post or carousel.GET /instagram/posts/{shortcode}/likes— List users who liked an Instagram post — Return the public profiles visible in Instagram's liker list for a post shortcode.GET /instagram/posts/{shortcode}— Get an Instagram post (photo / video / carousel / reel) by shortcode —shortcodeis the slug from the post URL, e.g.
Reels
GET /instagram/reels/recommended— Browse Instagram's recommended Reels feed — Return posts from Instagram's algorithmic recommended Reels feed, as a paginated list.
Resolve
GET /instagram/resolve/media-id— Convert an Instagram post shortcode into its numeric media_id — Convert an Instagram post shortcode into its numericmedia_id.GET /instagram/resolve/shortcode-from-media— Convert an Instagram numeric media_id into its shortcode — Convert a numeric Instagrammedia_idback into its post shortcode — the inverse of the shortcode-to-media-id lookup.GET /instagram/resolve/shortcode— Extract a post shortcode from an Instagram URL — Extract the post shortcode from a full Instagram post URL (e.g.GET /instagram/resolve/user-id— Convert an Instagram username into its numeric user_id (pk) — Convert an Instagram username into its numeric user ID.GET /instagram/resolve/username— Resolve an Instagram user ID to a username — Resolve a numeric Instagram user ID to its current username and canonical public profile.
Search
GET /instagram/search/hashtags— Search Instagram hashtags — Find Instagram hashtags matching a keyword, including public post counts when available.GET /instagram/search/places— Search Instagram places by keyword — Find Instagram places matching a name or keyword.GET /instagram/search— Cross-type Instagram search (posts/reels) — Search Instagram across content types (posts and reels) by query string, returning matching results as a paginated list.GET /instagram/search/users— Search Instagram accounts — Search public Instagram accounts by name or keyword.
Users
GET /instagram/users/{username}/followers— List followers of an Instagram user — Return the accounts that follow a given Instagram user, by username, as a paginated list of profiles.GET /instagram/users/{username}/following— List accounts an Instagram user follows — Return the accounts a given Instagram user follows, by username, as a paginated list of profiles.GET /instagram/users/{username}/former-usernames— List former usernames for an Instagram user — Return the former usernames an Instagram account has used, surfaced from Instagram's account-transparency information.GET /instagram/users/{username}/highlights— 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.GET /instagram/users/{username}/posts— List feed posts authored by an Instagram user — Return the feed posts authored by an Instagram user, by username, as a paginated list.GET /instagram/users/{username}/reels— List reels authored by an Instagram user — Return the reels (short-form videos) authored by an Instagram user, by username, as a paginated list.GET /instagram/users/{username}— 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.GET /instagram/users/{username}/similar— List accounts similar to an Instagram user — Return Instagram's recommended similar accounts for a username.GET /instagram/users/{username}/stories— List active Instagram stories for a user — Returns the user's currently-live story tray (empty when the user has no active stories).GET /instagram/users/{username}/tagged-posts— List posts an Instagram user is tagged in — Return the posts a given Instagram user is tagged in, by username, as a paginated list.