Instagram API: List recent posts
Lists the latest publicly embeddable posts and reels from an Instagram account, newest first. Without login Instagram may show fewer posts than requested. View counts that are not available are null.
Unofficial. Not affiliated with or endorsed by Instagram.
Inputs
Values from the run on Oct 23, 2026, shown under Output.
- Username, required
username Instagram account name, @name, or profile link, for example natgeo.
natgeo
- Max Results optional
max_results Most posts to return, for example 12. Instagram may publicly show fewer.
12 (default)
Whole number from 1 to 50.
Input as JSON
{ "username": "natgeo"}Output
{ "posts": [ { "caption": "Drumroll, please. The people have voted, and Catalina Island, U.S.A., is the winner of National Geographic's Best of the World 2027 Readers' Choice! 🌎 \n\nJust an hour by ferry from Long Beach, California, visitors can explore 165 miles (265 km) of trails across this roughly 48,000-acre island that's…", "post_url": "https://www.instagram.com/p/Dez5emgl2nl/" , "image_url": "https://scontent-sea5-1.cdninstagram.com/v/t51.82787-15/861148448_18710930716019133_2222318640552106630_n.jpg?stp=dst-jpg_e35_tt6&_nc_cat=1&ig_cache_key=NDAxMzgwNDQ4NDUwMTY2MjE4MQ%3D%3D.3-ccb7-5&ccb=7-5&_nc_sid=58cdad&efg=eyJ2ZW5jb2RlX3RhZyI6IkZFRUQueHBpZHMuMTA4MC5zZHIucmVndWxhcl9waG90by5DMyJ9&_nc_o…" , "is_pinned": false, "post_type": "photo", "posted_at": "2026-10-22T21:00:10+00:00", "shortcode": "Dez5emgl2nl", "like_count": 8731, "view_count": null, "comment_count": 79 }, { "caption": "Presented by @Rolex. Rehabilitating baby pangolins doesn't just mean keeping them safe and fed, it also involves teaching them how to keep themselves fed in the wild. That's why pangolin handlers at the Tikki Hywood Foundation take young pangolins for walks in the woods every day, showing them where…", "post_url": "https://www.instagram.com/reel/DezlNmyAFeu/" , "image_url": "https://scontent-sea5-1.cdninstagram.com/v/t51.82787-15/857819563_18710887837019133_8886683641971152855_n.jpg?stp=dst-jpg_e15_tt6&_nc_cat=1&ig_cache_key=NDAxMzcxNTM1NTYzMjQyNDg3OA%3D%3D.3-ccb7-5&ccb=7-5&_nc_sid=58cdad&efg=eyJ2ZW5jb2RlX3RhZyI6IkNMSVBTLnhwaWRzLjEwODAuc2RyLnZpZGVvX2RlZmF1bHRfY292ZXJfZn…" , "is_pinned": false, "post_type": "reel", "posted_at": "2026-10-22T18:04:21+00:00", "shortcode": "DezlNmyAFeu", "like_count": 76597, "view_count": 393637, "comment_count": 197 }, { "caption": "No wrong answers to this question.\n\n#IndiaFromAbove is now streaming on @disneyplus", "post_url": "https://www.instagram.com/reel/DexcZdvAHXT/" , "image_url": "https://scontent-sea5-1.cdninstagram.com/v/t51.82787-15/850269475_18710631136019133_842514770738734313_n.jpg?stp=dst-jpg_e15_tt6&_nc_cat=109&ig_cache_key=NDAxMzExMzYzODE4MDEyNDExNQ%3D%3D.3-ccb7-5&ccb=7-5&_nc_sid=58cdad&efg=eyJ2ZW5jb2RlX3RhZyI6IkNMSVBTLnhwaWRzLjEwODAuc2RyLnZpZGVvX2RlZmF1bHRfY292ZXJfZ…" , "is_pinned": false, "post_type": "reel", "posted_at": "2026-10-21T22:08:24+00:00", "shortcode": "DexcZdvAHXT", "like_count": 15227, "view_count": 126067, "comment_count": 92 } ]}Code
curl https://api.fous.com/v1/runs \ -H "Authorization: Bearer $FOUS_API_KEY" \ -H "Content-Type: application/json" \ -d '{"method":"instagram.com/list_recent_posts","input":{"username":"natgeo"}}' # Save as fous.py, then run: python3 fous.pyimport json, os, timefrom urllib.error import HTTPErrorfrom urllib.request import Request, urlopenAPI = "https://api.fous.com/v1/runs" KEY = os.environ["FOUS_API_KEY"]HEADERS = { "Authorization": f"Bearer {KEY}", "Content-Type": "application/json" ,}def call(url, body=None): data = json.dumps(body).encode() if body else None request = Request(url, data, HEADERS) try: with urlopen(request, timeout=120) as r: return r.status, json.load(r) except HTTPError as error: message = json.load(error)["error"]["message"] raise RuntimeError(message) from errorstatus, run = call(API, { "method": "instagram.com/list_recent_posts" , "input": { "username": "natgeo" }})# 202: still going after 30 s. Ask again until it ends.while status == 202: time.sleep(2) status, run = call(f"{API}/{run['id']}")print(json.dumps(run["data"], indent=2))// Save as fous.mjs, then run: node fous.mjsconst api = "https://api.fous.com/v1/runs" ;const headers = { Authorization: `Bearer ${process.env.FOUS_API_KEY}`, "Content-Type": "application/json" ,};let response = await fetch(api, { method: "POST", headers, body: JSON.stringify({ "method": "instagram.com/list_recent_posts" , "input": { "username": "natgeo" } }), signal: AbortSignal.timeout(120_000),});let run = await response.json();// 202: still going after 30 s. Ask again until it ends.while (response.status === 202) { await new Promise((done) => setTimeout(done, 2_000)); response = await fetch(`${api}/${run.id}`, { headers }); run = await response.json();}if (!response.ok) throw new Error(run.error.message);console.log(run.data);# Connect your agent to Fous once, over MCP (Streamable HTTP):# https://api.fous.com/mcp# Set FOUS_API_KEY first: create a key at https://app.fous.com/keys.# Claude Codeclaude mcp add \ --scope user \ --transport http fous https://api.fous.com/mcp \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Codexcodex mcp add fous \ --url https://api.fous.com/mcp \ --bearer-token-env-var FOUS_API_KEY# Cursor, VS Code, Windsurf, Cline and morenpx -y add-mcp https://api.fous.com/mcp -g -n fous \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Then ask your agent:# "Use Fous to run instagram.com/list_recent_posts# with {"username":"natgeo"}"Over HTTP, the answer’s data holds the output. A run still going after 30 seconds answers 202 with its id: ask GET /v1/runs/{id} until it ends.
Schema
Input schema
{ "type": "object", "required": [ "username" ], "properties": { "username": { "type": "string", "description": "Instagram account name, @name, or profile link, for example natgeo." }, "max_results": { "type": "integer", "default": 12, "maximum": 50, "minimum": 1, "description": "Most posts to return, for example 12. Instagram may publicly show fewer." } }}Output schema
{ "type": "object", "required": [ "posts" ], "properties": { "posts": { "type": "array", "items": { "type": "object", "properties": { "caption": { "type": [ "string", "null" ] }, "post_url": { "type": "string" }, "image_url": { "type": [ "string", "null" ] }, "is_pinned": { "type": "boolean" }, "post_type": { "enum": [ "photo", "video", "reel", "carousel" ], "type": "string" }, "posted_at": { "type": "string" }, "shortcode": { "type": "string" }, "like_count": { "type": [ "integer", "null" ] }, "view_count": { "type": [ "integer", "null" ] }, "comment_count": { "type": [ "integer", "null" ] } } } } }}- Price
- 1 credit per completed run (1¢ with pay as you go); failed runs are free.
- Method
instagram.com/list_recent_posts- Returns
- post type, caption, posted time, likes, comments, views, pinned flag, image URL, post URL
Use it from your agent
Give your agent this line. It reads SKILL.md, gets a Fous API key and connects the Fous MCP server. Its run then takes the method instagram.com/list_recent_posts with the inputs above.
Ask your agent
- Show me the latest 10 posts and reels from the natgeo account, newest first, with likes and comments
- What are the most recent Instagram posts from @nasa? Include captions and view counts if available.
- Pull up the last 20 posts from the nytimes profile link, including which ones are pinned.
- I want to see recent reels from a creator named travelwithjess — list their newest uploads with post URLs.
- Can you grab the 5 latest publicly embeddable posts from the bbcnews Instagram account along with their image URLs?
See more
All Instagram methodsGets an Instagram account's follower count plus its posting and engagement over the last 30 days: posts published, average views of its videos and reels, and average likes and comments per post, from a username or profile link.
instagram.com/get_engagement_stats_2Gets an Instagram account's public profile from its username, @name or profile link: name, bio, exact follower, following and post counts, verified and private flags, first bio link, profile picture and account ID.
instagram.com/get_profileLists an account's latest public Threads posts, newest first, with text, engagement counts, thumbnails and links. Only posts shown without logging in are returned.
threads.com/list_recent_postsLists an account's latest public Bluesky posts, newest first. Replies and reposts are left out unless requested; a repost's time is when the account reposted it.
bsky.app/list_recent_postsLists a Mastodon account's latest public posts, newest first. Replies and boosts are optional. Private and unlisted posts are left out.
mastodon.social/list_recent_postsLists the latest public articles by a Medium writer or publication (by username, publication name or Medium link), with dates, reading times, claps, member-only labels and tags.
medium.com/list_author_articlesLists the latest posts from a public Telegram channel preview, with text, posting time, approximate views, edit flag, forwarded source, thumbnails and post links.
t.me/list_channel_postsLists recent public posts of a Tumblr blog, optionally only those with a given tag. Private or login-only blogs cannot be read.
tumblr.com/list_blog_posts