Instagram profile by user id
Beta GET /v1/instagram/basic-profile
GET /v1/instagram/basic-profile
A profile summary by numeric user id: username, name, biography, links, picture, verification, follower and following counts, account privacy. stats.posts is null (use profile/post-count). Instagram has no logged-out lookup by id, so the account is found through its newest public post: an id whose account has no public posts (private, empty or unknown) answers not_found.
- Cost: 1 credit
- Status: Beta. Built and tested against recorded responses; the shape may still gain fields.
- Cache: Results are kept up to 30 days; send
max_age_daysto reuse them for free. - Timeout: A request still running after about 25 seconds answers
202with a job to poll (Batch and jobs).
Parameters#
| Name | Type | Required | Description |
|---|---|---|---|
id | string | yes | Numeric Instagram user id. Also accepted as userId, user_id. |
Every request also accepts:
trim:truefor a smaller response withoutnullfields andextra.raw:trueto also get the platform's original object asraw.max_age_days: accept a cached result up to this many days old, for 0 credits (Caching).
Example request#
Set your key in the environment first (see Authentication).
curl -G "https://api.socialscrape.io/v1/instagram/basic-profile" \
-H "x-api-key: $SOCIALSCRAPE_API_KEY" \
--data-urlencode "id=528817151"import os
import requests
params = {
"id": "528817151",
}
res = requests.get(
"https://api.socialscrape.io/v1/instagram/basic-profile",
headers={"x-api-key": os.environ["SOCIALSCRAPE_API_KEY"]},
params=params,
)
body = res.json()
if body["ok"]:
print(body["data"])
else:
print(body["error"]["code"], body["error"]["message"])const url = new URL("https://api.socialscrape.io/v1/instagram/basic-profile");
url.search = new URLSearchParams({
"id": "528817151"
}).toString();
const res = await fetch(url, {
headers: { "x-api-key": process.env.SOCIALSCRAPE_API_KEY! },
});
const body = await res.json();
if (body.ok) {
console.log(body.data);
} else {
console.error(body.error.code, body.error.message);
}{
"nodes": [
{
"name": "SocialScrape Instagram profile by user id",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
0,
0
],
"parameters": {
"method": "GET",
"url": "https://api.socialscrape.io/v1/instagram/basic-profile",
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "id",
"value": "528817151"
}
]
},
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "x-api-key",
"value": "={{ $env.SOCIALSCRAPE_API_KEY }}"
}
]
}
}
}
],
"connections": {}
}Example response#
This is a sample from a recorded response, lists and long text are shortened. Status 200.
{
"ok": true,
"credits_charged": 1,
"credits_remaining": 4999,
"cached": false,
"cached_at": null,
"request_id": "req_6348bf15b18145c54b75c3c7",
"data": {
"object": "profile",
"platform": "instagram",
"id": "528817151",
"handle": "nasa",
"name": "NASA",
"headline": null,
"url": "https://www.instagram.com/nasa/",
"kind": "unknown",
"bio": "Making the seemingly impossible, possible. ✨",
"avatar_url": "https://scontent-lga3-2.cdninstagram.com/v/t51.2885-19/29090066_159271188110124_1152068159029641216_n.jpg?stp=dst-jpg_s150x150_tt6&_nc_cat=1&ccb=7-5&_nc_sid=f7ccc5&efg=eyJ2ZW5jb2RlX3RhZyI6InByb2ZpbGVfcGljLnd3dy4xMDgwLkMzIn0%3D&_nc_ohc=Ca3wE...",
"banner_url": null,
"verified": true,
"is_private": false,
"external_url": "https://www.nasa.gov",
"links": [
{
"title": "NASA.gov Homepage",
"url": "https://www.nasa.gov"
},
{
"title": "MAX POWER",
"url": "https://www.nasa.gov/maxpower"
},
{
"title": "Roman Space Telescope Blog",
"url": "https://science.nasa.gov/blogs/roman/"
}
],
"location": null,
"category": null,
"created_at": null,
"stats": {
"followers": 104361218,
"following": 90,
"posts": null,
"likes": null,
"views": null
},
"extra": {
"has_reels": true,
"is_memorialized": false,
"is_unpublished": false,
"latest_story_at": "2026-10-29T20:36:47Z",
"looked_up_by": "user_id",
"relay_id": "17841401474538262"
}
},
"cursor": null,
"has_more": null
}Response#
A Profile object in data.
See Data models for every field. The envelope around data is described in Responses.
Errors#
Failures are free: credits_charged is 0. Branch on error.code, never on the message.
| Code | HTTP | Retry | Meaning |
|---|---|---|---|
invalid_params | 400 | no | A parameter is missing, unknown or has the wrong type. |
not_found | 404 | no | The platform says this profile, post or item does not exist. |
Every request can also fail with the account and platform errors listed on the Errors page.
Example error:
{
"ok": false,
"error": {
"code": "not_found",
"message": "The platform says this profile, post or item does not exist.",
"retryable": false
},
"credits_charged": 0,
"request_id": "req_9fe8902c02539f5211118209"
}Related endpoints#
- Instagram profile (
GET /v1/instagram/profile) - Instagram profile post count (
GET /v1/instagram/profile/post-count) - Instagram profile posts (
GET /v1/instagram/profile/posts) - Instagram profile reels (
GET /v1/instagram/profile/reels) - Instagram post or reel details (
GET /v1/instagram/post) - Instagram reel transcript (
GET /v1/instagram/post/transcript) - Instagram post comments (
GET /v1/instagram/post/comments) - Instagram popular topic (
GET /v1/instagram/search/popular)