Instagram data API

Instagram Posts API

Pull the latest photos, videos and carousels from any public Instagram profile. Every item includes the caption, like and comment counts, a timestamp and ready-to-use media links, and you page through the feed with a cursor.

Request

GET /v1/profiles/{username}/posts · 1 credit per successful call

cURL
curl "https://api.igramapi.com/v1/profiles/example_creator/posts" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

200 OK · application/json
{
  "username": "example_creator",
  "items": [
    {
      "shortcode": "Cx1AbCdEfGh",
      "media_id": "3012345678901234567",
      "type": "video",
      "thumbnail": "https://scontent.cdninstagram.com/v/example/thumb.jpg",
      "caption": "Behind the scenes from today's shoot",
      "like_count": 5230,
      "comment_count": 112,
      "duration": 14.2,
      "taken_at": 1761900000,
      "like_and_view_counts_hidden": false,
      "downloads": [
        {
          "type": "video",
          "url": "https://scontent.cdninstagram.com/v/example/clip.mp4",
          "thumbnail": "https://scontent.cdninstagram.com/v/example/thumb.jpg",
          "quality": "HD Video"
        }
      ]
    }
  ],
  "page": {
    "has_next_page": true,
    "end_cursor": "QVFDX2V4YW1wbGVjdXJzb3I"
  },
  "cached": false
}

All values above are made-up examples. Media links are temporary Instagram CDN addresses.

Parameters

NameInDescription
usernamerequired path Instagram username.
cursor query Pass `page.end_cursor` from the previous response to get the next page.

Response fields

FieldTypeDescription
items[].shortcodestringPost identifier used in instagram.com/p/{shortcode}.
items[].typestringvideo, image or carousel.
items[].captionstring | nullCaption text.
items[].like_count / comment_countintegerEngagement counts.
items[].taken_atinteger | nullUnix timestamp.
items[].downloads[]object[]type, url, thumbnail and quality of each media file.
page.has_next_page / end_cursorboolean / stringPagination state.

Photos, videos and carousels

Each item has a type and a downloads list. Carousels return one download per slide.

Engagement included

Likes, comments, duration and the posting time on every item, so you can rank content without extra calls.

Simple pagination

A single cursor value. Keep requesting until page.has_next_page is false.

Hidden likes flagged

When an account hides like counts, like_and_view_counts_hidden is true so a zero is never mistaken for real data.

How the Instagram posts API paginates

The first request returns the newest posts and a page object. Send page.end_cursor as the cursor query parameter to get the next batch. Each page costs one credit, regardless of how many posts it contains.

Store the cursor if you want to resume later, and keep the shortcode of each post to deduplicate between runs.

Media links expire

The url fields point to Instagram's CDN and stop working after a while. For a link that stays valid, send the URL to the Downloader API, which returns a download link to a stored copy.

Frequently asked questions

How many posts come back per request?

One page of the profile's recent posts. Use the cursor to keep going; each page is billed as one credit.

Does it include reels?

Reels that appear in the profile feed are included. To list a profile's reels specifically, use the Reels API.

Can I get posts of a private account?

No. Private accounts return an error with the code `private_account` and no credits are charged.

Are likes always accurate?

They are the counts Instagram shows at request time. If the owner hides them, the response says so instead of returning a misleading zero.

Errors cost nothing. Any response with a status of 400 or above is refunded, and every error has the same shape. See error handling and credits and rate limits.

Try the Posts API free

Create a key and make your first request in minutes. 100 free credits every month.