The Instagram APIfor apps and AI agents
Public data from the platforms you work with, through one API.
No scrapers or proxies to build and maintain.
import { SocialAPI } from "@socialapihq/sdk";
const client = new SocialAPI({ apiKey: process.env.SOCIALAPI_API_KEY });
const { data } = await client.instagram.profile({ handle: "natgeo" });
// {
// "data": {
// "username": "natgeo",
// "displayName": "National Geographic",
// "verified": true,
// "followers": 267265090,
// "following": 195,
// …
// }
// }import os
from socialapihq import SocialAPI
client = SocialAPI(api_key=os.environ["SOCIALAPI_API_KEY"])
data = client.instagram.profile(handle="natgeo").data
print(data.display_name, data.followers)
# {
# "data": {
# "username": "natgeo",
# "displayName": "National Geographic",
# "verified": true,
# "followers": 267265090,
# "following": 195,
# …
# }
# }curl -G https://api.socialapi.sh/v1/instagram/profile \
-H "Authorization: Bearer $SOCIALAPI_API_KEY" \
--data-urlencode "handle=natgeo"
# {
# "data": {
# "username": "natgeo",
# "displayName": "National Geographic",
# "verified": true,
# "followers": 267265090,
# "following": 195,
# …
# }
# }