Skip to content

Instagram User Posts API

A profile grid, newest first, twelve posts per page, each with its caption, type and owner. Follow pagination.cursor for older posts. On the first page, reels also carry like, comment and play counts; other posts, and every post on later pages, have them null, because the grid does not carry them. No page carries a publish date. Fetch /v1/instagram/post for a specific post to get its counts and date, or set extra_fetch=true to fill each post's publish date, like and comment counts and caption from its own page in one call: 1 credit per item fetched, up to the page size. authorHandle is read per post: a collab or tagged post appears in a profile grid owned by the OTHER account, and this reports the real owner rather than the handle you asked for. Calls cost 1 credit each. A cache hit is free, and a failed or empty response is never charged.

Try it

Prefilled with the request that produced the example below. No key yet? Get a free key.

Request

GET/v1/instagram/user-posts
ParameterTypeRequiredDescription
handlestringyesHandle (@nike), or a full instagram.com profile URL
cursorstringnopagination.cursor from a previous response
countnumbernoPosts per page, 1-12. Default 12.
extra_fetchbooleannoWhen true, fetches each item's own page to fill fields the list page leaves null. Costs 1 extra credit per page fetched, up to the page size.
next_max_idstringnopagination.cursor from a previous response

Also accepts cache_max_age (a hit costs 0 credits) and include_raw (returns the untouched upstream payload under raw).

curl
curl "$API/v1/instagram/user-posts?handle=natgeo&cache_max_age=7d" \
  -H "x-api-key: $KEY"
JavaScript
const query = new URLSearchParams({
  handle: 'natgeo',
  cache_max_age: '7d',
});

const response = await fetch(`${API}/v1/instagram/user-posts?${query}`, {
  headers: { 'x-api-key': KEY },
});

const body = await response.json();
if (!body.success) throw new Error(body.error.code);

// 1 credit, 0 on a cache hit
console.log(body.data, body.meta.creditsCharged);
Python
import os, httpx

r = httpx.get(
    f"{os.environ['API']}/v1/instagram/user-posts",
    params={
        "handle": "natgeo",
        "cache_max_age": "7d",
    },
    headers={"x-api-key": os.environ["KEY"]},
    timeout=30,
)

body = r.json()
if not body["success"]:
    raise RuntimeError(body["error"]["code"])

print(body["data"], body["meta"]["creditsCharged"])

Example response

Captured on , with raw removed and lists cut to two items. A live call returns current data.

response
{
  "success": true,
  "data": {
    "items": [
      {
        "platform": "instagram",
        "id": "DeuOR-CjKE9",
        "type": "image",
        "url": "https://www.instagram.com/p/DeuOR-CjKE9/",
        "title": null,
        "text": "Some of the best reasons to travel in 2027 are far from the usual destinations. 🌎\n\nNational Geographic’s picks for Best of the World 2027 are here and features 25 destinations across six continents. \n\nWhether you're drawn to places steeped in history or the thrill of exploring the wild, there's no shortage of experiences worth planning a trip around. \n\nFind your next adventure and see our full #BestOfTheWorld 2027 guide at the link in bio. \n\nPhotograph by Thomas Ekström",
        "authorId": "787132",
        "authorHandle": "natgeo",
        "authorName": null,
        "thumbnailUrl": "https://scontent.cdninstagram.com/v/t51.82787-15/858921974_18710195065019133_277441153414192961_n.jpg?stp=dst-jpg_e35_s640x640_tt6&_nc_cat=1&ccb=7-5&_nc_sid=18de74&efg=eyJlZmdfdGFnIjoiRkVFRC5iZXN0X2ltYWdlX3VybGdlbi5DMyJ9&_nc_ohc=ErSyvJ9V2VoQ7kNvwFAuIlW&_nc_oc=AdoqJ8fFtQYFS6Mg_LaSO59XA_37VJ_rb6j-HIi5iEoAbkA6jrbeELEuc-11zEAGsZw&_nc_zt=23&_nc_ht=scontent.cdninstagram.com&_nc_gid=fegzayhGAw-wO8QIwDVzOQ&_nc_ss=70a8c&oh=00_AQPijzHhQRnSSQUdNUPc1jJuifFJbTNgfLKm7BN-XAqwLg&oe=6ADDEA5E",
        "mediaUrls": [],
        "durationSeconds": null,
        "viewCount": null,
        "likeCount": null,
        "commentCount": null,
        "shareCount": null,
        "hashtags": [
          "BestOfTheWorld"
        ],
        "mentions": [],
        "isSponsored": null,
        "publishedAt": null,
        "fetchedAt": "2026-10-21T01:53:04.125Z"
      },
      {
        "platform": "instagram",
        "id": "DehZj9wggt0",
        "type": "reel",
        "url": "https://www.instagram.com/reel/DehZj9wggt0/",
        "title": null,
        "text": "Keeping up with a pack of hunting wolves is just another day at the office for @bertiegregory and his team.\n\n#WolvesUpClose with Bertie Gregory premieres Friday, November 6 at 8/7c on National Geographic. Streaming on @DisneyPlus and @hulu.",
        "authorId": "787132",
        "authorHandle": "natgeo",
        "authorName": null,
        "thumbnailUrl": "https://scontent.cdninstagram.com/v/t51.82787-15/849098148_18708313780019133_730867734770692515_n.jpg?stp=dst-jpg_e35_s640x640_tt6&_nc_cat=111&ccb=7-5&_nc_sid=18de74&efg=eyJlZmdfdGFnIjoiQ0xJUFMuYmVzdF9pbWFnZV91cmxnZW4uQzMifQ%3D%3D&_nc_ohc=rG4S4sXViaUQ7kNvwGFbziH&_nc_oc=Adrbz4_PeKY-9oDtgeU8TEfWO1dTvqHmkPS_9HHtcLCd20ZfStSVPCWeLwYru4hCuSQ&_nc_zt=23&_nc_ht=scontent.cdninstagram.com&_nc_gid=fegzayhGAw-wO8QIwDVzOQ&_nc_ss=70a8c&oh=00_AQPn2lEBEtkfsmu8j00srescPPFGqfTrnkU-o7R27xDxwg&oe=6ADDD54C",
        "mediaUrls": [],
        "durationSeconds": null,
        "viewCount": 1347161,
        "likeCount": 52152,
        "commentCount": 388,
        "shareCount": null,
        "hashtags": [
          "WolvesUpClose"
        ],
        "mentions": [
          "bertiegregory",
          "DisneyPlus"
        ],
        "isSponsored": null,
        "publishedAt": null,
        "fetchedAt": "2026-10-21T01:53:04.126Z"
      }
    ]
  },
  "pagination": {
    "cursor": "eyJhZnRlciI6IkFRSFRhWVEwck9KdjdhcEl2aWRWMlFMYTdHRjNsUEs1MU9UZmdaMkhza2Y4M3ozbGVoOVVRZmNTUUlEZTlfMDdlNjh0S3N1LWYxX3FmNkxLTjQ3UTZYMmxtdyIsImRvYyI6IjI3NTUzNzI1MTEwOTIzMzIxIiwiaGFuZGxlIjoibmF0Z2VvIiwicGsiOiI3ODcxMzIifQ.-tMd0FEN9MGf6fcbHh36Lg",
    "hasMore": true,
    "count": 12
  },
  "meta": {
    "platform": "instagram",
    "endpoint": "instagram.userPosts",
    "creditsCharged": 1,
    "cached": false,
    "cacheAgeSeconds": null,
    "durationMs": 2784,
    "requestId": "req_6urcyugvca0t7275mk58"
  }
}

Returns

Returns a list of Post in data.items.

Cost and behaviour

Credits1 per live request, 0 on a cache hit
Cacheableyes: cache_max_age accepts a cached copy
Batchableyes: usable as a target in POST /v1/jobs/batch
Subscribableyes: as often as every 3600 seconds, firing a webhook only on a change

Other Instagram endpoints