If you have ever tried to read another account's profile through Instagram's own Graph API, you know the problem: it is built for managing accounts you control, so reading a creator's or competitor's public profile means business verification, app review and a token that still won't show you most of what you want. This guide shows the practical alternative: a public-data API that takes a username and returns the profile as JSON.
What you get from a username
A single call to the Profile details by username endpoint returns:
id,username,full_namebioandbio_linksfollowers,following,media_countis_verified,is_private,is_businessavatar(the profile picture URL)
Only publicly available information is returned; private accounts give you the basics (name, counts, the private flag) but no posts.
The request
curl "https://socialgraph.dev/api/v1/instagram/profile?username=instagram" \
-H "Authorization: Bearer YOUR_API_KEY"
import requests
r = requests.get(
"https://socialgraph.dev/api/v1/instagram/profile",
params={"username": "instagram"},
headers={"Authorization": "Bearer YOUR_API_KEY"},
timeout=60,
)
profile = r.json()
print(profile["username"], profile["followers"], profile["is_verified"])
The response for @instagram looks like this (trimmed):
{
"id": "25025320",
"username": "instagram",
"full_name": "Instagram",
"bio": "Discover what's new on Instagram ๐โจ",
"followers": 690000000,
"following": 150,
"media_count": 8000,
"is_verified": true,
"is_private": false,
"avatar": "https://โฆ"
}
Each successful call costs 2 credits (US$0.004). Errors, including "not found" for a username that doesn't exist, are never charged.
Username, user ID, or both?
Usernames change; the numeric id never does. If you store accounts to track them over time, save the id from the first response and use the Profile details by user ID endpoint afterwards. That way a rename doesn't break your tracking, and you can always resolve the ID back to the current username.
Going further than the profile
The profile is usually the first call, not the last:
- Engagement: the Recent posts statistics endpoint returns average likes, comments and views over the latest reels; divide likes plus comments by
followers. The engagement rate guide walks through it. - Growth tracking: poll Follower & following counts daily; it is lighter than the full profile.
- Reels and comments: the reels and comments endpoints use the same field names, so one parser covers everything.
Common mistakes
- Sending the
@: passusername=instagram, not@instagram. - Short timeouts: Instagram data is fetched live and can take 3โ15 seconds. Set your client timeout to 60 seconds.
- Keeping media URLs: avatar and media URLs are signed by Instagram's CDN and expire after a few days. Download anything you need to keep.
- Private accounts: don't expect posts; check
is_privatefirst.
Try it now
Every endpoint page has a free live demo you can run without an account, and a free account comes with 100 credits, enough for 50 profile lookups.