You need to programmatically find relevant videos fast, filter them, and drop links into your product. By the end of this guide, you’ll be able to search Facebook videos by keyword, read the fields you need (video_id, video_url, title, author, thumbnail), and integrate results into your workflow using the Facebook Scraper API on Zyla API Hub.
What you can build with this media search API
The Facebook Scraper API lets you search Facebook for media and related entities without dealing with site changes, device emulation, or headless browsers.
- Search Videos: find Facebook videos (including Reels) that match a keyword. Returns video metadata like IDs, URLs, title/description, author object, thumbnail, and a raw “time and views” string.
- Search Pages: discover Facebook Pages relevant to your topic to source video feeds later.
- Search Events: locate events by keyword. Useful for editorial calendars or content planning around media coverage.
Teams use it for social discovery features, editorial tools, media curation dashboards, and alerting pipelines that watch for new videos matching brand or topic terms.
Zyla API Hub centralizes more than 10,000 public APIs under one key, one account, and a subscription + quota model. You don’t manage one-off auth flows per provider; you call via a stable gateway at zylalabs.com.
Getting started on Zyla API Hub
Open the Facebook Scraper API page on Zyla API Hub, click “Subscribe” or “Start 7-day trial” when available, and get your API key. Authentication is a single header on every request:
- Authorization: Bearer YOUR_API_KEY
Billing is subscription + quota (not pay-per-call). For first use, you’ll typically access a 7-day trial or 50 requests; check the API page for current access options and pricing. You can browse other media and networking APIs on zylalabs.com with the same key.
Endpoints you’ll use for video search
Search Videos
Retrieve videos matching a search query.
- Method: GET
- URL: https://zylalabs.com/api/11904/facebook-scraper-api/22641/search-videos
- Required query parameter:
- query: a search term. Example: football
Example cURL (copy-paste as is):
curl -s -X GET "https://zylalabs.com/api/11904/facebook-scraper-api/22610/profile-details-by-url?url=https%3A%2F%2Fwww.facebook.com%2Fzuck%2F" \
-H "Authorization: Bearer YOUR_API_KEY"
The response returns a results array with per-video objects, including:
- type: "search_video"
- video_id: the video’s ID
- video_url: canonical Facebook URL (e.g., a Reel)
- title and description
- author: nested object with name, url, is_verified, id
- thumbnail: URL to a preview image
- time_and_views_raw: raw text with publish time and view count
Search Pages
Retrieve Facebook Pages relevant to a search term. You can use this to pre-filter sources before searching videos, depending on your workflow.
- Method: GET
- URL: https://zylalabs.com/api/11904/facebook-scraper-api/22640/search-pages
- Required query parameter:
- query: a search term. Example: messi
Search Events
Find events by keyword for planning media coverage or editorial calendars.
- Method: GET
- URL: https://zylalabs.com/api/11904/facebook-scraper-api/22642/search-events
- Required query parameter:
- query: a search term. Example: beer
The response includes results (with type "search_event", event_id, title, url) and may include a cursor string you can store to continue a search later if needed.
Python example: search videos and pick the fields you need
This example calls Search Videos with query=football, extracts the essential fields, and prints a compact list that’s ready to drop into a UI or pipeline. Replace YOUR_API_KEY with your key.
import os
import requests
API_KEY = os.getenv("ZYLALABS_API_KEY", "YOUR_API_KEY")
BASE_URL = "https://zylalabs.com/api/11904/facebook-scraper-api/22641/search-videos"
params = {"query": "football"}
headers = {"Authorization": f"Bearer {API_KEY}"}
resp = requests.get(BASE_URL, headers=headers, params=params, timeout=30)
resp.raise_for_status()
data = resp.json()
videos = []
for item in data.get("results", []):
video = {
"id": item.get("video_id"),
"url": item.get("video_url"),
"title": item.get("title"),
"description": item.get("description"),
"author_name": (item.get("author") or {}).get("name"),
"author_url": (item.get("author") or {}).get("url"),
"verified": (item.get("author") or {}).get("is_verified"),
"thumbnail": item.get("thumbnail"),
"time_and_views": item.get("time_and_views_raw"),
}
videos.append(video)
for v in videos[:5]:
print(f"- {v['title']}\n {v['url']}\n by {v['author_name']} (verified={v['verified']})\n views/time: {v['time_and_views']}\n thumb: {v['thumbnail']}\n")
Tips:
- Store video_id as a stable key. The URL is nice for display, but the ID is what you’ll use for deduplication.
- time_and_views_raw is a human-readable string; if you need numbers, keep it as-is or parse conservatively.
- Log and retry 429/5xx per your standard backoff approach. The hub is subscription + quota; stay within your plan’s request allotment.
Official sample: calling another endpoint for profile details
The listing also includes a profile lookup endpoint. The following is an official sample from the marketplace—useful if you augment video results with profile metadata.
{"profile":{"name":"Mark Zuckerberg","profile_id":"4","url":"https://www.facebook.com/zuck","image":"https://scontent-atl3-2.xx.fbcdn.net/v/t39.30808-1/632598281_10117314650513371_3238643608998008744_n.jpg?stp=dst-jpg_s480x480_tt6&_nc_cat=105&ccb=1-7&_nc_sid=1d2534&_nc_ohc=LjkvEg7sdw8Q7kNvwEaPsox&_nc_oc=AdmCdyxSpDASES67Y_gDG38HAgX4jHJmTVIhvvCWNAPvPyv-pT2MkqAPjlQhPbHwWrY8uW9gqGX2G_SqONA9jbku&_nc_zt=24&_nc_ht=scontent-atl3-2.xx&_nc_gid=IndkrZ-NXLMaL1RGOJUuzw&oh=00_Aft5Pz5CRJir2D9RSDB9DHeDE2DgVFClZFvg3B_3N3-Rdg&oe=69A18B0B","intro":"Bringing the world closer together.","cover_image":"https://scontent-atl3-3.xx.fbcdn.net/v/t39.30808-6/632550896_10117314656231911_7975049830116595629_n.png?_nc_cat=110&ccb=1-7&_nc_sid=2a1932&_nc_ohc=MK0GxxJ3MnAQ7kNvwGa91zk&_nc_oc=AdkYRmT5nQE8Wy7rtQIQVcsAFZpf2O-AfWgQayQistV8orDCmh3HHLcV1wyBGJ4MhxNmm_SjaJsm_Fhj0K4dUZng&_nc_zt=23&_nc_ht=scontent-atl3-3.xx&_nc_gid=IndkrZ-NXLMaL1RGOJUuzw&oh=00_AfvWwbUzfWNcxPpMjaQEicKtpNeAHrXk8D1zfpIjowyKEw&oe=69A17D22","gender":"MALE","about":{},"about_public":[{"icon":{"height":40,"scale":2,"uri":"https://static.xx.fbcdn.net/rsrc.php/v4/yW/r/nS7-NxdkDDt.png","width":40},"text":"Profile · Public figure","external_url":null},{"icon":{"height":40,"scale":2,"uri":"https://static.xx.fbcdn.net/rsrc.php/v4/yi/r/Xcm_N7TYfz4.png","width":40},"text":"Founder and CEO at Meta","external_url":null},{"icon":{"height":40,"scale":2,"uri":"https://static.xx.fbcdn.net/rsrc.php/v4/yi/r/Xcm_N7TYfz4.png","width":40},"text":"Works at Biohub","external_url":null},{"icon":{"height":40,"scale":2,"uri":"https://static.xx.fbcdn.net/rsrc.php/v4/yW/r/nDxCDAeszOF.png","width":40},"text":"Studied Computer Science and Psychology at Harvard University","external_url":null},{"icon":{"height":40,"scale":2,"uri":"https://static.xx.fbcdn.net/rsrc.php/v4/yA/r/bStXkZOl3Ha.png","width":40},"text":"Lives in Palo Alto, California","external_url":null},{"icon":{"height":40,"scale":2,"uri":"https://static.xx.fbcdn.net/rsrc.php/v4/yh/r/k7egJAGHjmH.png","width":40},"text":"From Dobbs Ferry, New York","external_url":null},{"icon":{"height":40,"scale":2,"uri":"https://static.xx.fbcdn.net/rsrc.php/v4/yk/r/exk40A1bzjc.png","width":40},"text":"Married to Priscilla Chan","external_url":null}],"verified":true,"delegate_page_id":null,"reels_profile_id":"YXBwX2NvbGxlY3Rpb246cGZiaWQwUHlEa0Y2ZnV0NlFXdjhtS2NlNDR6dnp3OUJ5TnlXOVZXanNmM2hiWjJ1OXZ6cGVzQmh4NWdRd3RrUU1oajhHSGJoMjczN2hXcEMyMWJXWDRLTWw=","influencer_category":"Profile · Public figure","education":"…
Fields you’ll likely use:
- profile.name, profile.profile_id, profile.url for identity and linking
- profile.image and profile.cover_image for UI
- profile.verified to signal trust
Working with responses: practical notes
- Time and views: Search Videos returns a human-readable “time_and_views_raw”. Keep it as a label or parse cautiously.
- Thumbnails: thumbnail is a direct image URL; don’t hotlink aggressively in high-traffic UIs without proper caching/CDN.
- Pagination/cursors: Search Events responses can include a cursor string. Persist it if you plan to paginate or resume scans later.
- Deduplication: use video_id as the primary key in your DB. Combine with author.id to scope analytics.
- Quotas: the hub runs on subscription + quota, not pay-per-call. Inspect your plan on the API page and monitor usage in your Zyla dashboard.
Real-world media workflows
- Content discovery for editors: run Search Videos on named athletes, shows, or topics hourly. Store video_id, title, author, and time_and_views_raw for ranking.
- Brand monitoring: query product names or campaigns and push matching video_url into moderation or community teams.
- Channel sourcing: use Search Pages to find likely video sources, then focus downstream crawling or editorial coverage on those pages.
- Event-driven curation: Search Events for upcoming festivals or launches and prime your video watchlists around event titles.
Call from AI agents via MCP
You can call any Zyla API from MCP-compatible clients (like Claude Code, Cursor, Windsurf). Agents talk to the Zyla MCP endpoint at https://mcp.zylalabs.com/mcp?apikey=YOUR_API_KEY and then invoke this API’s tools by path. See the MCP reference for integration specifics. Keep the same Authorization bearer key when invoking endpoints and prefer stable IDs (video_id) in agent memory.
Reference: endpoints and required params
Search Videos
- GET https://zylalabs.com/api/11904/facebook-scraper-api/22641/search-videos
- Params: query (string, required). Example value: football
Search Pages
- GET https://zylalabs.com/api/11904/facebook-scraper-api/22640/search-pages
- Params: query (string, required). Example value: messi
Search Events
- GET https://zylalabs.com/api/11904/facebook-scraper-api/22642/search-events
- Params: query (string, required). Example value: beer
All requests require: Authorization: Bearer YOUR_API_KEY
Explore other media and networking listings on zylalabs.com. Your same API key works across the hub.
FAQ
How do I authenticate requests?
Send Authorization: Bearer YOUR_API_KEY on every request to the Zyla API URL.
What fields can I rely on in video search results?
For each item in results: type, video_id, video_url, title, description, author{name, url, is_verified, id}, thumbnail, and time_and_views_raw.
Is there pagination?
Search Events responses include a cursor string you can store for pagination or resuming scans. For other endpoints, handle result arrays as returned.
What are the usage limits?
Usage is subscription + quota, not pay-per-call. First-time access typically offers a 7-day trial or 50 requests. Check the API page for current access options and pricing.
Can I call this from an AI agent?
Yes. Use the MCP endpoint at https://mcp.zylalabs.com/mcp?apikey=YOUR_API_KEY from an MCP-compatible client, then invoke this API’s tools with your bearer key.
Ready to ship your media search integration? Start your trial on the Facebook Scraper API, get your API key, and implement video search today.
Official API response
{"profile":{"name":"Mark Zuckerberg","profile_id":"4","url":"https://www.facebook.com/zuck","image":"https://scontent-atl3-2.xx.fbcdn.net/v/t39.30808-1/632598281_10117314650513371_3238643608998008744_n.jpg?stp=dst-jpg_s480x480_tt6&_nc_cat=105&ccb=1-7&_nc_sid=1d2534&_nc_ohc=LjkvEg7sdw8Q7kNvwEaPsox&_nc_oc=AdmCdyxSpDASES67Y_gDG38HAgX4jHJmTVIhvvCWNAPvPyv-pT2MkqAPjlQhPbHwWrY8uW9gqGX2G_SqONA9jbku&_nc_zt=24&_nc_ht=scontent-atl3-2.xx&_nc_gid=IndkrZ-NXLMaL1RGOJUuzw&oh=00_Aft5Pz5CRJir2D9RSDB9DHeDE2DgVFClZFvg3B_3N3-Rdg&oe=69A18B0B","intro":"Bringing the world closer together.","cover_image":"https://scontent-atl3-3.xx.fbcdn.net/v/t39.30808-6/632550896_10117314656231911_7975049830116595629_n.png?_nc_cat=110&ccb=1-7&_nc_sid=2a1932&_nc_ohc=MK0GxxJ3MnAQ7kNvwGa91zk&_nc_oc=AdkYRmT5nQE8Wy7rtQIQVcsAFZpf2O-AfWgQayQistV8orDCmh3HHLcV1wyBGJ4MhxNmm_SjaJsm_Fhj0K4dUZng&_nc_zt=23&_nc_ht=scontent-atl3-3.xx&_nc_gid=IndkrZ-NXLMaL1RGOJUuzw&oh=00_AfvWwbUzfWNcxPpMjaQEicKtpNeAHrXk8D1zfpIjowyKEw&oe=69A17D22","gender":"MALE","about":{},"about_public":[{"icon":{"height":40,"scale":2,"uri":"https://static.xx.fbcdn.net/rsrc.php/v4/yW/r/nS7-NxdkDDt.png","width":40},"text":"Profile · Public figure","external_url":null},{"icon":{"height":40,"scale":2,"uri":"https://static.xx.fbcdn.net/rsrc.php/v4/yi/r/Xcm_N7TYfz4.png","width":40},"text":"Founder and CEO at Meta","external_url":null},{"icon":{"height":40,"scale":2,"uri":"https://static.xx.fbcdn.net/rsrc.php/v4/yi/r/Xcm_N7TYfz4.png","width":40},"text":"Works at Biohub","external_url":null},{"icon":{"height":40,"scale":2,"uri":"https://static.xx.fbcdn.net/rsrc.php/v4/yW/r/nDxCDAeszOF.png","width":40},"text":"Studied Computer Science and Psychology at Harvard University","external_url":null},{"icon":{"height":40,"scale":2,"uri":"https://static.xx.fbcdn.net/rsrc.php/v4/yA/r/bStXkZOl3Ha.png","width":40},"text":"Lives in Palo Alto, California","external_url":null},{"icon":{"height":40,"scale":2,"uri":"https://static.xx.fbcdn.net/rsrc.php/v4/yh/r/k7egJAGHjmH.png","width":40},"text":"From Dobbs Ferry, New York","external_url":null},{"icon":{"height":40,"scale":2,"uri":"https://static.xx.fbcdn.net/rsrc.php/v4/yk/r/exk40A1bzjc.png","width":40},"text":"Married to Priscilla Chan","external_url":null}],"verified":true,"delegate_page_id":null,"reels_profile_id":"YXBwX2NvbGxlY3Rpb246cGZiaWQwUHlEa0Y2ZnV0NlFXdjhtS2NlNDR6dnp3OUJ5TnlXOVZXanNmM2hiWjJ1OXZ6cGVzQmh4NWdRd3RrUU1oajhHSGJoMjczN2hXcEMyMWJXWDRLTWw=","influencer_category":"Profile · Public figure","education":"…
Official API response
{"profile":{"name":"Mark Zuckerberg","profile_id":"4","url":"https://www.facebook.com/zuck","image":"https://scontent-atl3-2.xx.fbcdn.net/v/t39.30808-1/632598281_10117314650513371_3238643608998008744_n.jpg?stp=dst-jpg_s480x480_tt6&_nc_cat=105&ccb=1-7&_nc_sid=1d2534&_nc_ohc=LjkvEg7sdw8Q7kNvwEaPsox&_nc_oc=AdmCdyxSpDASES67Y_gDG38HAgX4jHJmTVIhvvCWNAPvPyv-pT2MkqAPjlQhPbHwWrY8uW9gqGX2G_SqONA9jbku&_nc_zt=24&_nc_ht=scontent-atl3-2.xx&_nc_gid=IndkrZ-NXLMaL1RGOJUuzw&oh=00_Aft5Pz5CRJir2D9RSDB9DHeDE2DgVFClZFvg3B_3N3-Rdg&oe=69A18B0B","intro":"Bringing the world closer together.","cover_image":"https://scontent-atl3-3.xx.fbcdn.net/v/t39.30808-6/632550896_10117314656231911_7975049830116595629_n.png?_nc_cat=110&ccb=1-7&_nc_sid=2a1932&_nc_ohc=MK0GxxJ3MnAQ7kNvwGa91zk&_nc_oc=AdkYRmT5nQE8Wy7rtQIQVcsAFZpf2O-AfWgQayQistV8orDCmh3HHLcV1wyBGJ4MhxNmm_SjaJsm_Fhj0K4dUZng&_nc_zt=23&_nc_ht=scontent-atl3-3.xx&_nc_gid=IndkrZ-NXLMaL1RGOJUuzw&oh=00_AfvWwbUzfWNcxPpMjaQEicKtpNeAHrXk8D1zfpIjowyKEw&oe=69A17D22","gender":"MALE","about":{},"about_public":[{"icon":{"height":40,"scale":2,"uri":"https://static.xx.fbcdn.net/rsrc.php/v4/yW/r/nS7-NxdkDDt.png","width":40},"text":"Profile · Public figure","external_url":null},{"icon":{"height":40,"scale":2,"uri":"https://static.xx.fbcdn.net/rsrc.php/v4/yi/r/Xcm_N7TYfz4.png","width":40},"text":"Founder and CEO at Meta","external_url":null},{"icon":{"height":40,"scale":2,"uri":"https://static.xx.fbcdn.net/rsrc.php/v4/yi/r/Xcm_N7TYfz4.png","width":40},"text":"Works at Biohub","external_url":null},{"icon":{"height":40,"scale":2,"uri":"https://static.xx.fbcdn.net/rsrc.php/v4/yW/r/nDxCDAeszOF.png","width":40},"text":"Studied Computer Science and Psychology at Harvard University","external_url":null},{"icon":{"height":40,"scale":2,"uri":"https://static.xx.fbcdn.net/rsrc.php/v4/yA/r/bStXkZOl3Ha.png","width":40},"text":"Lives in Palo Alto, California","external_url":null},{"icon":{"height":40,"scale":2,"uri":"https://static.xx.fbcdn.net/rsrc.php/v4/yh/r/k7egJAGHjmH.png","width":40},"text":"From Dobbs Ferry, New York","external_url":null},{"icon":{"height":40,"scale":2,"uri":"https://static.xx.fbcdn.net/rsrc.php/v4/yk/r/exk40A1bzjc.png","width":40},"text":"Married to Priscilla Chan","external_url":null}],"verified":true,"delegate_page_id":null,"reels_profile_id":"YXBwX2NvbGxlY3Rpb246cGZiaWQwUHlEa0Y2ZnV0NlFXdjhtS2NlNDR6dnp3OUJ5TnlXOVZXanNmM2hiWjJ1OXZ6cGVzQmh4NWdRd3RrUU1oajhHSGJoMjczN2hXcEMyMWJXWDRLTWw=","influencer_category":"Profile · Public figure","education":"…