Skip to main content
ScrapingRabbit

Blog · · 4 min read

Get Instagram Profile Data With an API

Read a public Instagram profile as JSON: followers, bio, links, verified flag and highlights. Includes working code and the limits to plan for before you build on it.

A public Instagram profile holds useful facts: who the account is, how big it is, what it links to. If you vet creators, track competitors or build a dashboard, you want those facts as data and not as a screenshot. This guide shows how to read them with one GET request.

Request a profile

Send the username without the @ sign. Every call needs an API key. New accounts get 100 free credits and a first key is created automatically on sign-up (it is shown once on the dashboard). Sign in at scrapingrabbit.com/login, then send the key in the x-api-key header (a Bearer token also works). The code below reads it from the SCRAPINGRABBIT_API_KEY environment variable, so no key is ever written into your code.

curl -H "x-api-key: $SCRAPINGRABBIT_API_KEY" "https://api.scrapingrabbit.com/v1/instagram/profile?username=nasa"

Each successful call costs about 5 credits. That is an estimate the team has not measured yet, so see the pricing page for current numbers.

A shortened real answer:

{
  "success": true,
  "data": {
    "id": "528817151",
    "username": "nasa",
    "fullName": "NASA",
    "bio": "Making the seemingly impossible, possible.",
    "bioLinks": [{ "url": "https://www.nasa.gov", "title": "NASA.gov Homepage" }],
    "verified": true,
    "private": false,
    "followers": 104229235,
    "following": 91,
    "hasReels": true,
    "highlightCount": 6
  }
}

The answer also has an avatar field with the address of the profile picture.

What each field means

FieldMeaning
idInstagram's own number for the account. It stays the same if the username changes.
username and fullNameThe handle and the display name
bioThe profile text
bioLinksA list of links, each with a url and a title
verifiedtrue for a verified account
privatetrue for a private account
followers and followingCounts, as numbers
hasReelsWhether the account has Reels
highlightCountHow many story highlights the profile shows

The counts are a snapshot. They were read on 27 November 2026, and they change all the time.

Read it in code

async function instagramProfile(username) {
  const url = `https://api.scrapingrabbit.com/v1/instagram/profile?username=${encodeURIComponent(username)}`;
  const res = await fetch(url, { headers: { "x-api-key": process.env.SCRAPINGRABBIT_API_KEY } });
  const body = await res.json();
  if (!body.success) return null;

  const p = body.data;
  return {
    name: p.fullName || p.username,
    followers: p.followers,
    isPrivate: p.private,
    links: (p.bioLinks ?? []).map((link) => link.url),
  };
}

console.log(await instagramProfile("nasa"));

Two details in that code matter. The function returns null when success is false, so your program can show a message and not crash. And bioLinks might be missing, so the code falls back to an empty list.

In Python:

import os
import requests

res = requests.get(
    "https://api.scrapingrabbit.com/v1/instagram/profile",
    params={"username": "nasa"},
    headers={"x-api-key": os.environ["SCRAPINGRABBIT_API_KEY"]},
    timeout=60,
)
body = res.json()
if body["success"]:
    print(body["data"]["followers"])

Add the highlights

The profile says how many highlights there are. To see them, call the highlights endpoint (also about 5 credits per call):

curl -H "x-api-key: $SCRAPINGRABBIT_API_KEY" "https://api.scrapingrabbit.com/v1/instagram/highlights?username=nasa"

The answer has a highlights list. Each item has an id, a title and a coverUrl. There is also a hasMore flag, which was false for the account in our test. If it is true, there are more highlights than the list shows.

Check a handle first

If you accept usernames from people, check that a name exists before you spend a profile request on it. The username check endpoint (about 5 credits per call too) tells you whether a name is taken and, for a name in use, returns the account's name and follower count. It is a cheap way to avoid asking for a profile that is not there.

Things to plan for

  • Private accounts. Check the private field before you rely on other data. A private account shows less to the public.
  • Images expire. The avatar and highlight cover links point to Instagram's image servers. Do not store the link as a permanent address.
  • Rate limits and credits. Each key is limited per minute: 10 requests on the free plan, 60 on Starter, 120 on Pro and 300 on Scale. Every successful call costs credits, so cache each profile for a while, because the numbers move slowly.
  • Always check success. A failed request has success set to false, a code such as RATE_LIMITED or INVALID_API_KEY, and a message. Failed calls are not charged.

Try it without code

The free Instagram profile viewer works in the browser with no key and shows these fields for any public profile, and the free highlight viewer lists the highlights with their covers.

Try it yourself

Frequently asked questions

Do I need an Instagram account or login?

No. The endpoint reads public profile data, so you do not need an account, and the profile owner is not told that someone looked.

Do the avatar and cover links last forever?

Treat them as temporary. They point to Instagram's own image servers and may stop working after a while. Download an image if you need to keep it.

Can I read the stories inside a highlight?

The highlights endpoint lists each highlight with its title and cover. This guide covers the list. The stories inside one highlight come from a separate endpoint.

More guides