Facebook and Instagram data, wherever you build
Give AI agents Facebook and Instagram tools through MCP, or call the same API from Python, JavaScript, Go, PHP and n8n. One API key, no OAuth.
For AI agents
MCP server
Authorization: Bearer YOUR_API_KEY and replace YOUR_API_KEY with the key from your dashboard.Hosted endpoint · Streamable HTTP
https://mcp.socialapis.io/mcpclaude mcp add --transport http socialapis https://mcp.socialapis.io/mcp \
--header "Authorization: Bearer YOUR_API_KEY"{
"mcpServers": {
"socialapis": {
"command": "npx",
"args": ["-y", "@socialapis/mcp"],
"env": {
"SOCIALAPIS_API_KEY": "YOUR_API_KEY"
}
}
}
}{
"mcpServers": {
"socialapis": {
"url": "https://mcp.socialapis.io/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}{
"servers": {
"socialapis": {
"type": "http",
"url": "https://mcp.socialapis.io/mcp",
"headers": {
"Authorization": "Bearer ${input:socialapis-key}"
}
}
},
"inputs": [
{
"type": "promptString",
"id": "socialapis-key",
"description": "SocialAPIs API key",
"password": true
}
]
}{
"mcpServers": {
"socialapis": {
"type": "streamableHttp",
"url": "https://mcp.socialapis.io/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}{
"mcpServers": {
"socialapis": {
"serverUrl": "https://mcp.socialapis.io/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}Other MCP clients work the same way: point them at the hosted endpoint with the header, or run npx -y @socialapis/mcp with SOCIALAPIS_API_KEY set. Full guide
For developers
SDKs
$ pip install socialapis-sdkfrom socialapis import Facebook, Instagram
fb = Facebook(api_token="YOUR_API_KEY")
page = fb.get_page_info("nike")
print(page.title, page.followers_count)
ig = Instagram(api_token="YOUR_API_KEY")
profile = ig.get_profile_details("nike")
print(profile.username, profile.followers_count)$ npm install socialapis-sdkimport { Facebook, Instagram } from "socialapis-sdk";
const fb = new Facebook({ apiToken: "YOUR_API_KEY" });
const page = await fb.getPageInfo("nike");
console.log(page.title, page.followers_count);
const ig = new Instagram({ apiToken: "YOUR_API_KEY" });
const profile = await ig.getProfileDetails("nike");
console.log(profile.username, profile.followers_count);$ go get github.com/SocialAPIsHub/socialapis-gofb, err := socialapis.NewFacebook("YOUR_API_KEY")
if err != nil {
log.Fatal(err)
}
page, err := fb.GetPageInfo(context.Background(), "nike", nil)
if err != nil {
log.Fatal(err)
}
fmt.Println(page.Title, page.FollowersCount)$ composer require socialapishub/socialapisuse SocialAPIs\Facebook;
use SocialAPIs\Instagram;
$fb = new Facebook("YOUR_API_KEY");
$page = $fb->getPageInfo("nike");
echo $page["title"], " ", $page["followers_count"];
$ig = new Instagram("YOUR_API_KEY");
$profile = $ig->getProfileDetails("nike");
echo $profile["username"], " ", $profile["followers_count"];Package registries
All packages
- PyPI
socialapis-sdkPython SDK: every Facebook and Instagram endpoint, sync and async.
pip install socialapis-sdk - npm
socialapis-sdkJavaScript / TypeScript SDK: every endpoint, typed responses.
npm install socialapis-sdk - Go
github.com/SocialAPIsHub/socialapis-goGo SDK: every endpoint, no dependencies.
go get github.com/SocialAPIsHub/socialapis-go - Packagist
socialapishub/socialapisPHP SDK: every endpoint, for Laravel, Symfony, WordPress or plain PHP.
composer require socialapishub/socialapis - npm
@socialapis/mcpMCP server for AI agents (local stdio; the hosted endpoint needs no install).
npm install @socialapis/mcp - npm
n8n-nodes-socialapisn8n community node: every operation as dropdowns.
npm install n8n-nodes-socialapis - PyPI
facebook-scraper-apiFacebook Pages, posts, groups and comments with facebook-scraper style functions and a CLI.
pip install facebook-scraper-api - npm
facebook-scraper-apiFacebook Pages, posts, groups and comments for Node.js, with a CLI.
npm install facebook-scraper-api - PyPI
facebook-ads-library-apiMeta Ads Library search by keyword or advertiser, with CSV export and a CLI.
pip install facebook-ads-library-api - npm
facebook-ads-library-apiMeta Ads Library search for Node.js, with CSV export and a CLI.
npm install facebook-ads-library-api
For automations
n8n
- 1In n8n, open Settings → Community Nodes and select Install.
- 2Enter
n8n-nodes-socialapisand confirm. - 3Add a SocialAPIs node and create a credential with your API key.
Spreadsheets
Google Sheets add-on
=SOCIALAPIS_FB_PAGE("nasa", "followers").For coding agents
Agent skill
Install
npx skills add SocialAPIsHub/skillsThen set SOCIALAPIS_API_KEY in your environment and ask your agent for Facebook or Instagram data.
Listings
Find us on
Official MCP RegistryThe official MCP server registry
SmitheryHosted connector · score 98/100GlamaMCP connector directory
- cursor.directoryOne-click add to Cursor
LobeHubLobeHub MCP marketplace
mcp.soVerified listing- mcpservers.orgAwesome MCP Servers directory
- awesome-remote-mcp-serversCurated list of remote MCP servers
- MCP MarketMCP server directory
- PostmanREST API docs + collection
npm@socialapis/mcp (stdio server)
Frequently Asked Questions
Quick answers about MCP, the SDKs and n8n
An MCP (Model Context Protocol) server that gives AI assistants 12 read-only tools (50 actions) for public Facebook and Instagram data: pages, posts, comments, groups, the Ads Library, Marketplace, Instagram profiles, posts, reels and locations. Claude, Cursor, VS Code, Cline and other MCP clients can call them directly.
No. Clients that support remote MCP servers connect to https://mcp.socialapis.io/mcp with your API key in the Authorization header. For clients that only run local servers, such as Claude Desktop, use npx @socialapis/mcp (needs Node.js 18+).
MCP tool calls, SDK calls and n8n calls all use the same credits as the REST API. The free plan includes 200 credits a month with no credit card. Each tool description states its price.
The key goes in a request header, never in the URL, so it doesn't end up in server logs. Keep config files with your key out of version control; in VS Code, use the input prompt shown above so the key isn't written to the file at all.
Facebook and Instagram today. The MCP server, SDKs and n8n node all cover the same endpoints as the REST API.
One key for everything
MCP, SDKs, n8n and the REST API. 200 free calls a month, no credit card.