Docs menu

Facebook video search

Beta GET /v1/facebook/search/videos

GET /v1/facebook/search/videos

Facebook's own public video search, logged out: matching videos and reels in Facebook's ranking. Not exhaustive; can take several seconds. Keep the query unchanged while paging.

  • Cost: 1 credit
  • Status: Beta. Built and tested against recorded responses; the shape may still gain fields.
  • Cache: Results are kept up to 30 days; send max_age_days to reuse them for free.
  • Timeout: A request still running after about 25 seconds answers 202 with a job to poll (Batch and jobs).

Parameters#

NameTypeRequiredDescription
querystringyesSearch terms. Also accepted as keyword, q.

Every request also accepts:

  • cursor: the cursor from the previous page (Pagination).
  • trim: true for a smaller response without null fields and extra.
  • raw: true to also get the platform's original object as raw.
  • 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).

curl
curl -G "https://api.socialscrape.io/v1/facebook/search/videos" \
  -H "x-api-key: $SOCIALSCRAPE_API_KEY" \
  --data-urlencode "query=nasa"
Python
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,
)
body = res.json()

if body["ok"]:
    print(body["data"])
else:
    print(body["error"]["code"], body["error"]["message"])
TypeScript
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);
}
n8n
{
  "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": {}
}

Example response#

This is a sample from a recorded response, lists and long text are shortened. Status 200.

{
  "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 Oct. 11, the six-wheeled geologist's odometer hit 28.10 miles (45.22 kilometers), sur...",
        "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=107&ccb=1-7&_nc_sid=50ce42&_nc_ohc=_30CklrQM6kQ7kNvwHhKx4i&_nc_oc=AdpfkVXNwVnA73EiD...",
          "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...",
          "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-1oelHfJz9Hl3Nbwi521I8zj4wFT1g.mp4?_nc_cat=105&_nc_sid=5e9851&_nc_ht=video-lax7-1.xx.fbcdn.net&_nc_ohc=qxK4bdv...",
            "height": 2160,
            "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...",
            "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 landings https://go.nasa.gov/4zV3TuG and we’re accelerating efforts to ensure the su...",
        "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=103&ccb=1-7&_nc_sid=be8305&_nc_ohc=3cRvt1HlVvoQ7kNvwGwIokw&_nc_oc=AdqJtvSWiUasUwuk...",
          "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...",
          "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=sV8HVDwADDkQ7kNvwHsIJ34&_nc_oc=AdoS9_L2XCXJ-SIORng7BEEdUKCMMlddQJiZU6A5ZiIAHQ0owDuZQgwGoC1HT5b..."
              }
            ],
            "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...",
            "height": 2160,
            "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...",
            "width": 3840
          }
        }
      }
    ],
    "cursor": "eyJrIjoidnNlYXJjaCIsInEiOiJuYXNhIiwiYWZ0ZXIiOiJ7XCJwYWdlX251bWJlclwiOjAsXCJmbG93X2N1cnNvcnNfc2VyaWFsaXplZFwiOntcIklOVEVSTkFMX0RFQlVHX01PRFVMRVwiOlwie31cIixcIlNFQVJDSF9DT05UUk9MU19JTlRFUkNFUFRcIjpcInt9XCIsXCJJTlRFR1JJVFlcIjpcIntcXFwiaGFzX21v...",
    "has_more": true,
    "parent": null
  },
  "cursor": "eyJrIjoidnNlYXJjaCIsInEiOiJuYXNhIiwiYWZ0ZXIiOiJ7XCJwYWdlX251bWJlclwiOjAsXCJmbG93X2N1cnNvcnNfc2VyaWFsaXplZFwiOntcIklOVEVSTkFMX0RFQlVHX01PRFVMRVwiOlwie31cIixcIlNFQVJDSF9DT05UUk9MU19JTlRFUkNFUFRcIjpcInt9XCIsXCJJTlRFR1JJVFlcIjpcIntcXFwiaGFzX21v...",
  "has_more": true
}

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.

CodeHTTPRetryMeaning
invalid_params400noA parameter is missing, unknown or has the wrong type.
not_found404noThe 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.