API Anything

Instagram APIunofficial

Public Instagram profiles, logged out: profile details and the 12 most recent posts, read from the Relay data embedded in the server-rendered profile page.

all live 2 operations, checked by the installs that call them.

Try it

Set up API Anything for your agents:

npx -y api-anything setup

Then ask your agent, which finds this site by itself, or call it from a shell:

api-anything pull instagram
api-anything call instagram getPosts username=nasa

Operations

OperationMethodLoginWritesStatus
getPosts(username) -> node.code, node.caption.text, node.accessibility_caption, node.media_type, node.product_type, node.display_uri

Recent posts (up to 12) of a public profile by username: shortcode, caption, media type, image URL

GET no no Live0 confirmations
getProfile(username) -> pk, username, full_name, biography, follower_count, following_count, is_verified, is_private, profile_pic_url, bio_links

Public profile by username: bio, full name, follower/following counts, verified flag, bio links

GET no no Live0 confirmations

Notes

No account is needed.

  • Logged out, getPosts gives only the first 12 posts. There is no pagination, and posts have no timestamp or like and comment counts.
  • Post fields are flat dotted keys ("node.code"). node.code is the shortcode, so the post is instagram.com/p/<code>/.
  • profile_pic_url and display_uri are signed CDN URLs that expire (oe= parameter).
  • A username that doesn't exist returns input.
  • Heavy use may bring up Instagram's login wall. A call would then return auth.

About these operations

Each operation is a request learned from Instagram's own web pages: API Anything replays it over plain HTTP and falls back to a browser when it must. Read them as JSON.

← All shared sites