A read-only REST API for public Instagram data: profiles, posts, reels, stories, highlights, comments, likes, followers, hashtags, locations, audio and search, plus engagement insights and a handle check. Send your key in one header and get JSON back. Public data only; it never logs in to Instagram or posts anything. Every endpoint is a GET that returns JSON. Get a key to start.
The OpenAPI file imports into Postman, Insomnia or any code generator.
Auth and base URL
Base URL: https://data.fastsocial.co. Send your key in the X-API-Key header, or as Authorization: Bearer your_key. Keys in the query string are rejected so they don't end up in logs. Keep the key on your server; never put it in a public web page.
Every success looks like {"ok": true, "data": {...}, "meta": {...}}. meta.cache is hit, miss or stale, and meta.age_seconds says how old the data is. If Instagram can't be reached you get the last good copy with meta.stale: true rather than an error, but never counts older than 5 minutes.
Credits
Each call costs the credits shown on its endpoint below. Failed calls and outages cost nothing. A "not found" is a real answer, so it is charged. Every success carries X-Credits-Used and X-Credits-Remaining headers, and GET /v1/usage shows your balance for free.
Plan
Price
Credits / month
Rate limit
Free
$0 / month
50
10 requests / minute
Starter
$4.99 / month
2,500
30 requests / minute
Pro
$9.99 / month
8,000
60 requests / minute
Ultra
$29.99 / month
26,000
120 requests / minute
Insanity
$249 / month
250,000
300 requests / minute
No overage billing: when credits run out, calls return quota_exceeded until the monthly reset or an upgrade.
Rate limits
Limits are per key, per minute (table above). Over the limit you get 429 rate_limited with a Retry-After header in seconds. Wait that long and retry.
Pagination
Paged endpoints return next_cursor. Pass it back unchanged as cursor to get the next page. When it is null there are no more pages.
Errors
Errors return {"ok": false, "error": {"code": "...", "message": "..."}} with the HTTP status below.
Status
Code
Meaning
400
invalid_username
The handle isn't a valid Instagram username.
400
invalid_post
The post URL or shortcode can't be read.
400
invalid_id
The highlight id is malformed.
400
invalid_cursor
The cursor isn't one we issued. Pass next_cursor as is.
400
missing_user
Send username=<handle> or user_id=<numeric id>.
400
invalid_user_id
user_id must be the numeric Instagram id.
400
invalid_query
The search text is empty or too long.
400
invalid_tag
The hashtag is empty or has characters Instagram doesn't allow.
400
invalid_param
A filter value isn't allowed. The message lists the valid values.
401
missing_key
No key sent. Use the X-API-Key header.
401
invalid_key
The key is wrong or disabled.
402
plan_inactive
Your plan is paused or has ended. Renew it on your dashboard.
404
not_found
No account or post with that name. Charged, since it's a real answer.
404
no_such_endpoint
Unknown path.
422
private_account
The account is private, so there's nothing public to return.
429
rate_limited
Too many requests this minute. Wait for Retry-After seconds.
429
quota_exceeded
Monthly credits are used up. Upgrade or wait for the reset.
429
fair_use_limit
Insanity plan only: this month's 30,000-credit fair-use allowance for heavier lookups (posts, reels, search, followers, stories and similar) is used up. Profile, post and media lookups still work.
451
opted_out
The account owner asked to be excluded.
502
upstream_error
Instagram didn't answer. Not charged; retry shortly.
503
capacity
Temporarily at capacity. Not charged; retry shortly.
503
unavailable
This endpoint or the daily chart is briefly unavailable. Not charged; retry in a minute.
503
maintenance
The API is paused for maintenance. Not charged.
Use it in Claude, ChatGPT, Cursor or VS Code (MCP)
The same data is available as an MCP server at https://data.fastsocial.co/mcp. Add it to your AI app, sign in once in your browser, and ask in plain words: "How many followers does @nasa have?". There is no key to paste. Each tool costs the same credits as its endpoint below.
App
How to add it
Claude Code
claude mcp add --transport http instagram-data https://data.fastsocial.co/mcp
Claude (desktop or web)
Settings → Connectors → Add custom connector. Paste https://data.fastsocial.co/mcp and sign in.
ChatGPT
Settings → Connectors. Turn on developer mode under Advanced, create a connector with https://data.fastsocial.co/mcp and sign in.
Cursor
Add to ~/.cursor/mcp.json: {"mcpServers": {"instagram-data": {"url": "https://data.fastsocial.co/mcp"}}}
VS Code
Add to .vscode/mcp.json: {"servers": {"instagram-data": {"type": "http", "url": "https://data.fastsocial.co/mcp"}}}
Tool names are instagram_ plus the endpoint name, for example instagram_profile for /v1/profile. Every endpoint below is a tool. instagram_top_accounts and instagram_usage are free.
Prefer pasting docs into a chat? Press Copy full docs as Markdown above, or give the agent https://fastsocial.co/instagram-api/docs.md. Each endpoint also has a Copy for AI button.
Endpoints
Get an Instagram profile
GET/v1/profile
Follower, following and post counts, bio, links, category, verification and the profile picture of any public account.
Costs 1 credit per call.
Parameter
Description
username
Instagram handle, with or without @. A profile URL also works. Pass this or user_id.
import os
import requests
r = requests.get(
"https://data.fastsocial.co/v1/profile",
params={"username": "nasa"},
headers={"X-API-Key": os.environ["FASTSOCIAL_API_KEY"]},
timeout=30,
)
r.raise_for_status()
print(r.json()["data"])
const url = new URL("https://data.fastsocial.co/v1/profile");
url.search = new URLSearchParams({ username: "nasa" });
const res = await fetch(url, { headers: { "X-API-Key": API_KEY } });
const body = await res.json();
if (!body.ok) throw new Error(body.error.code);
console.log(body.data);
// Call from your server or a worker, never from a public web page: the key must stay secret.
// Node 18+ (built-in fetch). Run as an ES module: node app.mjs
const url = new URL("https://data.fastsocial.co/v1/profile");
url.search = new URLSearchParams({ username: "nasa" });
const res = await fetch(url, { headers: { "X-API-Key": process.env.FASTSOCIAL_API_KEY } });
const { ok, data, error } = await res.json();
if (!ok) throw new Error(error.code);
console.log(data);
import os
import requests
r = requests.get(
"https://data.fastsocial.co/v1/user-id",
params={"username": "nasa"},
headers={"X-API-Key": os.environ["FASTSOCIAL_API_KEY"]},
timeout=30,
)
r.raise_for_status()
print(r.json()["data"])
const url = new URL("https://data.fastsocial.co/v1/user-id");
url.search = new URLSearchParams({ username: "nasa" });
const res = await fetch(url, { headers: { "X-API-Key": API_KEY } });
const body = await res.json();
if (!body.ok) throw new Error(body.error.code);
console.log(body.data);
// Call from your server or a worker, never from a public web page: the key must stay secret.
// Node 18+ (built-in fetch). Run as an ES module: node app.mjs
const url = new URL("https://data.fastsocial.co/v1/user-id");
url.search = new URLSearchParams({ username: "nasa" });
const res = await fetch(url, { headers: { "X-API-Key": process.env.FASTSOCIAL_API_KEY } });
const { ok, data, error } = await res.json();
if (!ok) throw new Error(error.code);
console.log(data);
import os
import requests
r = requests.get(
"https://data.fastsocial.co/v1/username",
params={"user_id": "528817151"},
headers={"X-API-Key": os.environ["FASTSOCIAL_API_KEY"]},
timeout=30,
)
r.raise_for_status()
print(r.json()["data"])
const url = new URL("https://data.fastsocial.co/v1/username");
url.search = new URLSearchParams({ user_id: "528817151" });
const res = await fetch(url, { headers: { "X-API-Key": API_KEY } });
const body = await res.json();
if (!body.ok) throw new Error(body.error.code);
console.log(body.data);
// Call from your server or a worker, never from a public web page: the key must stay secret.
// Node 18+ (built-in fetch). Run as an ES module: node app.mjs
const url = new URL("https://data.fastsocial.co/v1/username");
url.search = new URLSearchParams({ user_id: "528817151" });
const res = await fetch(url, { headers: { "X-API-Key": process.env.FASTSOCIAL_API_KEY } });
const { ok, data, error } = await res.json();
if (!ok) throw new Error(error.code);
console.log(data);
Does this handle exist, and is it public? States: ok, not_found, private, deactivated, memorialized, age_restricted, restricted_minor. Exact match only, so a typo never resolves to someone else.
Costs 1 credit per call.
Parameter
Description
usernamerequired
Instagram handle, with or without @. A profile URL also works. Pass this or user_id.
import os
import requests
r = requests.get(
"https://data.fastsocial.co/v1/check",
params={"username": "nasa"},
headers={"X-API-Key": os.environ["FASTSOCIAL_API_KEY"]},
timeout=30,
)
r.raise_for_status()
print(r.json()["data"])
const url = new URL("https://data.fastsocial.co/v1/check");
url.search = new URLSearchParams({ username: "nasa" });
const res = await fetch(url, { headers: { "X-API-Key": API_KEY } });
const body = await res.json();
if (!body.ok) throw new Error(body.error.code);
console.log(body.data);
// Call from your server or a worker, never from a public web page: the key must stay secret.
// Node 18+ (built-in fetch). Run as an ES module: node app.mjs
const url = new URL("https://data.fastsocial.co/v1/check");
url.search = new URLSearchParams({ username: "nasa" });
const res = await fetch(url, { headers: { "X-API-Key": process.env.FASTSOCIAL_API_KEY } });
const { ok, data, error } = await res.json();
if (!ok) throw new Error(error.code);
console.log(data);
import os
import requests
r = requests.get(
"https://data.fastsocial.co/v1/posts",
params={"username": "nasa"},
headers={"X-API-Key": os.environ["FASTSOCIAL_API_KEY"]},
timeout=30,
)
r.raise_for_status()
print(r.json()["data"])
const url = new URL("https://data.fastsocial.co/v1/posts");
url.search = new URLSearchParams({ username: "nasa" });
const res = await fetch(url, { headers: { "X-API-Key": API_KEY } });
const body = await res.json();
if (!body.ok) throw new Error(body.error.code);
console.log(body.data);
// Call from your server or a worker, never from a public web page: the key must stay secret.
// Node 18+ (built-in fetch). Run as an ES module: node app.mjs
const url = new URL("https://data.fastsocial.co/v1/posts");
url.search = new URLSearchParams({ username: "nasa" });
const res = await fetch(url, { headers: { "X-API-Key": process.env.FASTSOCIAL_API_KEY } });
const { ok, data, error } = await res.json();
if (!ok) throw new Error(error.code);
console.log(data);
import os
import requests
r = requests.get(
"https://data.fastsocial.co/v1/reels",
params={"username": "nasa"},
headers={"X-API-Key": os.environ["FASTSOCIAL_API_KEY"]},
timeout=30,
)
r.raise_for_status()
print(r.json()["data"])
const url = new URL("https://data.fastsocial.co/v1/reels");
url.search = new URLSearchParams({ username: "nasa" });
const res = await fetch(url, { headers: { "X-API-Key": API_KEY } });
const body = await res.json();
if (!body.ok) throw new Error(body.error.code);
console.log(body.data);
// Call from your server or a worker, never from a public web page: the key must stay secret.
// Node 18+ (built-in fetch). Run as an ES module: node app.mjs
const url = new URL("https://data.fastsocial.co/v1/reels");
url.search = new URLSearchParams({ username: "nasa" });
const res = await fetch(url, { headers: { "X-API-Key": process.env.FASTSOCIAL_API_KEY } });
const { ok, data, error } = await res.json();
if (!ok) throw new Error(error.code);
console.log(data);
import os
import requests
r = requests.get(
"https://data.fastsocial.co/v1/tagged",
params={"username": "nasa"},
headers={"X-API-Key": os.environ["FASTSOCIAL_API_KEY"]},
timeout=30,
)
r.raise_for_status()
print(r.json()["data"])
const url = new URL("https://data.fastsocial.co/v1/tagged");
url.search = new URLSearchParams({ username: "nasa" });
const res = await fetch(url, { headers: { "X-API-Key": API_KEY } });
const body = await res.json();
if (!body.ok) throw new Error(body.error.code);
console.log(body.data);
// Call from your server or a worker, never from a public web page: the key must stay secret.
// Node 18+ (built-in fetch). Run as an ES module: node app.mjs
const url = new URL("https://data.fastsocial.co/v1/tagged");
url.search = new URLSearchParams({ username: "nasa" });
const res = await fetch(url, { headers: { "X-API-Key": process.env.FASTSOCIAL_API_KEY } });
const { ok, data, error } = await res.json();
if (!ok) throw new Error(error.code);
console.log(data);
import os
import requests
r = requests.get(
"https://data.fastsocial.co/v1/post",
params={"url": "https://www.instagram.com/reel/DdhFkS7KGkZ/"},
headers={"X-API-Key": os.environ["FASTSOCIAL_API_KEY"]},
timeout=30,
)
r.raise_for_status()
print(r.json()["data"])
const url = new URL("https://data.fastsocial.co/v1/post");
url.search = new URLSearchParams({ url: "https://www.instagram.com/reel/DdhFkS7KGkZ/" });
const res = await fetch(url, { headers: { "X-API-Key": API_KEY } });
const body = await res.json();
if (!body.ok) throw new Error(body.error.code);
console.log(body.data);
// Call from your server or a worker, never from a public web page: the key must stay secret.
// Node 18+ (built-in fetch). Run as an ES module: node app.mjs
const url = new URL("https://data.fastsocial.co/v1/post");
url.search = new URLSearchParams({ url: "https://www.instagram.com/reel/DdhFkS7KGkZ/" });
const res = await fetch(url, { headers: { "X-API-Key": process.env.FASTSOCIAL_API_KEY } });
const { ok, data, error } = await res.json();
if (!ok) throw new Error(error.code);
console.log(data);
Direct image and video file URLs for every slide of a post, in the best quality available. URLs are signed Instagram CDN links that expire after a few hours.
Costs 1 credit per call.
Parameter
Description
url
Post, reel or IGTV URL. Pass this or shortcode.
shortcode
The code in the post URL (instagram.com/p/<code>/).
import os
import requests
r = requests.get(
"https://data.fastsocial.co/v1/media",
params={"url": "https://www.instagram.com/reel/DdhFkS7KGkZ/"},
headers={"X-API-Key": os.environ["FASTSOCIAL_API_KEY"]},
timeout=30,
)
r.raise_for_status()
print(r.json()["data"])
const url = new URL("https://data.fastsocial.co/v1/media");
url.search = new URLSearchParams({ url: "https://www.instagram.com/reel/DdhFkS7KGkZ/" });
const res = await fetch(url, { headers: { "X-API-Key": API_KEY } });
const body = await res.json();
if (!body.ok) throw new Error(body.error.code);
console.log(body.data);
// Call from your server or a worker, never from a public web page: the key must stay secret.
// Node 18+ (built-in fetch). Run as an ES module: node app.mjs
const url = new URL("https://data.fastsocial.co/v1/media");
url.search = new URLSearchParams({ url: "https://www.instagram.com/reel/DdhFkS7KGkZ/" });
const res = await fetch(url, { headers: { "X-API-Key": process.env.FASTSOCIAL_API_KEY } });
const { ok, data, error } = await res.json();
if (!ok) throw new Error(error.code);
console.log(data);
import os
import requests
r = requests.get(
"https://data.fastsocial.co/v1/comments",
params={"url": "https://www.instagram.com/reel/DdhFkS7KGkZ/"},
headers={"X-API-Key": os.environ["FASTSOCIAL_API_KEY"]},
timeout=30,
)
r.raise_for_status()
print(r.json()["data"])
const url = new URL("https://data.fastsocial.co/v1/comments");
url.search = new URLSearchParams({ url: "https://www.instagram.com/reel/DdhFkS7KGkZ/" });
const res = await fetch(url, { headers: { "X-API-Key": API_KEY } });
const body = await res.json();
if (!body.ok) throw new Error(body.error.code);
console.log(body.data);
// Call from your server or a worker, never from a public web page: the key must stay secret.
// Node 18+ (built-in fetch). Run as an ES module: node app.mjs
const url = new URL("https://data.fastsocial.co/v1/comments");
url.search = new URLSearchParams({ url: "https://www.instagram.com/reel/DdhFkS7KGkZ/" });
const res = await fetch(url, { headers: { "X-API-Key": process.env.FASTSOCIAL_API_KEY } });
const { ok, data, error } = await res.json();
if (!ok) throw new Error(error.code);
console.log(data);
import os
import requests
r = requests.get(
"https://data.fastsocial.co/v1/comment-replies",
params={"url": "https://www.instagram.com/reel/DdhFkS7KGkZ/", "comment_id": "17935912383123296"},
headers={"X-API-Key": os.environ["FASTSOCIAL_API_KEY"]},
timeout=30,
)
r.raise_for_status()
print(r.json()["data"])
const url = new URL("https://data.fastsocial.co/v1/comment-replies");
url.search = new URLSearchParams({ url: "https://www.instagram.com/reel/DdhFkS7KGkZ/", comment_id: "17935912383123296" });
const res = await fetch(url, { headers: { "X-API-Key": API_KEY } });
const body = await res.json();
if (!body.ok) throw new Error(body.error.code);
console.log(body.data);
// Call from your server or a worker, never from a public web page: the key must stay secret.
// Node 18+ (built-in fetch). Run as an ES module: node app.mjs
const url = new URL("https://data.fastsocial.co/v1/comment-replies");
url.search = new URLSearchParams({ url: "https://www.instagram.com/reel/DdhFkS7KGkZ/", comment_id: "17935912383123296" });
const res = await fetch(url, { headers: { "X-API-Key": process.env.FASTSOCIAL_API_KEY } });
const { ok, data, error } = await res.json();
if (!ok) throw new Error(error.code);
console.log(data);
import os
import requests
r = requests.get(
"https://data.fastsocial.co/v1/likers",
params={"url": "https://www.instagram.com/reel/DdhFkS7KGkZ/"},
headers={"X-API-Key": os.environ["FASTSOCIAL_API_KEY"]},
timeout=30,
)
r.raise_for_status()
print(r.json()["data"])
const url = new URL("https://data.fastsocial.co/v1/likers");
url.search = new URLSearchParams({ url: "https://www.instagram.com/reel/DdhFkS7KGkZ/" });
const res = await fetch(url, { headers: { "X-API-Key": API_KEY } });
const body = await res.json();
if (!body.ok) throw new Error(body.error.code);
console.log(body.data);
// Call from your server or a worker, never from a public web page: the key must stay secret.
// Node 18+ (built-in fetch). Run as an ES module: node app.mjs
const url = new URL("https://data.fastsocial.co/v1/likers");
url.search = new URLSearchParams({ url: "https://www.instagram.com/reel/DdhFkS7KGkZ/" });
const res = await fetch(url, { headers: { "X-API-Key": process.env.FASTSOCIAL_API_KEY } });
const { ok, data, error } = await res.json();
if (!ok) throw new Error(error.code);
console.log(data);
Engagement rate (mean and median), posting cadence, format mix, best posting hours (UTC) and a percentile against the Instagram Benchmarks report, from the latest 12 posts. Pinned posts are excluded.
Costs 2 credits per call.
Parameter
Description
username
Instagram handle, with or without @. A profile URL also works. Pass this or user_id.
import os
import requests
r = requests.get(
"https://data.fastsocial.co/v1/insights",
params={"username": "nasa"},
headers={"X-API-Key": os.environ["FASTSOCIAL_API_KEY"]},
timeout=30,
)
r.raise_for_status()
print(r.json()["data"])
const url = new URL("https://data.fastsocial.co/v1/insights");
url.search = new URLSearchParams({ username: "nasa" });
const res = await fetch(url, { headers: { "X-API-Key": API_KEY } });
const body = await res.json();
if (!body.ok) throw new Error(body.error.code);
console.log(body.data);
// Call from your server or a worker, never from a public web page: the key must stay secret.
// Node 18+ (built-in fetch). Run as an ES module: node app.mjs
const url = new URL("https://data.fastsocial.co/v1/insights");
url.search = new URLSearchParams({ username: "nasa" });
const res = await fetch(url, { headers: { "X-API-Key": process.env.FASTSOCIAL_API_KEY } });
const { ok, data, error } = await res.json();
if (!ok) throw new Error(error.code);
console.log(data);
One page of the accounts that follow a public account, with the total follower count. Pass next_cursor back as cursor for the next page; null means no more pages are available. Private accounts return 422 private_account.
import os
import requests
r = requests.get(
"https://data.fastsocial.co/v1/followers",
params={"username": "nasa"},
headers={"X-API-Key": os.environ["FASTSOCIAL_API_KEY"]},
timeout=30,
)
r.raise_for_status()
print(r.json()["data"])
const url = new URL("https://data.fastsocial.co/v1/followers");
url.search = new URLSearchParams({ username: "nasa" });
const res = await fetch(url, { headers: { "X-API-Key": API_KEY } });
const body = await res.json();
if (!body.ok) throw new Error(body.error.code);
console.log(body.data);
// Call from your server or a worker, never from a public web page: the key must stay secret.
// Node 18+ (built-in fetch). Run as an ES module: node app.mjs
const url = new URL("https://data.fastsocial.co/v1/followers");
url.search = new URLSearchParams({ username: "nasa" });
const res = await fetch(url, { headers: { "X-API-Key": process.env.FASTSOCIAL_API_KEY } });
const { ok, data, error } = await res.json();
if (!ok) throw new Error(error.code);
console.log(data);
One page of the accounts a public account follows, with the total. Pass next_cursor back as cursor for the next page; null means no more pages are available. Private accounts return 422 private_account.
import os
import requests
r = requests.get(
"https://data.fastsocial.co/v1/following",
params={"username": "nasa"},
headers={"X-API-Key": os.environ["FASTSOCIAL_API_KEY"]},
timeout=30,
)
r.raise_for_status()
print(r.json()["data"])
const url = new URL("https://data.fastsocial.co/v1/following");
url.search = new URLSearchParams({ username: "nasa" });
const res = await fetch(url, { headers: { "X-API-Key": API_KEY } });
const body = await res.json();
if (!body.ok) throw new Error(body.error.code);
console.log(body.data);
// Call from your server or a worker, never from a public web page: the key must stay secret.
// Node 18+ (built-in fetch). Run as an ES module: node app.mjs
const url = new URL("https://data.fastsocial.co/v1/following");
url.search = new URLSearchParams({ username: "nasa" });
const res = await fetch(url, { headers: { "X-API-Key": process.env.FASTSOCIAL_API_KEY } });
const { ok, data, error } = await res.json();
if (!ok) throw new Error(error.code);
console.log(data);
import os
import requests
r = requests.get(
"https://data.fastsocial.co/v1/similar",
params={"username": "nasa"},
headers={"X-API-Key": os.environ["FASTSOCIAL_API_KEY"]},
timeout=30,
)
r.raise_for_status()
print(r.json()["data"])
const url = new URL("https://data.fastsocial.co/v1/similar");
url.search = new URLSearchParams({ username: "nasa" });
const res = await fetch(url, { headers: { "X-API-Key": API_KEY } });
const body = await res.json();
if (!body.ok) throw new Error(body.error.code);
console.log(body.data);
// Call from your server or a worker, never from a public web page: the key must stay secret.
// Node 18+ (built-in fetch). Run as an ES module: node app.mjs
const url = new URL("https://data.fastsocial.co/v1/similar");
url.search = new URLSearchParams({ username: "nasa" });
const res = await fetch(url, { headers: { "X-API-Key": process.env.FASTSOCIAL_API_KEY } });
const { ok, data, error } = await res.json();
if (!ok) throw new Error(error.code);
console.log(data);
import os
import requests
r = requests.get(
"https://data.fastsocial.co/v1/stories",
params={"username": "nasa"},
headers={"X-API-Key": os.environ["FASTSOCIAL_API_KEY"]},
timeout=30,
)
r.raise_for_status()
print(r.json()["data"])
const url = new URL("https://data.fastsocial.co/v1/stories");
url.search = new URLSearchParams({ username: "nasa" });
const res = await fetch(url, { headers: { "X-API-Key": API_KEY } });
const body = await res.json();
if (!body.ok) throw new Error(body.error.code);
console.log(body.data);
// Call from your server or a worker, never from a public web page: the key must stay secret.
// Node 18+ (built-in fetch). Run as an ES module: node app.mjs
const url = new URL("https://data.fastsocial.co/v1/stories");
url.search = new URLSearchParams({ username: "nasa" });
const res = await fetch(url, { headers: { "X-API-Key": process.env.FASTSOCIAL_API_KEY } });
const { ok, data, error } = await res.json();
if (!ok) throw new Error(error.code);
console.log(data);
import os
import requests
r = requests.get(
"https://data.fastsocial.co/v1/highlights",
params={"username": "nasa"},
headers={"X-API-Key": os.environ["FASTSOCIAL_API_KEY"]},
timeout=30,
)
r.raise_for_status()
print(r.json()["data"])
const url = new URL("https://data.fastsocial.co/v1/highlights");
url.search = new URLSearchParams({ username: "nasa" });
const res = await fetch(url, { headers: { "X-API-Key": API_KEY } });
const body = await res.json();
if (!body.ok) throw new Error(body.error.code);
console.log(body.data);
// Call from your server or a worker, never from a public web page: the key must stay secret.
// Node 18+ (built-in fetch). Run as an ES module: node app.mjs
const url = new URL("https://data.fastsocial.co/v1/highlights");
url.search = new URLSearchParams({ username: "nasa" });
const res = await fetch(url, { headers: { "X-API-Key": process.env.FASTSOCIAL_API_KEY } });
const { ok, data, error } = await res.json();
if (!ok) throw new Error(error.code);
console.log(data);
import os
import requests
r = requests.get(
"https://data.fastsocial.co/v1/highlight",
params={"id": "highlight:17960293069066406"},
headers={"X-API-Key": os.environ["FASTSOCIAL_API_KEY"]},
timeout=30,
)
r.raise_for_status()
print(r.json()["data"])
const url = new URL("https://data.fastsocial.co/v1/highlight");
url.search = new URLSearchParams({ id: "highlight:17960293069066406" });
const res = await fetch(url, { headers: { "X-API-Key": API_KEY } });
const body = await res.json();
if (!body.ok) throw new Error(body.error.code);
console.log(body.data);
// Call from your server or a worker, never from a public web page: the key must stay secret.
// Node 18+ (built-in fetch). Run as an ES module: node app.mjs
const url = new URL("https://data.fastsocial.co/v1/highlight");
url.search = new URLSearchParams({ id: "highlight:17960293069066406" });
const res = await fetch(url, { headers: { "X-API-Key": process.env.FASTSOCIAL_API_KEY } });
const { ok, data, error } = await res.json();
if (!ok) throw new Error(error.code);
console.log(data);
import os
import requests
r = requests.get(
"https://data.fastsocial.co/v1/search",
params={"q": "nasa"},
headers={"X-API-Key": os.environ["FASTSOCIAL_API_KEY"]},
timeout=30,
)
r.raise_for_status()
print(r.json()["data"])
const url = new URL("https://data.fastsocial.co/v1/search");
url.search = new URLSearchParams({ q: "nasa" });
const res = await fetch(url, { headers: { "X-API-Key": API_KEY } });
const body = await res.json();
if (!body.ok) throw new Error(body.error.code);
console.log(body.data);
// Call from your server or a worker, never from a public web page: the key must stay secret.
// Node 18+ (built-in fetch). Run as an ES module: node app.mjs
const url = new URL("https://data.fastsocial.co/v1/search");
url.search = new URLSearchParams({ q: "nasa" });
const res = await fetch(url, { headers: { "X-API-Key": process.env.FASTSOCIAL_API_KEY } });
const { ok, data, error } = await res.json();
if (!ok) throw new Error(error.code);
console.log(data);
import os
import requests
r = requests.get(
"https://data.fastsocial.co/v1/hashtag",
params={"tag": "space"},
headers={"X-API-Key": os.environ["FASTSOCIAL_API_KEY"]},
timeout=30,
)
r.raise_for_status()
print(r.json()["data"])
const url = new URL("https://data.fastsocial.co/v1/hashtag");
url.search = new URLSearchParams({ tag: "space" });
const res = await fetch(url, { headers: { "X-API-Key": API_KEY } });
const body = await res.json();
if (!body.ok) throw new Error(body.error.code);
console.log(body.data);
// Call from your server or a worker, never from a public web page: the key must stay secret.
// Node 18+ (built-in fetch). Run as an ES module: node app.mjs
const url = new URL("https://data.fastsocial.co/v1/hashtag");
url.search = new URLSearchParams({ tag: "space" });
const res = await fetch(url, { headers: { "X-API-Key": process.env.FASTSOCIAL_API_KEY } });
const { ok, data, error } = await res.json();
if (!ok) throw new Error(error.code);
console.log(data);
import os
import requests
r = requests.get(
"https://data.fastsocial.co/v1/place",
params={"id": "311693088"},
headers={"X-API-Key": os.environ["FASTSOCIAL_API_KEY"]},
timeout=30,
)
r.raise_for_status()
print(r.json()["data"])
const url = new URL("https://data.fastsocial.co/v1/place");
url.search = new URLSearchParams({ id: "311693088" });
const res = await fetch(url, { headers: { "X-API-Key": API_KEY } });
const body = await res.json();
if (!body.ok) throw new Error(body.error.code);
console.log(body.data);
// Call from your server or a worker, never from a public web page: the key must stay secret.
// Node 18+ (built-in fetch). Run as an ES module: node app.mjs
const url = new URL("https://data.fastsocial.co/v1/place");
url.search = new URLSearchParams({ id: "311693088" });
const res = await fetch(url, { headers: { "X-API-Key": process.env.FASTSOCIAL_API_KEY } });
const { ok, data, error } = await res.json();
if (!ok) throw new Error(error.code);
console.log(data);
import os
import requests
r = requests.get(
"https://data.fastsocial.co/v1/place-posts",
params={"id": "311693088"},
headers={"X-API-Key": os.environ["FASTSOCIAL_API_KEY"]},
timeout=30,
)
r.raise_for_status()
print(r.json()["data"])
const url = new URL("https://data.fastsocial.co/v1/place-posts");
url.search = new URLSearchParams({ id: "311693088" });
const res = await fetch(url, { headers: { "X-API-Key": API_KEY } });
const body = await res.json();
if (!body.ok) throw new Error(body.error.code);
console.log(body.data);
// Call from your server or a worker, never from a public web page: the key must stay secret.
// Node 18+ (built-in fetch). Run as an ES module: node app.mjs
const url = new URL("https://data.fastsocial.co/v1/place-posts");
url.search = new URLSearchParams({ id: "311693088" });
const res = await fetch(url, { headers: { "X-API-Key": process.env.FASTSOCIAL_API_KEY } });
const { ok, data, error } = await res.json();
if (!ok) throw new Error(error.code);
console.log(data);
import os
import requests
r = requests.get(
"https://data.fastsocial.co/v1/audio",
params={"id": "28784844067777520"},
headers={"X-API-Key": os.environ["FASTSOCIAL_API_KEY"]},
timeout=30,
)
r.raise_for_status()
print(r.json()["data"])
const url = new URL("https://data.fastsocial.co/v1/audio");
url.search = new URLSearchParams({ id: "28784844067777520" });
const res = await fetch(url, { headers: { "X-API-Key": API_KEY } });
const body = await res.json();
if (!body.ok) throw new Error(body.error.code);
console.log(body.data);
// Call from your server or a worker, never from a public web page: the key must stay secret.
// Node 18+ (built-in fetch). Run as an ES module: node app.mjs
const url = new URL("https://data.fastsocial.co/v1/audio");
url.search = new URLSearchParams({ id: "28784844067777520" });
const res = await fetch(url, { headers: { "X-API-Key": process.env.FASTSOCIAL_API_KEY } });
const { ok, data, error } = await res.json();
if (!ok) throw new Error(error.code);
console.log(data);
import os
import requests
r = requests.get(
"https://data.fastsocial.co/v1/audio-search",
params={"q": "believer"},
headers={"X-API-Key": os.environ["FASTSOCIAL_API_KEY"]},
timeout=30,
)
r.raise_for_status()
print(r.json()["data"])
const url = new URL("https://data.fastsocial.co/v1/audio-search");
url.search = new URLSearchParams({ q: "believer" });
const res = await fetch(url, { headers: { "X-API-Key": API_KEY } });
const body = await res.json();
if (!body.ok) throw new Error(body.error.code);
console.log(body.data);
// Call from your server or a worker, never from a public web page: the key must stay secret.
// Node 18+ (built-in fetch). Run as an ES module: node app.mjs
const url = new URL("https://data.fastsocial.co/v1/audio-search");
url.search = new URLSearchParams({ q: "believer" });
const res = await fetch(url, { headers: { "X-API-Key": process.env.FASTSOCIAL_API_KEY } });
const { ok, data, error } = await res.json();
if (!ok) throw new Error(error.code);
console.log(data);
import os
import requests
r = requests.get(
"https://data.fastsocial.co/v1/reels-search",
params={"q": "space"},
headers={"X-API-Key": os.environ["FASTSOCIAL_API_KEY"]},
timeout=30,
)
r.raise_for_status()
print(r.json()["data"])
const url = new URL("https://data.fastsocial.co/v1/reels-search");
url.search = new URLSearchParams({ q: "space" });
const res = await fetch(url, { headers: { "X-API-Key": API_KEY } });
const body = await res.json();
if (!body.ok) throw new Error(body.error.code);
console.log(body.data);
// Call from your server or a worker, never from a public web page: the key must stay secret.
// Node 18+ (built-in fetch). Run as an ES module: node app.mjs
const url = new URL("https://data.fastsocial.co/v1/reels-search");
url.search = new URLSearchParams({ q: "space" });
const res = await fetch(url, { headers: { "X-API-Key": process.env.FASTSOCIAL_API_KEY } });
const { ok, data, error } = await res.json();
if (!ok) throw new Error(error.code);
console.log(data);
Most-followed Instagram accounts, gainers and losers
GET/v1/top
The same data as fastsocial.co/most-followed-instagram-accounts (Instagram Top Charts): the biggest notable public Instagram accounts ranked by followers, updated daily, with 1, 7 and 30-day follower changes, country, category and projected milestones. Free (0 credits); needs any API key. Data CC BY 4.0: credit FastSocial and link the source.
import os
import requests
r = requests.get(
"https://data.fastsocial.co/v1/top",
params={"sort": "gainers", "country": "BR"},
headers={"X-API-Key": os.environ["FASTSOCIAL_API_KEY"]},
timeout=30,
)
r.raise_for_status()
print(r.json()["data"])
const url = new URL("https://data.fastsocial.co/v1/top");
url.search = new URLSearchParams({ sort: "gainers", country: "BR" });
const res = await fetch(url, { headers: { "X-API-Key": API_KEY } });
const body = await res.json();
if (!body.ok) throw new Error(body.error.code);
console.log(body.data);
// Call from your server or a worker, never from a public web page: the key must stay secret.
// Node 18+ (built-in fetch). Run as an ES module: node app.mjs
const url = new URL("https://data.fastsocial.co/v1/top");
url.search = new URLSearchParams({ sort: "gainers", country: "BR" });
const res = await fetch(url, { headers: { "X-API-Key": process.env.FASTSOCIAL_API_KEY } });
const { ok, data, error } = await res.json();
if (!ok) throw new Error(error.code);
console.log(data);
import os
import requests
r = requests.get(
"https://data.fastsocial.co/v1/usage",
params={},
headers={"X-API-Key": os.environ["FASTSOCIAL_API_KEY"]},
timeout=30,
)
r.raise_for_status()
print(r.json()["data"])
const url = new URL("https://data.fastsocial.co/v1/usage");
url.search = new URLSearchParams({ });
const res = await fetch(url, { headers: { "X-API-Key": API_KEY } });
const body = await res.json();
if (!body.ok) throw new Error(body.error.code);
console.log(body.data);
// Call from your server or a worker, never from a public web page: the key must stay secret.
// Node 18+ (built-in fetch). Run as an ES module: node app.mjs
const url = new URL("https://data.fastsocial.co/v1/usage");
url.search = new URLSearchParams({ });
const res = await fetch(url, { headers: { "X-API-Key": process.env.FASTSOCIAL_API_KEY } });
const { ok, data, error } = await res.json();
if (!ok) throw new Error(error.code);
console.log(data);
Public data only. Followers and following come one page per call, and likers returns a sample, not every like. Don't use the API to track or harass people, to spam them, to resell their data, or to collect data about minors. Account owners can opt out; after that the API returns 451 opted_out for that account.
We log what data was pulled and the result, but we never store who pulled it. We work with data, and data pulled by others helps our operations.