Unif API Docs

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 22 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.

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.

Posts

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 numeric media_id.
  • GET /instagram/resolve/shortcode-from-media — 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.
  • 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/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.

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}/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.

On this page