Facebook Search API
Query Facebook by keyword and get structured results across top matches, pages, posts or videos, complete with cursor pagination.
Request
GET /v1/facebook/search ·
2 credits per successful call
curl "https://api.igramapi.com/v1/facebook/search?q=example+studio&type=pages" \
-H "Authorization: Bearer YOUR_API_KEY" import requests
response = requests.get(
"https://api.igramapi.com/v1/facebook/search?q=example+studio&type=pages",
headers={"Authorization": "Bearer YOUR_API_KEY"},
timeout=30,
)
response.raise_for_status()
print(response.json()) const response = await fetch("https://api.igramapi.com/v1/facebook/search?q=example+studio&type=pages", {
method: "GET",
headers: {
Authorization: "Bearer YOUR_API_KEY",
},
});
if (!response.ok) throw new Error((await response.json()).error.message);
console.log(await response.json()); <?php
$ch = curl_init("https://api.igramapi.com/v1/facebook/search?q=example+studio&type=pages");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer YOUR_API_KEY",
],
]);
$data = json_decode(curl_exec($ch), true);
print_r($data); Response
{
"query": "example studio",
"type": "pages",
"profiles": [
{
"id": "100012345678901",
"name": "Example Studio",
"username": "examplestudio",
"url": "https://www.facebook.com/examplestudio",
"avatar_url": "https://scontent.xx.fbcdn.net/v/example/avatar.jpg",
"is_verified": true,
"snippet": "Creative studio · 2.8M followers"
}
],
"posts": [],
"videos": [],
"page": {
"has_next_page": true,
"end_cursor": "eyJrIjoiZmJfc2VhcmNoIn0"
},
"cached": false
} All values above are made-up examples. Media links are temporary Facebook CDN addresses.
Parameters
| Name | In | Description |
|---|---|---|
qrequired | query | Search keyword or phrase. |
type | query | Tab to search: top (default), pages, posts, or videos. |
cursor | query | page.end_cursor from the previous response. |
Response fields
| Field | Type | Description |
|---|---|---|
query / type | string | The search query and selected tab (top, pages, posts, or videos). |
profiles[] | object[] | Matched pages or profiles: id, name, username, url, avatar_url, is_verified, snippet. |
posts[] / videos[] | object[] | Matched posts and videos. |
page | object | has_next_page and end_cursor for pagination. |
Four search modes
Filter directly to top, pages, posts, or videos.
Structured results
Matched pages include verified status and snippets; posts and videos reuse the standard post and video shapes.
Cursor pagination
Use page.end_cursor to load additional pages of search results.
Every plan
Costs 2 credits per page on every plan.
Searching by tab
Use type=pages to discover pages and public figures, type=posts for matching public posts, type=videos for videos, or type=top for a mixed overview.
Frequently asked questions
What values does type accept?
top (default), pages, posts, and videos.
Which plans include Facebook Search?
Every plan, including Free. Each call costs 2 credits.
Our errors cost nothing. Failures on our side (status 500 or above) and invalid requests (400, 422) are refunded, and every error has the same shape. See error handling and credits and rate limits.
Try the Facebook Search API free
Create a key and make your first request in minutes. 100 free credits every month.