100 free credits. No credit card required. Get a key

How to get Instagram data

Checked Code run live

Meta’s Instagram API reads your own professional account, and other Business or Creator accounts only partly, through Business Discovery and app review. A data API reads any public account for you. One GET returns an account’s posts, 12 a page with captions, likes and comment counts, 1 credit a page.

The official Instagram API

Meta’s Instagram Platform is built for managing your own professional account.

  • The Basic Display API, the old way to read personal accounts, was switched off on 4 December 2024.
  • Business Discovery returns another Business or Creator account’s follower count, media count and published media, queried through your own professional account, a Meta app and app review. Personal accounts aren’t covered.
  • No official endpoint returns another account’s comments, reels with view counts, or follower list.

Sources: Meta, “Update on Instagram Basic Display API”, 4 Sep 2024, Business Discovery.

Quick start

  1. Get a keySign up with an email code: 100 free credits, no card. An agent can sign itself up with POST https://api.groundsocial.dev/v1/agent/signup.
  2. Set it in your shellexport GROUNDSOCIAL_API_KEY=gs_live_…
  3. Make the callAn account’s posts: GET /v1/instagram/users/natgeo/posts, 1 credit.
curl "https://api.groundsocial.dev/v1/instagram/users/natgeo/posts" \
  -H "Authorization: Bearer $GROUNDSOCIAL_API_KEY"

Sample response

Trimmed from the real response on 27 November 2026: lists cut to their first items and long strings shortened. Every field is described in the tutorial.

json
{
  "items": [
    {
      "pk": "4032379434794749057",
      "id": "4032379434794749057_787132",
      "code": "Df147tCiAyB",
      "url": "https://www.instagram.com/p/Df147tCiAyB/",
      "taken_at": 1794917109,
      "media_type": 8,
      "product_type": "carousel_container",
      "caption": {
        "text": "National Geographic photographers ventured to places far and wide to capture the year’s mo…"
      },
      "like_count": 24421,
      "comment_count": 111
    }
  ],
  "more_available": true,
  "next_cursor": "eyJzIjoicG9zdHM6bmF0Z2VvIiwiYyI6IkFRSFR0RU9ISnFIRFRucTd5MEJ6U3B2UFB6Mlo1ckN4RnJienoyWVdWME…"
}

Get every page

/v1/instagram/users/natgeo/posts returns posts a page at a time, and each page costs 1 credit. Pass the response’s next_cursor back as cursor until it runs out.

// Collect up to 5 pages of posts.
const first = 'https://api.groundsocial.dev/v1/instagram/users/natgeo/posts'
const items: unknown[] = []
let cursor: string | undefined
for (let page = 0; page < 5; page++) {
  const url = new URL(first)
  if (cursor) url.searchParams.set('cursor', cursor)
  const res = await fetch(url, {
    headers: { Authorization: `Bearer ${process.env.GROUNDSOCIAL_API_KEY}` },
  })
  if (!res.ok) throw new Error((await res.json()).error.hint)
  const data = await res.json()
  items.push(...(data.items ?? []))
  cursor = data.more_available ? data.next_cursor : undefined
  if (!cursor) break
}
console.log(items.length, 'posts')

What else you can get from Instagram

What you getEndpointCredits
An account’s postsGET /v1/instagram/users/natgeo/posts1
A profile with follower countGET /v1/instagram/users/natgeo1
An account’s reelsGET /v1/instagram/users/natgeo/reels1
One post or reelGET /v1/instagram/posts/DfAWxdIFmVB1
Comments on a postGET /v1/instagram/posts/DfAWxdIFmVB/comments2
Posts for a hashtagGET /v1/instagram/search/hashtag1
Engagement rate over recent postsGET /v1/instagram/users/natgeo/engagement2

Each row links to its tutorial. Every Instagram endpoint and price: Instagram API.

Tips

  • Usernames work with or without the @, or as a profile URL; a post’s shortcode is the part after /p/ or /reel/.
  • media_type 1 is a photo, 2 a video and 8 a carousel; product_type says clips for reels.
  • Track growth by calling the profile daily and storing follower_count with the date.
  • Image and video URLs are Instagram’s CDN links and expire; download what you need to keep.

Use it from Claude or Cursor (MCP)

Every endpoint is also an MCP tool on the remote server https://api.groundsocial.dev/mcp. The ?platforms=instagram below loads only the Instagram tools. The client signs in with OAuth, or send your key as a Bearer token. Tools used in this guide: instagram_user_posts, instagram_user_get, instagram_user_reels, instagram_post_get, instagram_post_comments, instagram_search_hashtag, instagram_user_engagement.

claude mcp add --transport http groundsocial "https://api.groundsocial.dev/mcp?platforms=instagram"

Setup for ChatGPT, VS Code, Windsurf, n8n and others: MCP client setup.

Pricing

Pay per call from prepaid credits; no subscription. 100 free credits cover the examples on this page. Costs below are at the credit packs’ highest and lowest rates.

JobCreditsCost
Follower counts of 1,000 creators1,000$1.00 → $0.40
Last ~60 posts of 100 accounts (5 pages)500$0.50 → $0.20
First page of comments on 500 posts1,000$1.00 → $0.40

FAQ

Does it work for personal (non-business) accounts?

Yes, for any public account. Private accounts return their counts and bio but no posts.

Can I get the list of an account’s followers?

No. Instagram shows follower lists only to signed-in users, and we never sign in. You get the counts, plus similar accounts and the people tagged in posts.

Are comment replies included?

Top-level comments come with their reply counts; Instagram loads reply threads only for signed-in users.

Are failed calls charged?

No. A target that does not exist answers 404 target_not_found, an upstream failure answers 503, and neither costs anything. Credits never expire.

Is Groundsocial official?

No. Groundsocial is an independent API that reads what the platform shows a logged-out visitor. Instagram is a trademark of Instagram, LLC (Meta Platforms, Inc.). We are not affiliated with or endorsed by Instagram or Meta.

Go deeper

Instagram is a trademark of Instagram, LLC (Meta Platforms, Inc.). We are not affiliated with or endorsed by Instagram or Meta.

Try it on your own data

One key for Instagram and every other platform, over REST or MCP. Free credits on signup, no card.