Facebook video search API
Facebook's own public video search, logged out: matching videos and reels in Facebook's ranking.
- Cost
- 1 credit
- Cached repeats
- 0 creditssend max_age_days, results kept 30 days
- Failed requests
- 0 credits
- Status
- Betashape may still gain fields
Not exhaustive; can take several seconds. Keep the query unchanged while paging.
You send query.
Request
Send your key in the x-api-key header.
curl -G "https://api.socialscrape.io/v1/facebook/search/videos" \
-H "x-api-key: $SOCIALSCRAPE_API_KEY" \
--data-urlencode 'query=nasa'import os
import requests
params = {
"query": "nasa",
}
res = requests.get(
"https://api.socialscrape.io/v1/facebook/search/videos",
headers={"x-api-key": os.environ["SOCIALSCRAPE_API_KEY"]},
params=params,
timeout=60,
)
body = res.json()
if body["ok"]:
print(body["data"])
else:
print(body["error"]["code"], body["error"]["message"])const url = new URL("https://api.socialscrape.io/v1/facebook/search/videos");
url.search = new URLSearchParams({
query: "nasa",
}).toString();
const res = await fetch(url, {
headers: { "x-api-key": process.env.SOCIALSCRAPE_API_KEY! },
});
const body = await res.json();
if (body.ok) {
console.log(body.data);
} else {
console.error(body.error.code, body.error.message);
}{
"nodes": [
{
"name": "SocialScrape Facebook video search",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
0,
0
],
"parameters": {
"method": "GET",
"url": "https://api.socialscrape.io/v1/facebook/search/videos",
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "query",
"value": "nasa"
}
]
},
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "x-api-key",
"value": "={{ $env.SOCIALSCRAPE_API_KEY }}"
}
]
}
}
}
],
"connections": {}
}Parameters
| Name | Type | Required | Description |
|---|---|---|---|
query | string | yes | Search terms. Also accepted as keyword, q. |
cursor | string | Opaque cursor from the previous page; pass it back unchanged. Also accepted as continuationToken, continuation_token, next_max_id, max_id, max_cursor, min_time, after, page_token, pageToken, paginationToken, next_page_id, page. |
Every request also accepts trim, raw and max_age_days.
Response
Sample from a recorded response, shortened. Values are public data, not yours.
{
"ok": true,
"credits_charged": 1,
"credits_remaining": 4999,
"cached": false,
"cached_at": null,
"request_id": "req_4be084c81f552f0b741dcf87",
"data": {
"object": "list",
"items": [
{
"object": "post",
"platform": "facebook",
"id": "1902291290735944",
"url": "https://www.facebook.com/reel/1902291290735944/",
"type": "reel",
"author": {
"id": "100064958731093",
"handle": "nasamars",
"name": "NASA Mars",
"url": "https://www.facebook.com/nasamars",
"avatar_url": null,
"verified": null
},
"title": null,
"text": "It's a new off-world record! 🏅\n\nNASA’s Perseverance Mars rover has driven farther than any vehicle ever has on the surface of another planetary body. \n\nOn O...",
"published_at": "2026-10-12T21:38:21Z",
"duration_seconds": 108.885,
"language": null,
"hashtags": null,
"mentions": null,
"stats": {
"views": 154323,
"likes": 2449,
"comments": 102,
"shares": 602,
"saves": null,
"dislikes": null
},
"media": {
"thumbnail_url": "https://scontent-lax3-2.xx.fbcdn.net/v/t15.5256-10/847691169_973319449150311_9164931365666095412_n.jpg?stp=dst-jpg_tt6&cstp=mx1920x1080&ctp=s960x960&_nc_cat=...",
"video_url": "https://video-lax7-1.xx.fbcdn.net/o1/v/t2/f2/m366/AQNxe7rTjo1vsM8j5Mg495HkcFNh4UT4MmMmyUvgUSTWF8aI5wllYITmxWa13ovb4SE0Re89XVAexg9b-1oelHfJz9Hl3Nbwi521I8zj4wF...",
"audio_url": null,
"image_urls": null,
"width": 3840,
"height": 2160
},
"song": null,
"location": null,
"is_pinned": null,
"is_sponsored": null,
"extra": {
"feedback_id": "ZmVlZGJhY2s6cGZiaWQwMmsyZjRNbm1ta1Y3MnREV2t2NXBiNHpHVkxqU2Y4TEtUZVpiNWoxZVhxMkR4b01VWUNiakduMTJNQ3dHdlZIZm1s",
"permalink": "https://www.facebook.com/reel/1902291290735944/",
"reactions": {
"care": 22,
"haha": 7,
"like": 1951,
"love": 371,
"wow": 98
},
"source": "logged_out_public_view",
"video": {
"captions": null,
"hd_url": "https://video-lax7-1.xx.fbcdn.net/o1/v/t2/f2/m366/AQNxe7rTjo1vsM8j5Mg495HkcFNh4UT4MmMmyUvgUSTWF8aI5wllYITmxWa13ovb4SE0Re89XVAexg9b-1oelHfJz9Hl3Nbwi521I8zj4wF...",
"height": 2160,
"sd_url": "https://video-lax3-2.xx.fbcdn.net/o1/v/t2/f2/m412/AQMDxcvDPDZhrby4ESurvxZb7OY5ROuCwm7I9MC3Omz9_u0X7lDmLxM-5rE5qOzrG7nHkK5nCOC9NGEka8DEEQ2EP5p4DXd83Trdg_YNaA....",
"width": 3840
}
}
},
{
"object": "post",
"platform": "facebook",
"id": "1803909017420449",
"url": "https://www.facebook.com/reel/1803909017420449/",
"type": "reel",
"author": {
"id": "100044561550831",
"handle": "NASA",
"name": "NASA - National Aeronautics and Space Administration",
"url": "https://www.facebook.com/NASA",
"avatar_url": null,
"verified": null
},
"title": null,
"text": "We are not slowing down. 🚀\n\nOur Artemis III mission will send four astronauts to low Earth orbit next year to test critical systems needed for future lunar ...",
"published_at": "2026-10-23T23:38:25Z",
"duration_seconds": 59.861,
"language": null,
"hashtags": null,
"mentions": null,
"stats": {
"views": 129862,
"likes": 6162,
"comments": 190,
"shares": 481,
"saves": null,
"dislikes": null
},
"media": {
"thumbnail_url": "https://scontent-lax3-2.xx.fbcdn.net/v/t15.5256-10/861707093_1378071157463251_3699379084540793101_n.jpg?stp=dst-jpg_tt6&cstp=mx3840x2160&ctp=s960x960&_nc_cat...",
"video_url": "https://video-lax3-1.xx.fbcdn.net/o1/v/t2/f2/m366/AQOrR7mXmkNxEorB-LS9EEo5aIQjyCpClJ_vp7yt0fKywnl9WB8y8aLcIiXFjXY6z4DijZm4k3MiUpxkl7j9N8D72G81B_PlU6tzm4YrbYk...",
"audio_url": null,
"image_urls": null,
"width": 3840,
"height": 2160
},
"song": null,
"location": null,
"is_pinned": null,
"is_sponsored": null,
"extra": {
"feedback_id": "ZmVlZGJhY2s6cGZiaWQwMkZSRDZlRmFLQjNBSlJNWEJrV0VKZnROWHZjYzRlWHN4dTU2bnJOWGlSWXFtNEd1bjFxYjhFU2RCTmMyYm5aTFps",
"permalink": "https://www.facebook.com/reel/1803909017420449/",
"reactions": {
"angry": 4,
"care": 71,
"haha": 21,
"like": 5351,
"love": 689,
"wow": 26
},
"source": "logged_out_public_view",
"video": {
"captions": [
{
"locale": "en_US",
"method": null,
"url": "https://scontent-lax3-1.xx.fbcdn.net/v/t39.2093-6/859864129_1803909594087058_7668314739500228884_n.srt?_nc_cat=104&ccb=1-7&_nc_sid=c211c2&_nc_ohc=sV8HVDwADDk..."
}
],
"hd_url": "https://video-lax3-1.xx.fbcdn.net/o1/v/t2/f2/m366/AQOrR7mXmkNxEorB-LS9EEo5aIQjyCpClJ_vp7yt0fKywnl9WB8y8aLcIiXFjXY6z4DijZm4k3MiUpxkl7j9N8D72G81B_PlU6tzm4YrbYk...",
"height": 2160,
"sd_url": "https://video-lax3-2.xx.fbcdn.net/o1/v/t2/f2/m412/AQPmxViNexUB6xVrvFjHBBcIJismrAQ9uEtNFuQMOfPMiR3xJ5Mr2vSGPJmV-0dFwJyyT_xGt-CyE1m-nzgcMME9dK-C2-ri4WjL5lKlKw....",
"width": 3840
}
}
}
],
"cursor": "eyJrIjoidnNlYXJjaCIsInEiOiJuYXNhIiwiYWZ0ZXIiOiJ7XCJwYWdlX251bWJlclwiOjAsXCJmbG93X2N1cnNvcnNfc2VyaWFsaXplZFwiOntcIklOVEVSTkFMX0RFQlVHX01PRFVMRVwiOlwie31cIixcI...",
"has_more": true,
"parent": null
},
"cursor": "eyJrIjoidnNlYXJjaCIsInEiOiJuYXNhIiwiYWZ0ZXIiOiJ7XCJwYWdlX251bWJlclwiOjAsXCJmbG93X2N1cnNvcnNfc2VyaWFsaXplZFwiOntcIklOVEVSTkFMX0RFQlVHX01PRFVMRVwiOlwie31cIixcI...",
"has_more": true
}Fields
A page of results. Each entry in items is a Post. cursor and has_more page through the rest.
A field the platform does not give is null, never made up. Extra platform details are in extra.
| Field | Type | Always | Notes |
|---|---|---|---|
object | "post" | ||
platform | Platform | yes | |
id | string | yes | |
url | string or null | ||
type | "video" or "short" or "reel" or "image" or "carousel" or "story" or "live" or "clip" or "text" or "link" or "tweet" or "pin" or "community_post" or "episode" or "unknown" | ||
author | Author or null | ||
title | string or null | ||
text | string or null | ||
published_at | string (ISO 8601 date-time) or null | ||
duration_seconds | number or null | ||
language | string or null | ||
hashtags | string[] or null | ||
mentions | string[] or null | ||
stats | Stats |
Show the other 6 fields
Full field list in the reference for this endpoint and the data models. Errors are listed under Errors.
Questions
Which errors can it return?
invalid_params (do not retry), not_found (do not retry). Account and platform errors from the errors list can also happen. A failure always costs 0 credits.
How do I get more than one page?
Send the same request with cursor set to the cursor you received, until has_more is false. Each page costs its own price. See pagination.
Is there an SDK call for it?
The preview Python client has client.facebook.search_videos(...) and the TypeScript client client.facebook.searchVideos(). Both return the same envelope as the HTTP API. The packages are not published yet; plain HTTP works today in any language.
Can an AI agent call it?
Yes. The MCP server reaches every built endpoint, with the same prices.