The Facebook 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.facebook.profile({ handle: "NASA" });
// {
// "data": {
// "username": "NASA",
// "displayName": "NASA - National Aeronautics and Space Administration",
// "verified": true,
// "followers": 28000000,
// "following": 53,
// …
// }
// }import os
from socialapihq import SocialAPI
client = SocialAPI(api_key=os.environ["SOCIALAPI_API_KEY"])
data = client.facebook.profile(handle="NASA").data
print(data.display_name, data.followers)
# {
# "data": {
# "username": "NASA",
# "displayName": "NASA - National Aeronautics and Space Administration",
# "verified": true,
# "followers": 28000000,
# "following": 53,
# …
# }
# }curl -G https://api.socialapi.sh/v1/facebook/profile \
-H "Authorization: Bearer $SOCIALAPI_API_KEY" \
--data-urlencode "handle=NASA"
# {
# "data": {
# "username": "NASA",
# "displayName": "NASA - National Aeronautics and Space Administration",
# "verified": true,
# "followers": 28000000,
# "following": 53,
# …
# }
# }