A public profile's follower count and ~12 most recent posts, and any public post or reel's exact likes, comments and posting account, as typed JSON. No login.
A public profile's follower count and ~12 most recent posts, and any public post or reel's exact likes, comments and posting account, as typed JSON. No login.
At a glance
Two GET endpoints under /v1/structured/instagram/. Each answers { endpoint, url, credits, duration_ms, data }; data is described below and in the reference. Each call is charged for the data it moves; a profile or post that does not exist is a free 404 NOT_FOUND, and a page we could not read is 502 TARGET_FAILED and costs nothing.
Endpoint | What | Typical |
|---|---|---|
| A public profile: counts and the ~12 most recent posts | about 25,000 profiles per credit, one per call |
| Any public post or reel by shortcode or URL | about 38,000 posts per credit, one per call |
Profile
Parameter | Type | Default | Description |
|---|---|---|---|
| string | — | The Instagram username, e.g. |
| string | — | Set to |
- cURL
- Python
- Node.js
curl -G "https://api.scrapelyserp.com/v1/structured/instagram/profile" \
-H "Authorization: Bearer $SCRAPELY_API_KEY" \
-d username=nasaimport os
import requests
HEADERS = {"Authorization": f"Bearer {os.environ['SCRAPELY_API_KEY']}"}
r = requests.get(
"https://api.scrapelyserp.com/v1/structured/instagram/profile",
headers=HEADERS,
params={"username": "nasa"},
timeout=30,
)
r.raise_for_status()
data = r.json()
p = data["data"]
print(p["followers"], p["posts_count"])
for post in p["recent_posts"]:
print(post["url"], post["type"])const res = await fetch(`https://api.scrapelyserp.com/v1/structured/instagram/profile?${new URLSearchParams({ username: 'nasa' })}`, {
headers: { Authorization: `Bearer ${process.env.SCRAPELY_API_KEY}` },
signal: AbortSignal.timeout(30_000),
});
if (!res.ok) throw new Error((await res.json()).error.code);
const data = await res.json();
const p = data.data;
console.log(p.followers, p.posts_count);
for (const post of p.recent_posts) console.log(post.url, post.type);The profile carries username, full_name, biography, is_verified, is_private, followers, following, posts_count, profile_pic_url, id, url and recent_posts (about 12). Each post has id, shortcode, url, type (image, video or carousel), caption, thumbnail, is_pinned and product_type. A private account returns its counts with an empty recent_posts. Add include=engagement to fetch each post’s page and fill in its exact likes, comments, taken_at and owner — one extra request per post, so it is off by default.
Full reference → GET /v1/structured/instagram/profile
Post
Parameter | Type | Default | Description |
|---|---|---|---|
| string | — | A post shortcode (e.g. |
Pass a shortcode (DgIPAzWPHHh) or any post, reel or TV URL. data carries shortcode, url, type, owner, owner_full_name, caption, likes, comments, taken_at, thumbnail and media_count. The posting account can differ from the profile you found the post on — a reshare or collab names its real owner.
Full reference → GET /v1/structured/instagram/post