Facebook video search API
Facebook's own video search: matching videos and reels in Facebook's ranking.
GET /v1/facebook/search/videos
GET /v1/facebook/search/videos
Facebook's own video search: matching videos and reels in Facebook's ranking. Not exhaustive; can take several seconds. Keep the query unchanged while paging.
- Cost: 1 credit
- Cache: Results are kept up to 30 days; send
max_age_daysto reuse them for free. - Timeout: A request still running after about 25 seconds answers
202with a job to poll (Batch and jobs).
Parameters#
| Name | Type | Required | Description |
|---|---|---|---|
query | string | yes | Search terms. Also accepted as keyword, q. |
Every request also accepts:
cursor: the cursor from the previous page (Pagination).trim:truefor a smaller response withoutnullfields andextra.raw:trueto also get the platform's original object asraw.max_age_days: accept a cached result up to this many days old, for 0 credits (Caching).
Example request#
Set your key in the environment first (see Authentication).
1curl -G "https://api.socialscrape.dev/v1/facebook/search/videos" \2 -H "x-api-key: $SOCIALSCRAPE_API_KEY" \3 --data-urlencode "query=nasa"1import os2import requests34params = {5 "query": "nasa",6}7res = requests.get(8 "https://api.socialscrape.dev/v1/facebook/search/videos",9 headers={"x-api-key": os.environ["SOCIALSCRAPE_API_KEY"]},10 params=params,11)12body = res.json()1314if body["ok"]:15 print(body["data"])16else:17 print(body["error"]["code"], body["error"]["message"])1const url = new URL("https://api.socialscrape.dev/v1/facebook/search/videos");2url.search = new URLSearchParams({3 "query": "nasa"4}).toString();5const res = await fetch(url, {6 headers: { "x-api-key": process.env.SOCIALSCRAPE_API_KEY! },7});8const body = await res.json();910if (body.ok) {11 console.log(body.data);12} else {13 console.error(body.error.code, body.error.message);14}1{2 "nodes": [3 {4 "name": "SocialScrape Facebook video search",5 "type": "n8n-nodes-base.httpRequest",6 "typeVersion": 4.2,7 "position": [8 0,9 010 ],11 "parameters": {12 "method": "GET",13 "url": "https://api.socialscrape.dev/v1/facebook/search/videos",14 "sendQuery": true,15 "queryParameters": {16 "parameters": [17 {18 "name": "query",19 "value": "nasa"20 }21 ]22 },23 "sendHeaders": true,24 "headerParameters": {25 "parameters": [26 {27 "name": "x-api-key",28 "value": "={{ $env.SOCIALSCRAPE_API_KEY }}"29 }30 ]31 }32 }33 }34 ],35 "connections": {}36}Example response#
This is a sample from a recorded response, lists and long text are shortened. Status 200.
1{2 "ok": true,3 "credits_charged": 1,4 "credits_remaining": 4999,5 "cached": false,6 "cached_at": null,7 "request_id": "req_4be084c81f552f0b741dcf87",8 "data": {9 "object": "list",10 "items": [11 {12 "object": "post",13 "platform": "facebook",14 "id": "1902291290735944",15 "url": "https://www.facebook.com/reel/1902291290735944/",16 "type": "reel",17 "author": {18 "id": "100064958731093",19 "handle": "nasamars",20 "name": "NASA Mars",21 "url": "https://www.facebook.com/nasamars",22 "avatar_url": null,23 "verified": null24 },25 "title": null,26 "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 Oct. 11, the six-wheeled geologist's odometer hit 28.10 miles (45.22 kilometers), sur...",27 "published_at": "2026-10-12T21:38:21Z",28 "duration_seconds": 108.885,29 "language": null,30 "hashtags": null,31 "mentions": null,32 "stats": {33 "views": 154323,34 "likes": 2449,35 "comments": 102,36 "shares": 602,37 "saves": null,38 "dislikes": null39 },40 "media": {41 "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=107&ccb=1-7&_nc_sid=50ce42&_nc_ohc=_30CklrQM6kQ7kNvwHhKx4i&_nc_oc=AdpfkVXNwVnA73EiD...",42 "video_url": "https://video-lax7-1.xx.fbcdn.net/o1/v/t2/f2/m366/AQNxe7rTjo1vsM8j5Mg495HkcFNh4UT4MmMmyUvgUSTWF8aI5wllYITmxWa13ovb4SE0Re89XVAexg9b-1oelHfJz9Hl3Nbwi521I8zj4wFT1g.mp4?_nc_cat=105&_nc_sid=5e9851&_nc_ht=video-lax7-1.xx.fbcdn.net&_nc_ohc=qxK4bdv...",43 "audio_url": null,44 "image_urls": null,45 "width": 3840,46 "height": 216047 },48 "song": null,49 "location": null,50 "is_pinned": null,51 "is_sponsored": null,52 "extra": {53 "feedback_id": "ZmVlZGJhY2s6cGZiaWQwMmsyZjRNbm1ta1Y3MnREV2t2NXBiNHpHVkxqU2Y4TEtUZVpiNWoxZVhxMkR4b01VWUNiakduMTJNQ3dHdlZIZm1s",54 "permalink": "https://www.facebook.com/reel/1902291290735944/",55 "reactions": {56 "care": 22,57 "haha": 7,58 "like": 1951,59 "love": 371,60 "wow": 9861 },62 "source": "logged_out_public_view",63 "video": {64 "captions": null,65 "hd_url": "https://video-lax7-1.xx.fbcdn.net/o1/v/t2/f2/m366/AQNxe7rTjo1vsM8j5Mg495HkcFNh4UT4MmMmyUvgUSTWF8aI5wllYITmxWa13ovb4SE0Re89XVAexg9b-1oelHfJz9Hl3Nbwi521I8zj4wFT1g.mp4?_nc_cat=105&_nc_sid=5e9851&_nc_ht=video-lax7-1.xx.fbcdn.net&_nc_ohc=qxK4bdv...",66 "height": 2160,67 "sd_url": "https://video-lax3-2.xx.fbcdn.net/o1/v/t2/f2/m412/AQMDxcvDPDZhrby4ESurvxZb7OY5ROuCwm7I9MC3Omz9_u0X7lDmLxM-5rE5qOzrG7nHkK5nCOC9NGEka8DEEQ2EP5p4DXd83Trdg_YNaA.mp4?_nc_cat=107&_nc_sid=8bf8fe&_nc_ht=video-lax3-2.xx.fbcdn.net&_nc_ohc=uDTX_YMFDhQ...",68 "width": 384069 }70 }71 },72 {73 "object": "post",74 "platform": "facebook",75 "id": "1803909017420449",76 "url": "https://www.facebook.com/reel/1803909017420449/",77 "type": "reel",78 "author": {79 "id": "100044561550831",80 "handle": "NASA",81 "name": "NASA - National Aeronautics and Space Administration",82 "url": "https://www.facebook.com/NASA",83 "avatar_url": null,84 "verified": null85 },86 "title": null,87 "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 landings https://go.nasa.gov/4zV3TuG and we’re accelerating efforts to ensure the su...",88 "published_at": "2026-10-23T23:38:25Z",89 "duration_seconds": 59.861,90 "language": null,91 "hashtags": null,92 "mentions": null,93 "stats": {94 "views": 129862,95 "likes": 6162,96 "comments": 190,97 "shares": 481,98 "saves": null,99 "dislikes": null100 },101 "media": {102 "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=103&ccb=1-7&_nc_sid=be8305&_nc_ohc=3cRvt1HlVvoQ7kNvwGwIokw&_nc_oc=AdqJtvSWiUasUwuk...",103 "video_url": "https://video-lax3-1.xx.fbcdn.net/o1/v/t2/f2/m366/AQOrR7mXmkNxEorB-LS9EEo5aIQjyCpClJ_vp7yt0fKywnl9WB8y8aLcIiXFjXY6z4DijZm4k3MiUpxkl7j9N8D72G81B_PlU6tzm4YrbYkd4Q.mp4?_nc_cat=109&_nc_sid=5e9851&_nc_ht=video-lax3-1.xx.fbcdn.net&_nc_ohc=kH0Q2ec...",104 "audio_url": null,105 "image_urls": null,106 "width": 3840,107 "height": 2160108 },109 "song": null,110 "location": null,111 "is_pinned": null,112 "is_sponsored": null,113 "extra": {114 "feedback_id": "ZmVlZGJhY2s6cGZiaWQwMkZSRDZlRmFLQjNBSlJNWEJrV0VKZnROWHZjYzRlWHN4dTU2bnJOWGlSWXFtNEd1bjFxYjhFU2RCTmMyYm5aTFps",115 "permalink": "https://www.facebook.com/reel/1803909017420449/",116 "reactions": {117 "angry": 4,118 "care": 71,119 "haha": 21,120 "like": 5351,121 "love": 689,122 "wow": 26123 },124 "source": "logged_out_public_view",125 "video": {126 "captions": [127 {128 "locale": "en_US",129 "method": null,130 "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=sV8HVDwADDkQ7kNvwHsIJ34&_nc_oc=AdoS9_L2XCXJ-SIORng7BEEdUKCMMlddQJiZU6A5ZiIAHQ0owDuZQgwGoC1HT5b..."131 }132 ],133 "hd_url": "https://video-lax3-1.xx.fbcdn.net/o1/v/t2/f2/m366/AQOrR7mXmkNxEorB-LS9EEo5aIQjyCpClJ_vp7yt0fKywnl9WB8y8aLcIiXFjXY6z4DijZm4k3MiUpxkl7j9N8D72G81B_PlU6tzm4YrbYkd4Q.mp4?_nc_cat=109&_nc_sid=5e9851&_nc_ht=video-lax3-1.xx.fbcdn.net&_nc_ohc=kH0Q2ec...",134 "height": 2160,135 "sd_url": "https://video-lax3-2.xx.fbcdn.net/o1/v/t2/f2/m412/AQPmxViNexUB6xVrvFjHBBcIJismrAQ9uEtNFuQMOfPMiR3xJ5Mr2vSGPJmV-0dFwJyyT_xGt-CyE1m-nzgcMME9dK-C2-ri4WjL5lKlKw.mp4?_nc_cat=111&_nc_sid=8bf8fe&_nc_ht=video-lax3-2.xx.fbcdn.net&_nc_ohc=ic3ORD-naIk...",136 "width": 3840137 }138 }139 }140 ],141 "cursor": "eyJrIjoidnNlYXJjaCIsInEiOiJuYXNhIiwiYWZ0ZXIiOiJ7XCJwYWdlX251bWJlclwiOjAsXCJmbG93X2N1cnNvcnNfc2VyaWFsaXplZFwiOntcIklOVEVSTkFMX0RFQlVHX01PRFVMRVwiOlwie31cIixcIlNFQVJDSF9DT05UUk9MU19JTlRFUkNFUFRcIjpcInt9XCIsXCJJTlRFR1JJVFlcIjpcIntcXFwiaGFzX21v...",142 "has_more": true,143 "parent": null144 },145 "cursor": "eyJrIjoidnNlYXJjaCIsInEiOiJuYXNhIiwiYWZ0ZXIiOiJ7XCJwYWdlX251bWJlclwiOjAsXCJmbG93X2N1cnNvcnNfc2VyaWFsaXplZFwiOntcIklOVEVSTkFMX0RFQlVHX01PRFVMRVwiOlwie31cIixcIlNFQVJDSF9DT05UUk9MU19JTlRFUkNFUFRcIjpcInt9XCIsXCJJTlRFR1JJVFlcIjpcIntcXFwiaGFzX21v...",146 "has_more": true147}Response#
A list of Post objects in data.items, with data.cursor and data.has_more.
See Data models for every field. The envelope around data is described in Responses.
Errors#
Failures are free: credits_charged is 0. Branch on error.code, never on the message.
| Code | HTTP | Retry | Meaning |
|---|---|---|---|
invalid_params | 400 | no | A parameter is missing, unknown or has the wrong type. |
not_found | 404 | no | The platform says this profile, post or item does not exist. |
Every request can also fail with the account and platform errors listed on the Errors page.
Related endpoints#
- Facebook Ad Library search (
GET /v1/facebook/ad-library/search) - Facebook Ad Library search (POST body) (
POST /v1/facebook/ad-library/search) - Facebook Ad Library ads by page (
GET /v1/facebook/ad-library/company/ads) - Facebook Ad Library ads by page (POST body) (
POST /v1/facebook/ad-library/company/ads) - Facebook Ad Library ad details (
GET /v1/facebook/ad-library/ad) - Facebook Ad Library ad transcript (
GET /v1/facebook/ad-library/ad/transcript) - Facebook Ad Library advertiser search (
GET /v1/facebook/ad-library/search/companies) - Facebook profile or page (
GET /v1/facebook/profile)