FastSocial API

Instagram API docs

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.

docs.md openapi.json

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.

PlanPriceCredits / monthRate limit
Free$0 / month5010 requests / minute
Starter$4.99 / month2,50030 requests / minute
Pro$9.99 / month8,00060 requests / minute
Ultra$29.99 / month26,000120 requests / minute
Insanity$249 / month250,000300 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.

StatusCodeMeaning
400invalid_usernameThe handle isn't a valid Instagram username.
400invalid_postThe post URL or shortcode can't be read.
400invalid_idThe highlight id is malformed.
400invalid_cursorThe cursor isn't one we issued. Pass next_cursor as is.
400missing_userSend username=<handle> or user_id=<numeric id>.
400invalid_user_iduser_id must be the numeric Instagram id.
400invalid_queryThe search text is empty or too long.
400invalid_tagThe hashtag is empty or has characters Instagram doesn't allow.
400invalid_paramA filter value isn't allowed. The message lists the valid values.
401missing_keyNo key sent. Use the X-API-Key header.
401invalid_keyThe key is wrong or disabled.
402plan_inactiveYour plan is paused or has ended. Renew it on your dashboard.
404not_foundNo account or post with that name. Charged, since it's a real answer.
404no_such_endpointUnknown path.
422private_accountThe account is private, so there's nothing public to return.
429rate_limitedToo many requests this minute. Wait for Retry-After seconds.
429quota_exceededMonthly credits are used up. Upgrade or wait for the reset.
429fair_use_limitInsanity 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.
451opted_outThe account owner asked to be excluded.
502upstream_errorInstagram didn't answer. Not charged; retry shortly.
503capacityTemporarily at capacity. Not charged; retry shortly.
503unavailableThis endpoint or the daily chart is briefly unavailable. Not charged; retry in a minute.
503maintenanceThe 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.

AppHow to add it
Claude Codeclaude 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.
ChatGPTSettings → Connectors. Turn on developer mode under Advanced, create a connector with https://data.fastsocial.co/mcp and sign in.
CursorAdd to ~/.cursor/mcp.json: {"mcpServers": {"instagram-data": {"url": "https://data.fastsocial.co/mcp"}}}
VS CodeAdd 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.

ParameterDescription
usernameInstagram handle, with or without @. A profile URL also works. Pass this or user_id.
user_idNumeric Instagram user id. Pass this or username.
Request
curl "https://data.fastsocial.co/v1/profile?username=nasa" \
  -H "X-API-Key: $FASTSOCIAL_API_KEY"
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);
<?php
$url = "https://data.fastsocial.co/v1/profile?" . http_build_query(['username' => "nasa"]);

$ch = curl_init($url);
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ["X-API-Key: " . getenv("FASTSOCIAL_API_KEY")],
    CURLOPT_TIMEOUT => 30,
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($body["data"]);
package main

import (
	"fmt"
	"io"
	"net/http"
	"net/url"
	"os"
)

func main() {
	q := url.Values{}
	q.Set("username", "nasa")
	req, _ := http.NewRequest("GET", "https://data.fastsocial.co/v1/profile?"+q.Encode(), nil)
	req.Header.Set("X-API-Key", os.Getenv("FASTSOCIAL_API_KEY"))

	res, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
require "net/http"
require "json"

uri = URI("https://data.fastsocial.co/v1/profile")
uri.query = URI.encode_www_form({"username" => "nasa"})

req = Net::HTTP::Get.new(uri)
req["X-API-Key"] = ENV["FASTSOCIAL_API_KEY"]
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
puts JSON.parse(res.body)["data"]
Response
200 OK
{
  "ok": true,
  "data": {
    "id": "528817151",
    "username": "nasa",
    "full_name": "NASA",
    "biography": "Exploring the universe and our home planet.",
    "external_url": "https://www.nasa.gov",
    "bio_links": [
      "https://www.nasa.gov"
    ],
    "followers": 104000000,
    "following": 90,
    "posts_count": 4950,
    "is_private": false,
    "is_verified": true,
    "is_business": true,
    "category": "Government organization",
    "avatar_url": "https://scontent.cdninstagram.com/…/avatar.jpg"
  },
  "meta": {
    "cache": "hit",
    "age_seconds": 212,
    "stale": false,
    "credits": 1,
    "credits_remaining": 4812
  }
}

Instagram username to user id

GET/v1/user-id

The numeric user id for a handle. Every endpoint also accepts either one directly, so you rarely need this.

Costs 1 credit per call.

ParameterDescription
usernameInstagram handle, with or without @. A profile URL also works. Pass this or user_id.
user_idNumeric Instagram user id. Pass this or username.
Request
curl "https://data.fastsocial.co/v1/user-id?username=nasa" \
  -H "X-API-Key: $FASTSOCIAL_API_KEY"
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);
<?php
$url = "https://data.fastsocial.co/v1/user-id?" . http_build_query(['username' => "nasa"]);

$ch = curl_init($url);
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ["X-API-Key: " . getenv("FASTSOCIAL_API_KEY")],
    CURLOPT_TIMEOUT => 30,
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($body["data"]);
package main

import (
	"fmt"
	"io"
	"net/http"
	"net/url"
	"os"
)

func main() {
	q := url.Values{}
	q.Set("username", "nasa")
	req, _ := http.NewRequest("GET", "https://data.fastsocial.co/v1/user-id?"+q.Encode(), nil)
	req.Header.Set("X-API-Key", os.Getenv("FASTSOCIAL_API_KEY"))

	res, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
require "net/http"
require "json"

uri = URI("https://data.fastsocial.co/v1/user-id")
uri.query = URI.encode_www_form({"username" => "nasa"})

req = Net::HTTP::Get.new(uri)
req["X-API-Key"] = ENV["FASTSOCIAL_API_KEY"]
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
puts JSON.parse(res.body)["data"]
Response
200 OK
{
  "ok": true,
  "data": {
    "id": "528817151",
    "username": "nasa"
  },
  "meta": {
    "cache": "hit",
    "age_seconds": 212,
    "stale": false,
    "credits": 1,
    "credits_remaining": 4812
  }
}

Instagram user id to username

GET/v1/username

The current handle for a numeric user id, which still works after the account renames itself.

Costs 2 credits per call.

ParameterDescription
user_idrequiredNumeric Instagram user id. Pass this or username.
Request
curl "https://data.fastsocial.co/v1/username?user_id=528817151" \
  -H "X-API-Key: $FASTSOCIAL_API_KEY"
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);
<?php
$url = "https://data.fastsocial.co/v1/username?" . http_build_query(['user_id' => "528817151"]);

$ch = curl_init($url);
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ["X-API-Key: " . getenv("FASTSOCIAL_API_KEY")],
    CURLOPT_TIMEOUT => 30,
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($body["data"]);
package main

import (
	"fmt"
	"io"
	"net/http"
	"net/url"
	"os"
)

func main() {
	q := url.Values{}
	q.Set("user_id", "528817151")
	req, _ := http.NewRequest("GET", "https://data.fastsocial.co/v1/username?"+q.Encode(), nil)
	req.Header.Set("X-API-Key", os.Getenv("FASTSOCIAL_API_KEY"))

	res, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
require "net/http"
require "json"

uri = URI("https://data.fastsocial.co/v1/username")
uri.query = URI.encode_www_form({"user_id" => "528817151"})

req = Net::HTTP::Get.new(uri)
req["X-API-Key"] = ENV["FASTSOCIAL_API_KEY"]
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
puts JSON.parse(res.body)["data"]
Response
200 OK
{
  "ok": true,
  "data": {
    "id": "528817151",
    "username": "nasa"
  },
  "meta": {
    "cache": "hit",
    "age_seconds": 212,
    "stale": false,
    "credits": 2,
    "credits_remaining": 4812
  }
}

Check if an Instagram handle exists and is public

GET/v1/check

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.

ParameterDescription
usernamerequiredInstagram handle, with or without @. A profile URL also works. Pass this or user_id.
Request
curl "https://data.fastsocial.co/v1/check?username=nasa" \
  -H "X-API-Key: $FASTSOCIAL_API_KEY"
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);
<?php
$url = "https://data.fastsocial.co/v1/check?" . http_build_query(['username' => "nasa"]);

$ch = curl_init($url);
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ["X-API-Key: " . getenv("FASTSOCIAL_API_KEY")],
    CURLOPT_TIMEOUT => 30,
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($body["data"]);
package main

import (
	"fmt"
	"io"
	"net/http"
	"net/url"
	"os"
)

func main() {
	q := url.Values{}
	q.Set("username", "nasa")
	req, _ := http.NewRequest("GET", "https://data.fastsocial.co/v1/check?"+q.Encode(), nil)
	req.Header.Set("X-API-Key", os.Getenv("FASTSOCIAL_API_KEY"))

	res, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
require "net/http"
require "json"

uri = URI("https://data.fastsocial.co/v1/check")
uri.query = URI.encode_www_form({"username" => "nasa"})

req = Net::HTTP::Get.new(uri)
req["X-API-Key"] = ENV["FASTSOCIAL_API_KEY"]
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
puts JSON.parse(res.body)["data"]
Response
200 OK
{
  "ok": true,
  "data": {
    "username": "nasa",
    "exists": true,
    "public": true,
    "state": "ok",
    "followers": 104000000,
    "is_verified": true
  },
  "meta": {
    "cache": "hit",
    "age_seconds": 212,
    "stale": false,
    "credits": 1,
    "credits_remaining": 4812
  }
}

Get recent Instagram posts

GET/v1/posts

12 posts per page, newest first, with likes, comments, views, caption and media URLs. Page with cursor.

Costs 1 credit per call. Paged: see pagination.

ParameterDescription
usernameInstagram handle, with or without @. A profile URL also works. Pass this or user_id.
user_idNumeric Instagram user id. Pass this or username.
cursornext_cursor from the previous page of the same request.
Request
curl "https://data.fastsocial.co/v1/posts?username=nasa" \
  -H "X-API-Key: $FASTSOCIAL_API_KEY"
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);
<?php
$url = "https://data.fastsocial.co/v1/posts?" . http_build_query(['username' => "nasa"]);

$ch = curl_init($url);
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ["X-API-Key: " . getenv("FASTSOCIAL_API_KEY")],
    CURLOPT_TIMEOUT => 30,
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($body["data"]);
package main

import (
	"fmt"
	"io"
	"net/http"
	"net/url"
	"os"
)

func main() {
	q := url.Values{}
	q.Set("username", "nasa")
	req, _ := http.NewRequest("GET", "https://data.fastsocial.co/v1/posts?"+q.Encode(), nil)
	req.Header.Set("X-API-Key", os.Getenv("FASTSOCIAL_API_KEY"))

	res, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
require "net/http"
require "json"

uri = URI("https://data.fastsocial.co/v1/posts")
uri.query = URI.encode_www_form({"username" => "nasa"})

req = Net::HTTP::Get.new(uri)
req["X-API-Key"] = ENV["FASTSOCIAL_API_KEY"]
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
puts JSON.parse(res.body)["data"]
Response
200 OK
{
  "ok": true,
  "data": {
    "username": "nasa",
    "user_id": "528817151",
    "posts": [
      {
        "shortcode": "C8x1abcDEF0",
        "url": "https://www.instagram.com/p/C8x1abcDEF0/",
        "taken_at": 1758600000,
        "format": "reel",
        "likes": 412000,
        "comments": 1900,
        "views": 5400000,
        "caption": "Sunrise over the Pacific, seen from the station.",
        "image_url": "https://scontent.cdninstagram.com/…/1080.jpg",
        "video_url": "https://scontent.cdninstagram.com/…/clip.mp4",
        "pinned": false,
        "owner_username": "nasa",
        "owner_id": "528817151"
      }
    ],
    "next_cursor": "QVFE…",
    "is_private": false
  },
  "meta": {
    "cache": "hit",
    "age_seconds": 212,
    "stale": false,
    "credits": 1,
    "credits_remaining": 4812
  }
}

Get an account's Instagram reels

GET/v1/reels

The reels tab of a public account: play counts, likes, comments, captions and video URLs. Page with cursor.

Costs 1 credit per call. Paged: see pagination.

ParameterDescription
usernameInstagram handle, with or without @. A profile URL also works. Pass this or user_id.
user_idNumeric Instagram user id. Pass this or username.
cursornext_cursor from the previous page of the same request.
Request
curl "https://data.fastsocial.co/v1/reels?username=nasa" \
  -H "X-API-Key: $FASTSOCIAL_API_KEY"
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);
<?php
$url = "https://data.fastsocial.co/v1/reels?" . http_build_query(['username' => "nasa"]);

$ch = curl_init($url);
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ["X-API-Key: " . getenv("FASTSOCIAL_API_KEY")],
    CURLOPT_TIMEOUT => 30,
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($body["data"]);
package main

import (
	"fmt"
	"io"
	"net/http"
	"net/url"
	"os"
)

func main() {
	q := url.Values{}
	q.Set("username", "nasa")
	req, _ := http.NewRequest("GET", "https://data.fastsocial.co/v1/reels?"+q.Encode(), nil)
	req.Header.Set("X-API-Key", os.Getenv("FASTSOCIAL_API_KEY"))

	res, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
require "net/http"
require "json"

uri = URI("https://data.fastsocial.co/v1/reels")
uri.query = URI.encode_www_form({"username" => "nasa"})

req = Net::HTTP::Get.new(uri)
req["X-API-Key"] = ENV["FASTSOCIAL_API_KEY"]
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
puts JSON.parse(res.body)["data"]
Response
200 OK
{
  "ok": true,
  "data": {
    "username": "nasa",
    "user_id": "528817151",
    "posts": [
      {
        "shortcode": "C8x1abcDEF0",
        "url": "https://www.instagram.com/p/C8x1abcDEF0/",
        "taken_at": 1758600000,
        "format": "reel",
        "likes": 412000,
        "comments": 1900,
        "views": 5400000,
        "caption": "Sunrise over the Pacific, seen from the station.",
        "image_url": "https://scontent.cdninstagram.com/…/1080.jpg",
        "video_url": "https://scontent.cdninstagram.com/…/clip.mp4",
        "pinned": false,
        "owner_username": "nasa",
        "owner_id": "528817151"
      }
    ],
    "next_cursor": "QVFE…",
    "is_private": false
  },
  "meta": {
    "cache": "hit",
    "age_seconds": 212,
    "stale": false,
    "credits": 1,
    "credits_remaining": 4812
  }
}

Get posts an account is tagged in

GET/v1/tagged

Public posts by other accounts that tag this account.

Costs 1 credit per call. Paged: see pagination.

ParameterDescription
usernameInstagram handle, with or without @. A profile URL also works. Pass this or user_id.
user_idNumeric Instagram user id. Pass this or username.
cursornext_cursor from the previous page of the same request.
Request
curl "https://data.fastsocial.co/v1/tagged?username=nasa" \
  -H "X-API-Key: $FASTSOCIAL_API_KEY"
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);
<?php
$url = "https://data.fastsocial.co/v1/tagged?" . http_build_query(['username' => "nasa"]);

$ch = curl_init($url);
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ["X-API-Key: " . getenv("FASTSOCIAL_API_KEY")],
    CURLOPT_TIMEOUT => 30,
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($body["data"]);
package main

import (
	"fmt"
	"io"
	"net/http"
	"net/url"
	"os"
)

func main() {
	q := url.Values{}
	q.Set("username", "nasa")
	req, _ := http.NewRequest("GET", "https://data.fastsocial.co/v1/tagged?"+q.Encode(), nil)
	req.Header.Set("X-API-Key", os.Getenv("FASTSOCIAL_API_KEY"))

	res, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
require "net/http"
require "json"

uri = URI("https://data.fastsocial.co/v1/tagged")
uri.query = URI.encode_www_form({"username" => "nasa"})

req = Net::HTTP::Get.new(uri)
req["X-API-Key"] = ENV["FASTSOCIAL_API_KEY"]
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
puts JSON.parse(res.body)["data"]
Response
200 OK
{
  "ok": true,
  "data": {
    "username": "nasa",
    "user_id": "528817151",
    "posts": [
      {
        "shortcode": "C8x1abcDEF0",
        "url": "https://www.instagram.com/p/C8x1abcDEF0/",
        "taken_at": 1758600000,
        "format": "reel",
        "likes": 412000,
        "comments": 1900,
        "views": 5400000,
        "caption": "Sunrise over the Pacific, seen from the station.",
        "image_url": "https://scontent.cdninstagram.com/…/1080.jpg",
        "video_url": "https://scontent.cdninstagram.com/…/clip.mp4",
        "pinned": false,
        "owner_username": "nasa",
        "owner_id": "528817151"
      }
    ],
    "next_cursor": "QVFE…",
    "is_private": false
  },
  "meta": {
    "cache": "hit",
    "age_seconds": 212,
    "stale": false,
    "credits": 1,
    "credits_remaining": 4812
  }
}

Get one Instagram post or reel

GET/v1/post

Likes, comments, views, caption, owner and media URLs for a single post, reel or IGTV video.

Costs 1 credit per call.

ParameterDescription
urlPost, reel or IGTV URL. Pass this or shortcode.
shortcodeThe code in the post URL (instagram.com/p/<code>/).
Request
curl "https://data.fastsocial.co/v1/post?url=https://www.instagram.com/reel/DdhFkS7KGkZ/" \
  -H "X-API-Key: $FASTSOCIAL_API_KEY"
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);
<?php
$url = "https://data.fastsocial.co/v1/post?" . http_build_query(['url' => "https://www.instagram.com/reel/DdhFkS7KGkZ/"]);

$ch = curl_init($url);
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ["X-API-Key: " . getenv("FASTSOCIAL_API_KEY")],
    CURLOPT_TIMEOUT => 30,
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($body["data"]);
package main

import (
	"fmt"
	"io"
	"net/http"
	"net/url"
	"os"
)

func main() {
	q := url.Values{}
	q.Set("url", "https://www.instagram.com/reel/DdhFkS7KGkZ/")
	req, _ := http.NewRequest("GET", "https://data.fastsocial.co/v1/post?"+q.Encode(), nil)
	req.Header.Set("X-API-Key", os.Getenv("FASTSOCIAL_API_KEY"))

	res, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
require "net/http"
require "json"

uri = URI("https://data.fastsocial.co/v1/post")
uri.query = URI.encode_www_form({"url" => "https://www.instagram.com/reel/DdhFkS7KGkZ/"})

req = Net::HTTP::Get.new(uri)
req["X-API-Key"] = ENV["FASTSOCIAL_API_KEY"]
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
puts JSON.parse(res.body)["data"]
Response
200 OK
{
  "ok": true,
  "data": {
    "shortcode": "C8x1abcDEF0",
    "url": "https://www.instagram.com/p/C8x1abcDEF0/",
    "taken_at": 1758600000,
    "format": "reel",
    "likes": 412000,
    "comments": 1900,
    "views": 5400000,
    "caption": "Sunrise over the Pacific, seen from the station.",
    "image_url": "https://scontent.cdninstagram.com/…/1080.jpg",
    "video_url": "https://scontent.cdninstagram.com/…/clip.mp4",
    "pinned": false,
    "owner_username": "nasa",
    "owner_id": "528817151"
  },
  "meta": {
    "cache": "hit",
    "age_seconds": 212,
    "stale": false,
    "credits": 1,
    "credits_remaining": 4812
  }
}

Download URLs for a post, reel or carousel

GET/v1/media

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.

ParameterDescription
urlPost, reel or IGTV URL. Pass this or shortcode.
shortcodeThe code in the post URL (instagram.com/p/<code>/).
Request
curl "https://data.fastsocial.co/v1/media?url=https://www.instagram.com/reel/DdhFkS7KGkZ/" \
  -H "X-API-Key: $FASTSOCIAL_API_KEY"
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);
<?php
$url = "https://data.fastsocial.co/v1/media?" . http_build_query(['url' => "https://www.instagram.com/reel/DdhFkS7KGkZ/"]);

$ch = curl_init($url);
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ["X-API-Key: " . getenv("FASTSOCIAL_API_KEY")],
    CURLOPT_TIMEOUT => 30,
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($body["data"]);
package main

import (
	"fmt"
	"io"
	"net/http"
	"net/url"
	"os"
)

func main() {
	q := url.Values{}
	q.Set("url", "https://www.instagram.com/reel/DdhFkS7KGkZ/")
	req, _ := http.NewRequest("GET", "https://data.fastsocial.co/v1/media?"+q.Encode(), nil)
	req.Header.Set("X-API-Key", os.Getenv("FASTSOCIAL_API_KEY"))

	res, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
require "net/http"
require "json"

uri = URI("https://data.fastsocial.co/v1/media")
uri.query = URI.encode_www_form({"url" => "https://www.instagram.com/reel/DdhFkS7KGkZ/"})

req = Net::HTTP::Get.new(uri)
req["X-API-Key"] = ENV["FASTSOCIAL_API_KEY"]
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
puts JSON.parse(res.body)["data"]
Response
200 OK
{
  "ok": true,
  "data": {
    "shortcode": "C8x1abcDEF0",
    "owner_username": "nasa",
    "files": [
      {
        "type": "video",
        "url": "https://www.instagram.com/p/C8x1abcDEF0/",
        "thumbnail_url": "https://scontent.cdninstagram.com/…/thumb.jpg"
      }
    ]
  },
  "meta": {
    "cache": "hit",
    "age_seconds": 212,
    "stale": false,
    "credits": 1,
    "credits_remaining": 4812
  }
}

Get comments on an Instagram post

GET/v1/comments

The top comments on a post with author, text, time, likes and reply count, plus the total comment count.

Costs 1 credit per call.

ParameterDescription
urlPost, reel or IGTV URL. Pass this or shortcode.
shortcodeThe code in the post URL (instagram.com/p/<code>/).
Request
curl "https://data.fastsocial.co/v1/comments?url=https://www.instagram.com/reel/DdhFkS7KGkZ/" \
  -H "X-API-Key: $FASTSOCIAL_API_KEY"
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);
<?php
$url = "https://data.fastsocial.co/v1/comments?" . http_build_query(['url' => "https://www.instagram.com/reel/DdhFkS7KGkZ/"]);

$ch = curl_init($url);
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ["X-API-Key: " . getenv("FASTSOCIAL_API_KEY")],
    CURLOPT_TIMEOUT => 30,
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($body["data"]);
package main

import (
	"fmt"
	"io"
	"net/http"
	"net/url"
	"os"
)

func main() {
	q := url.Values{}
	q.Set("url", "https://www.instagram.com/reel/DdhFkS7KGkZ/")
	req, _ := http.NewRequest("GET", "https://data.fastsocial.co/v1/comments?"+q.Encode(), nil)
	req.Header.Set("X-API-Key", os.Getenv("FASTSOCIAL_API_KEY"))

	res, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
require "net/http"
require "json"

uri = URI("https://data.fastsocial.co/v1/comments")
uri.query = URI.encode_www_form({"url" => "https://www.instagram.com/reel/DdhFkS7KGkZ/"})

req = Net::HTTP::Get.new(uri)
req["X-API-Key"] = ENV["FASTSOCIAL_API_KEY"]
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
puts JSON.parse(res.body)["data"]
Response
200 OK
{
  "ok": true,
  "data": {
    "shortcode": "C8x1abcDEF0",
    "total": 581,
    "comments": 1900
  },
  "meta": {
    "cache": "hit",
    "age_seconds": 212,
    "stale": false,
    "credits": 1,
    "credits_remaining": 4812
  }
}

Get replies to an Instagram comment

GET/v1/comment-replies

Replies under one comment. Page with cursor.

Costs 3 credits per call. Paged: see pagination.

ParameterDescription
urlPost, reel or IGTV URL. Pass this or shortcode.
shortcodeThe code in the post URL (instagram.com/p/<code>/).
comment_idrequiredid of a comment from /v1/comments.
cursornext_cursor from the previous page of the same request.
Request
curl "https://data.fastsocial.co/v1/comment-replies?url=https://www.instagram.com/reel/DdhFkS7KGkZ/&comment_id=17935912383123296" \
  -H "X-API-Key: $FASTSOCIAL_API_KEY"
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);
<?php
$url = "https://data.fastsocial.co/v1/comment-replies?" . http_build_query(['url' => "https://www.instagram.com/reel/DdhFkS7KGkZ/", 'comment_id' => "17935912383123296"]);

$ch = curl_init($url);
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ["X-API-Key: " . getenv("FASTSOCIAL_API_KEY")],
    CURLOPT_TIMEOUT => 30,
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($body["data"]);
package main

import (
	"fmt"
	"io"
	"net/http"
	"net/url"
	"os"
)

func main() {
	q := url.Values{}
	q.Set("url", "https://www.instagram.com/reel/DdhFkS7KGkZ/")
	q.Set("comment_id", "17935912383123296")
	req, _ := http.NewRequest("GET", "https://data.fastsocial.co/v1/comment-replies?"+q.Encode(), nil)
	req.Header.Set("X-API-Key", os.Getenv("FASTSOCIAL_API_KEY"))

	res, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
require "net/http"
require "json"

uri = URI("https://data.fastsocial.co/v1/comment-replies")
uri.query = URI.encode_www_form({"url" => "https://www.instagram.com/reel/DdhFkS7KGkZ/", "comment_id" => "17935912383123296"})

req = Net::HTTP::Get.new(uri)
req["X-API-Key"] = ENV["FASTSOCIAL_API_KEY"]
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
puts JSON.parse(res.body)["data"]
Response
200 OK
{
  "ok": true,
  "data": {
    "shortcode": "C8x1abcDEF0",
    "comment_id": "…",
    "comments": 1900,
    "next_cursor": "QVFE…"
  },
  "meta": {
    "cache": "hit",
    "age_seconds": 212,
    "stale": false,
    "credits": 3,
    "credits_remaining": 4812
  }
}

Get accounts that liked an Instagram post

GET/v1/likers

A sample of accounts that liked a public post, plus the total like count. One page per call with no cursor, so it is not the full list of likers.

Costs 3 credits per call.

ParameterDescription
urlPost, reel or IGTV URL. Pass this or shortcode.
shortcodeThe code in the post URL (instagram.com/p/<code>/).
Request
curl "https://data.fastsocial.co/v1/likers?url=https://www.instagram.com/reel/DdhFkS7KGkZ/" \
  -H "X-API-Key: $FASTSOCIAL_API_KEY"
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);
<?php
$url = "https://data.fastsocial.co/v1/likers?" . http_build_query(['url' => "https://www.instagram.com/reel/DdhFkS7KGkZ/"]);

$ch = curl_init($url);
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ["X-API-Key: " . getenv("FASTSOCIAL_API_KEY")],
    CURLOPT_TIMEOUT => 30,
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($body["data"]);
package main

import (
	"fmt"
	"io"
	"net/http"
	"net/url"
	"os"
)

func main() {
	q := url.Values{}
	q.Set("url", "https://www.instagram.com/reel/DdhFkS7KGkZ/")
	req, _ := http.NewRequest("GET", "https://data.fastsocial.co/v1/likers?"+q.Encode(), nil)
	req.Header.Set("X-API-Key", os.Getenv("FASTSOCIAL_API_KEY"))

	res, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
require "net/http"
require "json"

uri = URI("https://data.fastsocial.co/v1/likers")
uri.query = URI.encode_www_form({"url" => "https://www.instagram.com/reel/DdhFkS7KGkZ/"})

req = Net::HTTP::Get.new(uri)
req["X-API-Key"] = ENV["FASTSOCIAL_API_KEY"]
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
puts JSON.parse(res.body)["data"]
Response
200 OK
{
  "ok": true,
  "data": {
    "username": "nasa",
    "user_id": "528817151",
    "total": 581,
    "users": [
      {
        "id": "528817151",
        "username": "nasa",
        "full_name": "NASA",
        "is_private": false,
        "is_verified": true,
        "avatar_url": "https://scontent.cdninstagram.com/…/avatar.jpg"
      }
    ],
    "next_cursor": "QVFE…"
  },
  "meta": {
    "cache": "hit",
    "age_seconds": 212,
    "stale": false,
    "credits": 3,
    "credits_remaining": 4812
  }
}

Instagram engagement rate calculator

GET/v1/insights

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.

ParameterDescription
usernameInstagram handle, with or without @. A profile URL also works. Pass this or user_id.
user_idNumeric Instagram user id. Pass this or username.
Request
curl "https://data.fastsocial.co/v1/insights?username=nasa" \
  -H "X-API-Key: $FASTSOCIAL_API_KEY"
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);
<?php
$url = "https://data.fastsocial.co/v1/insights?" . http_build_query(['username' => "nasa"]);

$ch = curl_init($url);
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ["X-API-Key: " . getenv("FASTSOCIAL_API_KEY")],
    CURLOPT_TIMEOUT => 30,
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($body["data"]);
package main

import (
	"fmt"
	"io"
	"net/http"
	"net/url"
	"os"
)

func main() {
	q := url.Values{}
	q.Set("username", "nasa")
	req, _ := http.NewRequest("GET", "https://data.fastsocial.co/v1/insights?"+q.Encode(), nil)
	req.Header.Set("X-API-Key", os.Getenv("FASTSOCIAL_API_KEY"))

	res, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
require "net/http"
require "json"

uri = URI("https://data.fastsocial.co/v1/insights")
uri.query = URI.encode_www_form({"username" => "nasa"})

req = Net::HTTP::Get.new(uri)
req["X-API-Key"] = ENV["FASTSOCIAL_API_KEY"]
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
puts JSON.parse(res.body)["data"]
Response
200 OK
{
  "ok": true,
  "data": {
    "username": "nasa",
    "followers": 104000000,
    "follower_bucket": "1m+",
    "sample_size": 12,
    "confidence": "good",
    "avg_likes": 412000.0,
    "avg_comments": 1900.0,
    "engagement_rate_pct": 0.427,
    "engagement_rate_median_pct": 0.391,
    "posts_per_week": 9.1,
    "format_share": {
      "reel": 0.42,
      "carousel": 0.33,
      "image": 0.25
    },
    "best_hours_utc": [
      {
        "hour_utc": 16,
        "posts": 3,
        "score": 1.21
      }
    ],
    "last_post_at": 1758600000,
    "benchmark_percentile": 38,
    "benchmark_month": "2026-10"
  },
  "meta": {
    "cache": "hit",
    "age_seconds": 212,
    "stale": false,
    "credits": 2,
    "credits_remaining": 4812
  }
}

Get an account's followers

GET/v1/followers

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.

Costs 3 credits per call. Paged: see pagination.

ParameterDescription
usernameInstagram handle, with or without @. A profile URL also works. Pass this or user_id.
user_idNumeric Instagram user id. Pass this or username.
cursornext_cursor from the previous page of the same request.
Request
curl "https://data.fastsocial.co/v1/followers?username=nasa" \
  -H "X-API-Key: $FASTSOCIAL_API_KEY"
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);
<?php
$url = "https://data.fastsocial.co/v1/followers?" . http_build_query(['username' => "nasa"]);

$ch = curl_init($url);
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ["X-API-Key: " . getenv("FASTSOCIAL_API_KEY")],
    CURLOPT_TIMEOUT => 30,
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($body["data"]);
package main

import (
	"fmt"
	"io"
	"net/http"
	"net/url"
	"os"
)

func main() {
	q := url.Values{}
	q.Set("username", "nasa")
	req, _ := http.NewRequest("GET", "https://data.fastsocial.co/v1/followers?"+q.Encode(), nil)
	req.Header.Set("X-API-Key", os.Getenv("FASTSOCIAL_API_KEY"))

	res, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
require "net/http"
require "json"

uri = URI("https://data.fastsocial.co/v1/followers")
uri.query = URI.encode_www_form({"username" => "nasa"})

req = Net::HTTP::Get.new(uri)
req["X-API-Key"] = ENV["FASTSOCIAL_API_KEY"]
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
puts JSON.parse(res.body)["data"]
Response
200 OK
{
  "ok": true,
  "data": {
    "username": "nasa",
    "user_id": "528817151",
    "total": 581,
    "users": [
      {
        "id": "528817151",
        "username": "nasa",
        "full_name": "NASA",
        "is_private": false,
        "is_verified": true,
        "avatar_url": "https://scontent.cdninstagram.com/…/avatar.jpg"
      }
    ],
    "next_cursor": "QVFE…"
  },
  "meta": {
    "cache": "hit",
    "age_seconds": 212,
    "stale": false,
    "credits": 3,
    "credits_remaining": 4812
  }
}

Get accounts an account follows

GET/v1/following

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.

Costs 3 credits per call. Paged: see pagination.

ParameterDescription
usernameInstagram handle, with or without @. A profile URL also works. Pass this or user_id.
user_idNumeric Instagram user id. Pass this or username.
cursornext_cursor from the previous page of the same request.
Request
curl "https://data.fastsocial.co/v1/following?username=nasa" \
  -H "X-API-Key: $FASTSOCIAL_API_KEY"
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);
<?php
$url = "https://data.fastsocial.co/v1/following?" . http_build_query(['username' => "nasa"]);

$ch = curl_init($url);
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ["X-API-Key: " . getenv("FASTSOCIAL_API_KEY")],
    CURLOPT_TIMEOUT => 30,
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($body["data"]);
package main

import (
	"fmt"
	"io"
	"net/http"
	"net/url"
	"os"
)

func main() {
	q := url.Values{}
	q.Set("username", "nasa")
	req, _ := http.NewRequest("GET", "https://data.fastsocial.co/v1/following?"+q.Encode(), nil)
	req.Header.Set("X-API-Key", os.Getenv("FASTSOCIAL_API_KEY"))

	res, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
require "net/http"
require "json"

uri = URI("https://data.fastsocial.co/v1/following")
uri.query = URI.encode_www_form({"username" => "nasa"})

req = Net::HTTP::Get.new(uri)
req["X-API-Key"] = ENV["FASTSOCIAL_API_KEY"]
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
puts JSON.parse(res.body)["data"]
Response
200 OK
{
  "ok": true,
  "data": {
    "username": "nasa",
    "user_id": "528817151",
    "total": 581,
    "users": [
      {
        "id": "528817151",
        "username": "nasa",
        "full_name": "NASA",
        "is_private": false,
        "is_verified": true,
        "avatar_url": "https://scontent.cdninstagram.com/…/avatar.jpg"
      }
    ],
    "next_cursor": "QVFE…"
  },
  "meta": {
    "cache": "hit",
    "age_seconds": 212,
    "stale": false,
    "credits": 3,
    "credits_remaining": 4812
  }
}

Find similar Instagram accounts

GET/v1/similar

Accounts Instagram considers related to this one.

Costs 1 credit per call.

ParameterDescription
usernameInstagram handle, with or without @. A profile URL also works. Pass this or user_id.
user_idNumeric Instagram user id. Pass this or username.
Request
curl "https://data.fastsocial.co/v1/similar?username=nasa" \
  -H "X-API-Key: $FASTSOCIAL_API_KEY"
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);
<?php
$url = "https://data.fastsocial.co/v1/similar?" . http_build_query(['username' => "nasa"]);

$ch = curl_init($url);
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ["X-API-Key: " . getenv("FASTSOCIAL_API_KEY")],
    CURLOPT_TIMEOUT => 30,
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($body["data"]);
package main

import (
	"fmt"
	"io"
	"net/http"
	"net/url"
	"os"
)

func main() {
	q := url.Values{}
	q.Set("username", "nasa")
	req, _ := http.NewRequest("GET", "https://data.fastsocial.co/v1/similar?"+q.Encode(), nil)
	req.Header.Set("X-API-Key", os.Getenv("FASTSOCIAL_API_KEY"))

	res, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
require "net/http"
require "json"

uri = URI("https://data.fastsocial.co/v1/similar")
uri.query = URI.encode_www_form({"username" => "nasa"})

req = Net::HTTP::Get.new(uri)
req["X-API-Key"] = ENV["FASTSOCIAL_API_KEY"]
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
puts JSON.parse(res.body)["data"]
Response
200 OK
{
  "ok": true,
  "data": {
    "username": "nasa",
    "user_id": "528817151",
    "users": [
      {
        "id": "528817151",
        "username": "nasa",
        "full_name": "NASA",
        "is_private": false,
        "is_verified": true,
        "avatar_url": "https://scontent.cdninstagram.com/…/avatar.jpg"
      }
    ]
  },
  "meta": {
    "cache": "hit",
    "age_seconds": 212,
    "stale": false,
    "credits": 1,
    "credits_remaining": 4812
  }
}

View Instagram stories anonymously

GET/v1/stories

Stories posted in the last 24 hours by a public account, with image and video URLs. Signed CDN links that expire after a few hours.

Costs 3 credits per call.

ParameterDescription
usernameInstagram handle, with or without @. A profile URL also works. Pass this or user_id.
user_idNumeric Instagram user id. Pass this or username.
Request
curl "https://data.fastsocial.co/v1/stories?username=nasa" \
  -H "X-API-Key: $FASTSOCIAL_API_KEY"
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);
<?php
$url = "https://data.fastsocial.co/v1/stories?" . http_build_query(['username' => "nasa"]);

$ch = curl_init($url);
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ["X-API-Key: " . getenv("FASTSOCIAL_API_KEY")],
    CURLOPT_TIMEOUT => 30,
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($body["data"]);
package main

import (
	"fmt"
	"io"
	"net/http"
	"net/url"
	"os"
)

func main() {
	q := url.Values{}
	q.Set("username", "nasa")
	req, _ := http.NewRequest("GET", "https://data.fastsocial.co/v1/stories?"+q.Encode(), nil)
	req.Header.Set("X-API-Key", os.Getenv("FASTSOCIAL_API_KEY"))

	res, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
require "net/http"
require "json"

uri = URI("https://data.fastsocial.co/v1/stories")
uri.query = URI.encode_www_form({"username" => "nasa"})

req = Net::HTTP::Get.new(uri)
req["X-API-Key"] = ENV["FASTSOCIAL_API_KEY"]
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
puts JSON.parse(res.body)["data"]
Response
200 OK
{
  "ok": true,
  "data": {
    "username": "nasa",
    "count": 3,
    "stories": [
      {
        "id": "3474581261890123456",
        "is_video": false,
        "image_url": "https://scontent.cdninstagram.com/…/1080.jpg",
        "video_url": "https://scontent.cdninstagram.com/…/clip.mp4",
        "taken_at": 1758600000,
        "expires_at": 1758686400,
        "width": 1080,
        "height": 1920
      }
    ]
  },
  "meta": {
    "cache": "hit",
    "age_seconds": 212,
    "stale": false,
    "credits": 3,
    "credits_remaining": 4812
  }
}

Get Instagram story highlights

GET/v1/highlights

Title, cover image and item count for each highlight. Pass an id to /v1/highlight for its items.

Costs 1 credit per call.

ParameterDescription
usernameInstagram handle, with or without @. A profile URL also works. Pass this or user_id.
user_idNumeric Instagram user id. Pass this or username.
Request
curl "https://data.fastsocial.co/v1/highlights?username=nasa" \
  -H "X-API-Key: $FASTSOCIAL_API_KEY"
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);
<?php
$url = "https://data.fastsocial.co/v1/highlights?" . http_build_query(['username' => "nasa"]);

$ch = curl_init($url);
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ["X-API-Key: " . getenv("FASTSOCIAL_API_KEY")],
    CURLOPT_TIMEOUT => 30,
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($body["data"]);
package main

import (
	"fmt"
	"io"
	"net/http"
	"net/url"
	"os"
)

func main() {
	q := url.Values{}
	q.Set("username", "nasa")
	req, _ := http.NewRequest("GET", "https://data.fastsocial.co/v1/highlights?"+q.Encode(), nil)
	req.Header.Set("X-API-Key", os.Getenv("FASTSOCIAL_API_KEY"))

	res, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
require "net/http"
require "json"

uri = URI("https://data.fastsocial.co/v1/highlights")
uri.query = URI.encode_www_form({"username" => "nasa"})

req = Net::HTTP::Get.new(uri)
req["X-API-Key"] = ENV["FASTSOCIAL_API_KEY"]
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
puts JSON.parse(res.body)["data"]
Response
200 OK
{
  "ok": true,
  "data": {
    "username": "nasa",
    "count": 3,
    "highlights": [
      {
        "id": "highlight:17960293069066406",
        "title": "Artemis",
        "cover_url": "https://scontent.cdninstagram.com/…/cover.jpg",
        "item_count": 24
      }
    ]
  },
  "meta": {
    "cache": "hit",
    "age_seconds": 212,
    "stale": false,
    "credits": 1,
    "credits_remaining": 4812
  }
}

Get the items in one highlight

GET/v1/highlight

Every photo and video inside one highlight, with signed CDN URLs.

Costs 3 credits per call.

ParameterDescription
idrequiredFor example highlight:17960293069066406.
Request
curl "https://data.fastsocial.co/v1/highlight?id=highlight:17960293069066406" \
  -H "X-API-Key: $FASTSOCIAL_API_KEY"
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);
<?php
$url = "https://data.fastsocial.co/v1/highlight?" . http_build_query(['id' => "highlight:17960293069066406"]);

$ch = curl_init($url);
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ["X-API-Key: " . getenv("FASTSOCIAL_API_KEY")],
    CURLOPT_TIMEOUT => 30,
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($body["data"]);
package main

import (
	"fmt"
	"io"
	"net/http"
	"net/url"
	"os"
)

func main() {
	q := url.Values{}
	q.Set("id", "highlight:17960293069066406")
	req, _ := http.NewRequest("GET", "https://data.fastsocial.co/v1/highlight?"+q.Encode(), nil)
	req.Header.Set("X-API-Key", os.Getenv("FASTSOCIAL_API_KEY"))

	res, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
require "net/http"
require "json"

uri = URI("https://data.fastsocial.co/v1/highlight")
uri.query = URI.encode_www_form({"id" => "highlight:17960293069066406"})

req = Net::HTTP::Get.new(uri)
req["X-API-Key"] = ENV["FASTSOCIAL_API_KEY"]
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
puts JSON.parse(res.body)["data"]
Response
200 OK
{
  "ok": true,
  "data": {
    "id": "highlight:17960293069066406",
    "count": 3,
    "items": [
      {
        "id": "3474581261890123456",
        "is_video": false,
        "image_url": "https://scontent.cdninstagram.com/…/1080.jpg",
        "video_url": "https://scontent.cdninstagram.com/…/clip.mp4",
        "taken_at": 1758600000,
        "expires_at": 1758686400,
        "width": 1080,
        "height": 1920
      }
    ]
  },
  "meta": {
    "cache": "hit",
    "age_seconds": 212,
    "stale": false,
    "credits": 3,
    "credits_remaining": 4812
  }
}

Get posts for an Instagram hashtag

GET/v1/hashtag

Recent posts under a hashtag and its total post count. Page with cursor.

Costs 1 credit per call. Paged: see pagination.

ParameterDescription
tagrequiredHashtag, with or without #.
cursornext_cursor from the previous page of the same request.
Request
curl "https://data.fastsocial.co/v1/hashtag?tag=space" \
  -H "X-API-Key: $FASTSOCIAL_API_KEY"
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);
<?php
$url = "https://data.fastsocial.co/v1/hashtag?" . http_build_query(['tag' => "space"]);

$ch = curl_init($url);
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ["X-API-Key: " . getenv("FASTSOCIAL_API_KEY")],
    CURLOPT_TIMEOUT => 30,
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($body["data"]);
package main

import (
	"fmt"
	"io"
	"net/http"
	"net/url"
	"os"
)

func main() {
	q := url.Values{}
	q.Set("tag", "space")
	req, _ := http.NewRequest("GET", "https://data.fastsocial.co/v1/hashtag?"+q.Encode(), nil)
	req.Header.Set("X-API-Key", os.Getenv("FASTSOCIAL_API_KEY"))

	res, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
require "net/http"
require "json"

uri = URI("https://data.fastsocial.co/v1/hashtag")
uri.query = URI.encode_www_form({"tag" => "space"})

req = Net::HTTP::Get.new(uri)
req["X-API-Key"] = ENV["FASTSOCIAL_API_KEY"]
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
puts JSON.parse(res.body)["data"]
Response
200 OK
{
  "ok": true,
  "data": {
    "tag": "space",
    "hashtag": {
      "id": "528817151",
      "name": "NASA Johnson Space Center",
      "media_count": 28604
    },
    "posts": [
      {
        "shortcode": "C8x1abcDEF0",
        "url": "https://www.instagram.com/p/C8x1abcDEF0/",
        "taken_at": 1758600000,
        "format": "reel",
        "likes": 412000,
        "comments": 1900,
        "views": 5400000,
        "caption": "Sunrise over the Pacific, seen from the station.",
        "image_url": "https://scontent.cdninstagram.com/…/1080.jpg",
        "video_url": "https://scontent.cdninstagram.com/…/clip.mp4",
        "pinned": false,
        "owner_username": "nasa",
        "owner_id": "528817151"
      }
    ],
    "next_cursor": "QVFE…"
  },
  "meta": {
    "cache": "hit",
    "age_seconds": 212,
    "stale": false,
    "credits": 1,
    "credits_remaining": 4812
  }
}

Get an Instagram location

GET/v1/place

Name, category, address, city, phone, website and post count of a location page. Find ids with /v1/search.

Costs 1 credit per call.

ParameterDescription
idrequiredNumeric location id.
Request
curl "https://data.fastsocial.co/v1/place?id=311693088" \
  -H "X-API-Key: $FASTSOCIAL_API_KEY"
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);
<?php
$url = "https://data.fastsocial.co/v1/place?" . http_build_query(['id' => "311693088"]);

$ch = curl_init($url);
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ["X-API-Key: " . getenv("FASTSOCIAL_API_KEY")],
    CURLOPT_TIMEOUT => 30,
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($body["data"]);
package main

import (
	"fmt"
	"io"
	"net/http"
	"net/url"
	"os"
)

func main() {
	q := url.Values{}
	q.Set("id", "311693088")
	req, _ := http.NewRequest("GET", "https://data.fastsocial.co/v1/place?"+q.Encode(), nil)
	req.Header.Set("X-API-Key", os.Getenv("FASTSOCIAL_API_KEY"))

	res, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
require "net/http"
require "json"

uri = URI("https://data.fastsocial.co/v1/place")
uri.query = URI.encode_www_form({"id" => "311693088"})

req = Net::HTTP::Get.new(uri)
req["X-API-Key"] = ENV["FASTSOCIAL_API_KEY"]
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
puts JSON.parse(res.body)["data"]
Response
200 OK
{
  "ok": true,
  "data": {
    "id": "311693088",
    "name": "NASA Johnson Space Center",
    "category": "Government organization",
    "address": "2101 E NASA Pkwy",
    "city": "Houston, TX",
    "zip": "77058",
    "lat": 29.5519,
    "lng": -95.0981,
    "phone": "+1 281-483-0123",
    "website": "https://www.nasa.gov",
    "media_count": 28604
  },
  "meta": {
    "cache": "hit",
    "age_seconds": 212,
    "stale": false,
    "credits": 1,
    "credits_remaining": 4812
  }
}

Get posts tagged at an Instagram location

GET/v1/place-posts

Recent posts geotagged at a location. Page with cursor.

Costs 1 credit per call. Paged: see pagination.

ParameterDescription
idrequiredNumeric location id.
cursornext_cursor from the previous page of the same request.
Request
curl "https://data.fastsocial.co/v1/place-posts?id=311693088" \
  -H "X-API-Key: $FASTSOCIAL_API_KEY"
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);
<?php
$url = "https://data.fastsocial.co/v1/place-posts?" . http_build_query(['id' => "311693088"]);

$ch = curl_init($url);
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ["X-API-Key: " . getenv("FASTSOCIAL_API_KEY")],
    CURLOPT_TIMEOUT => 30,
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($body["data"]);
package main

import (
	"fmt"
	"io"
	"net/http"
	"net/url"
	"os"
)

func main() {
	q := url.Values{}
	q.Set("id", "311693088")
	req, _ := http.NewRequest("GET", "https://data.fastsocial.co/v1/place-posts?"+q.Encode(), nil)
	req.Header.Set("X-API-Key", os.Getenv("FASTSOCIAL_API_KEY"))

	res, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
require "net/http"
require "json"

uri = URI("https://data.fastsocial.co/v1/place-posts")
uri.query = URI.encode_www_form({"id" => "311693088"})

req = Net::HTTP::Get.new(uri)
req["X-API-Key"] = ENV["FASTSOCIAL_API_KEY"]
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
puts JSON.parse(res.body)["data"]
Response
200 OK
{
  "ok": true,
  "data": {
    "place_id": "311693088",
    "posts": [
      {
        "shortcode": "C8x1abcDEF0",
        "url": "https://www.instagram.com/p/C8x1abcDEF0/",
        "taken_at": 1758600000,
        "format": "reel",
        "likes": 412000,
        "comments": 1900,
        "views": 5400000,
        "caption": "Sunrise over the Pacific, seen from the station.",
        "image_url": "https://scontent.cdninstagram.com/…/1080.jpg",
        "video_url": "https://scontent.cdninstagram.com/…/clip.mp4",
        "pinned": false,
        "owner_username": "nasa",
        "owner_id": "528817151"
      }
    ],
    "next_cursor": "QVFE…"
  },
  "meta": {
    "cache": "hit",
    "age_seconds": 212,
    "stale": false,
    "credits": 1,
    "credits_remaining": 4812
  }
}

Get an Instagram audio track and the reels using it

GET/v1/audio

Title, artist, duration and a preview URL for an original sound or song, plus reels that use it. Audio ids come from reels.

Costs 1 credit per call.

ParameterDescription
idrequiredNumeric audio id.
Request
curl "https://data.fastsocial.co/v1/audio?id=28784844067777520" \
  -H "X-API-Key: $FASTSOCIAL_API_KEY"
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);
<?php
$url = "https://data.fastsocial.co/v1/audio?" . http_build_query(['id' => "28784844067777520"]);

$ch = curl_init($url);
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ["X-API-Key: " . getenv("FASTSOCIAL_API_KEY")],
    CURLOPT_TIMEOUT => 30,
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($body["data"]);
package main

import (
	"fmt"
	"io"
	"net/http"
	"net/url"
	"os"
)

func main() {
	q := url.Values{}
	q.Set("id", "28784844067777520")
	req, _ := http.NewRequest("GET", "https://data.fastsocial.co/v1/audio?"+q.Encode(), nil)
	req.Header.Set("X-API-Key", os.Getenv("FASTSOCIAL_API_KEY"))

	res, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
require "net/http"
require "json"

uri = URI("https://data.fastsocial.co/v1/audio")
uri.query = URI.encode_www_form({"id" => "28784844067777520"})

req = Net::HTTP::Get.new(uri)
req["X-API-Key"] = ENV["FASTSOCIAL_API_KEY"]
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
puts JSON.parse(res.body)["data"]
Response
200 OK
{
  "ok": true,
  "data": {
    "audio": {
      "id": "28784844067777520",
      "title": "Artemis",
      "artist": "Imagine Dragons",
      "duration_ms": 204345,
      "is_original": false,
      "is_explicit": false,
      "cover_url": "https://scontent.cdninstagram.com/…/cover.jpg",
      "audio_url": "https://scontent.cdninstagram.com/…/audio.mp4"
    },
    "posts": [
      {
        "shortcode": "C8x1abcDEF0",
        "url": "https://www.instagram.com/p/C8x1abcDEF0/",
        "taken_at": 1758600000,
        "format": "reel",
        "likes": 412000,
        "comments": 1900,
        "views": 5400000,
        "caption": "Sunrise over the Pacific, seen from the station.",
        "image_url": "https://scontent.cdninstagram.com/…/1080.jpg",
        "video_url": "https://scontent.cdninstagram.com/…/clip.mp4",
        "pinned": false,
        "owner_username": "nasa",
        "owner_id": "528817151"
      }
    ]
  },
  "meta": {
    "cache": "hit",
    "age_seconds": 212,
    "stale": false,
    "credits": 1,
    "credits_remaining": 4812
  }
}

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.

Free to call.

ParameterDescription
sortfollowers = biggest accounts; gainers / losers = biggest follower change over window; milestones = soonest projected round-number milestone.
windowChange period in days for gainers / losers. Defaults to the longest period with enough history.
countryTwo-letter country code (ISO 3166-1), e.g. US, BR, IN.
categoryAccount category.
limitAccounts per page (max 100).
offsetSkip this many accounts (paging).
Request
curl "https://data.fastsocial.co/v1/top?sort=gainers&country=BR" \
  -H "X-API-Key: $FASTSOCIAL_API_KEY"
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);
<?php
$url = "https://data.fastsocial.co/v1/top?" . http_build_query(['sort' => "gainers", 'country' => "BR"]);

$ch = curl_init($url);
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ["X-API-Key: " . getenv("FASTSOCIAL_API_KEY")],
    CURLOPT_TIMEOUT => 30,
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($body["data"]);
package main

import (
	"fmt"
	"io"
	"net/http"
	"net/url"
	"os"
)

func main() {
	q := url.Values{}
	q.Set("sort", "gainers")
	q.Set("country", "BR")
	req, _ := http.NewRequest("GET", "https://data.fastsocial.co/v1/top?"+q.Encode(), nil)
	req.Header.Set("X-API-Key", os.Getenv("FASTSOCIAL_API_KEY"))

	res, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
require "net/http"
require "json"

uri = URI("https://data.fastsocial.co/v1/top")
uri.query = URI.encode_www_form({"sort" => "gainers", "country" => "BR"})

req = Net::HTTP::Get.new(uri)
req["X-API-Key"] = ENV["FASTSOCIAL_API_KEY"]
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
puts JSON.parse(res.body)["data"]
Response
200 OK
{
  "ok": true,
  "data": {
    "sort": "…",
    "window_days": 0,
    "country": "…",
    "category": "Government organization",
    "total": 581,
    "offset": 0,
    "limit": 0,
    "accounts": [
      {
        "rank": 0,
        "username": "nasa",
        "name": "NASA Johnson Space Center",
        "followers": 104000000,
        "change_1d": 0,
        "change_7d": 0,
        "change_30d": 0,
        "country": "…",
        "category": "Government organization",
        "is_verified": true,
        "engagement_rate": 0.0,
        "next_milestone": 0,
        "milestone_projected": "…"
      }
    ],
    "updated_at": "…",
    "day": "…",
    "tracking_since": "…",
    "windows_available": [
      0
    ],
    "source": "…",
    "license": "…"
  },
  "meta": {
    "cache": "hit",
    "age_seconds": 212,
    "stale": false,
    "credits": 0,
    "credits_remaining": 4812
  }
}

Your usage this month

GET/v1/usage

Credits used and left this month.

Free to call.

Request
curl "https://data.fastsocial.co/v1/usage" \
  -H "X-API-Key: $FASTSOCIAL_API_KEY"
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);
<?php
$url = "https://data.fastsocial.co/v1/usage?" . http_build_query([]);

$ch = curl_init($url);
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ["X-API-Key: " . getenv("FASTSOCIAL_API_KEY")],
    CURLOPT_TIMEOUT => 30,
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($body["data"]);
package main

import (
	"fmt"
	"io"
	"net/http"
	"net/url"
	"os"
)

func main() {
	q := url.Values{}
	req, _ := http.NewRequest("GET", "https://data.fastsocial.co/v1/usage?"+q.Encode(), nil)
	req.Header.Set("X-API-Key", os.Getenv("FASTSOCIAL_API_KEY"))

	res, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
require "net/http"
require "json"

uri = URI("https://data.fastsocial.co/v1/usage")
uri.query = URI.encode_www_form({})

req = Net::HTTP::Get.new(uri)
req["X-API-Key"] = ENV["FASTSOCIAL_API_KEY"]
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
puts JSON.parse(res.body)["data"]

Use policy

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.