Facebook Search Scraper
Pricing
from $5.00 / 1,000 result founds
Facebook Search Scraper
Search Facebook by keyword across Events, Marketplace and the Ad Library (ads and advertisers) in one Actor. No login or cookies needed.
Pricing
from $5.00 / 1,000 result founds
Rating
0.0
(0)
Developer
Khadin Akbar
Maintained by CommunityActor stats
0
Bookmarked
6
Total users
3
Monthly active users
8 days ago
Last modified
Categories
Share
What is Facebook Search Scraper?
Facebook Search Scraper is an Apify Actor for keyword search across Facebook Events, Marketplace, and the Ad Library, including ads and advertisers, from one run. It accepts a plain-text keyword in query, plus optional surface-specific filters, and returns one normalized record per result. Each record can include a title, URL, image, dates, location, pricing, page details, ad creative data, and provider metadata so you can route the output into analysis, enrichment, or follow-up scraping. It is usable through Apify MCP and works without Facebook login or cookies.
Best fit and connected workflows
Use this actor when a workflow starts with a keyword and ends with a structured set of Facebook records:
- Keyword-based ad discovery in the public Ad Library, then deeper detail work with Facebook Ads Library Scraper.
- Event discovery by topic and place, then engagement review with Facebook Post Comments Scraper when a returned public URL or ID suits a comment-focused follow-up.
- Marketplace discovery anchored to a city or place, then manual review of price, delivery, and location fields.
- AI-agent workflows that need one Apify tool call to search multiple Facebook surfaces without login or cookies.
This Actor is a strong routing step when you want discovery first and detail extraction second. The output keeps the surface type explicit, which makes downstream branching straightforward.
Example scenario
Maya, a marketing analyst, starts with the keyword electric bike. She sets searchType to ads and country to US to focus the Ad Library search. The actor returns records with fields such as title, pageName, adArchiveId, isActive, startDate, ctaText, linkUrl, adText, and displayFormat.
From those fields, Maya can quickly identify which advertiser pages are active, which ad creatives mention a relevant offer, and which landing pages are tied to the ads. Her next action is to open the most relevant result in a follow-up workflow, then pass the returned URL or ID into a detail scraper.
Input fields
| Field | Type | Required | Default | Purpose |
|---|---|---|---|---|
query | string | Yes | - | Plain keyword to search Facebook for. Use text such as coffee festival, Nike, or electric bike. |
searchType | string | No | ads | Chooses the Facebook surface: ads, advertisers, events, or marketplace. |
maxResults | integer | No | 50 | Maximum number of results to return and charge for. Range: 1 to 500. |
location | string | No | Austin, TX | Marketplace anchor place. Used only when searchType is marketplace. |
country | string | No | - | Two-letter country code for Ad Library results. Used only for ads and advertisers. |
adStatus | string | No | ACTIVE | Ad Library ad status filter: ACTIVE, INACTIVE, or ALL. Used only for ads. |
adType | string | No | ALL | Ad Library ad type filter: ALL or POLITICAL_AND_ISSUE_ADS. Used only for ads. |
fallbackProvider | string | No | auto | Provider routing: the routing options listed in the input schema. |
Focused input example
{"query": "electric bike","searchType": "ads","country": "US","adStatus": "ACTIVE","adType": "ALL","maxResults": 25,"fallbackProvider": "auto"}
Output fields
Each dataset item is one search result. Fields are populated according to the surface that produced the record.
| Field | Type | Meaning |
|---|---|---|
searchType | string | Surface that produced the result. |
resultType | string | Record kind such as event, marketplaceListing, ad, or advertiser. |
query | string | Keyword used in the search. |
position | integer | 1-based rank in the run. |
id | string or null | Facebook object ID. |
url | string or null | Canonical Facebook URL. |
title | string or null | Display name for the result. |
imageUrl | string or null | Primary image or cover photo. |
startTime | string or null | Event start time in ISO 8601 format. |
startTimestamp | integer or null | Event start timestamp in seconds. |
dateText | string or null | Human-readable event date text. |
placeName | string or null | Event venue or place. |
isOnline | boolean or null | Whether the event is online. |
isPast | boolean or null | Whether the event has already happened. |
interestedCount | integer or null | Event interest count. |
goingCount | integer or null | Event going count. |
priceText | string or null | Marketplace price or event ticket price text. |
price | number or null | Marketplace numeric price. |
city | string or null | Marketplace city. |
state | string or null | Marketplace state or region. |
locationName | string or null | Marketplace display location. |
isSold | boolean or null | Marketplace sold status. |
deliveryTypes | array | Marketplace delivery or pickup options. |
pageName | string or null | Ad or advertiser page name. |
pageId | string or null | Ad or advertiser page ID. |
adArchiveId | string or null | Ad Library archive ID. |
isActive | boolean or null | Whether the ad is currently running. |
startDate | string or null | Ad start date in ISO 8601 format. |
endDate | string or null | Ad end date in ISO 8601 format. |
ctaText | string or null | Ad call-to-action label. |
ctaType | string or null | Ad call-to-action type code. |
linkUrl | string or null | Ad landing page URL. |
adText | string or null | Primary ad copy. |
displayFormat | string or null | Ad creative format. |
pageCategories | array | Ad page categories. |
category | string or null | Advertiser page category. |
likes | integer or null | Advertiser page like count. |
verification | string or null | Advertiser verification status. |
igUsername | string or null | Linked Instagram username. |
igFollowers | integer or null | Linked Instagram follower count. |
pageAlias | string or null | Page vanity handle. |
country | string or null | Advertiser page country. |
scrapeSource | string | Managed provider that returned the record. |
scrapedAt | string | ISO 8601 timestamp when the record was emitted. |
Illustrative output record
{"searchType": "ads","resultType": "ad","query": "electric bike","position": 1,"id": "1378176106734781","adArchiveId": "1378176106734781","url": "https://www.facebook.com/ads/library/?id=1378176106734781","title": "Summer Sale - 40% Off E-Bikes","imageUrl": "https://scontent.xx.fbcdn.net/example.jpg","pageName": "VoltRide","pageId": "119749581219299","isActive": true,"startDate": "2026-05-01T00:00:00.000Z","ctaText": "Shop now","ctaType": "SHOP_NOW","linkUrl": "https://voltride.com/summer","adText": "Ride further for less...","displayFormat": "IMAGE","pageCategories": ["Sporting goods"],"scrapedAt": "2026-07-01T12:00:00.000Z"}
How it works
The actor is provider-backed and cookieless. It routes each searchType to the correct managed data provider:
adsandadvertisersuse the public Ad Library.eventsfinds public events.marketplacefinds for-sale listings and resolves the supplied location to coordinates.
The actor paginates until it reaches maxResults or the provider returns no more results. Output is normalized into a flat dataset schema so different surfaces can be processed together. The live contract also defines soft-fail validation, honest-fail behavior on provider outage, and safe dataset writes. Provider routing is controlled with fallbackProvider, where auto tries a primary data provider first, then a fallback provider; Events search uses the primary data provider.
Pricing
This actor uses Pay per event with Apify platform usage on top. The charging model includes a small run-start event and a per-result event for each returned search result. Open the live Pricing tab on the actor page to review the current rates before running.
As an example, a run that returns fifty results is charged as fifty result events plus the run-start event. A shorter run with ten returned results is charged for ten result events plus the run-start event.
Use with AI agents (MCP)
This Actor is usable through Apify MCP as a tool for keyword-based Facebook search. The precise tool behavior is: accept a keyword plus a Facebook surface selector, return normalized records, and preserve scrapeSource, scrapedAt, and the surface-specific fields so the agent can inspect, rank, and route results into follow-up steps.
Actor identity: khadinakbar/facebook-search-scraper
Search Facebook for the keyword "coffee festival" on the Events surface. Return up to 10 records. Summarize the most relevant fields for each result and note which returned URL or ID could be used in a follow-up workflow.
Output interpretation:
resultTypetells the agent whether the record is an event, marketplace listing, ad, or advertiser.scrapeSourceshows which managed provider returned the item.positionreflects rank within the run.urlandidare the safest references for downstream steps.- Event fields such as
startTime,placeName,interestedCount, andgoingCountare event-specific. - Ad fields such as
pageName,adArchiveId,ctaText,linkUrl, anddisplayFormatare ad-specific. maxResultscontrols how many records are paged and charged.- If the configured route starts with the primary data provider and a different provider is needed for ads or advertisers,
fallbackProvider: "auto"can route through the available managed providers. Events search uses the primary data provider. - The normalized dataset format makes it straightforward for an agent to pick a returned
urloridand continue with a downstream workflow.
Apify API example
import { ApifyClient } from "apify-client";const client = new ApifyClient({token: process.env.APIFY_TOKEN,});const input = {query: "electric bike",searchType: "ads",country: "US",maxResults: 10,fallbackProvider: "auto",};const run = await client.actor("khadinakbar/facebook-search-scraper").call(input);const dataset = await client.dataset(run.defaultDatasetId).listItems({ clean: true });console.log(dataset.items);
Best results and outcome guidance
Use a plain keyword that matches the Facebook surface you want to inspect.
- For ads, pair
querywithcountry,adStatus, andadTypewhen you want a narrower Ad Library slice. - For events, keep the keyword close to the event topic and read
startTime,dateText,placeName, and attendance counts together. - For Marketplace, supply a real place in
locationso the listing search can anchor results geographically. - For advertisers, treat
pageName,category,likes,verification,igUsername, andcountryas the main summary fields. - Keep
maxResultsaligned with the size of the workflow stage. Use a smaller number for quick discovery and a larger number when you plan to review more returned records. - Use
urloridas the handoff to downstream scrapers or manual review.
Continue the workflow
- Then use Facebook Video Downloader - Reels & MP4 Links to continue Facebook records selected with Facebook Search Scraper into a focused media workflow.
- Then use Facebook Video Transcript Extractor to continue Facebook records selected with Facebook Search Scraper into a focused media workflow.
Design note
I found that the dataset contract keeps searchType, resultType, query, position, scrapeSource, and scrapedAt as required fields. That means every emitted record carries the surface, ranking, source, and emission time even when optional surface-specific fields stay empty.
FAQ
Which Facebook surfaces does this actor search?
It searches Events, Marketplace, Ad Library ads, and Ad Library advertisers by keyword.
When should I use searchType: "ads" versus searchType: "advertisers"?
Use ads when you want individual ad creatives with copy, CTA, landing URL, and run dates. Use advertisers when you want advertiser pages with page-level metadata such as category, likes, verification, and Instagram linkage.
What should I pass in location?
Pass a city or place name such as Austin, TX or London, UK. The actor uses it to anchor Marketplace listings.
How do I route from discovery to detail scraping?
Use the returned url or id from this actor, then pass that record into a downstream workflow such as Facebook Ads Library Scraper or Facebook Post Comments Scraper when the follow-up actor accepts the returned Facebook reference.
How does fallbackProvider affect routing?
auto tries a primary data provider first, then a fallback provider for supported surfaces. You can also select one provider directly. Events search uses the primary data provider.
Responsible use
Use the actor in line with Facebook's public surface access, Apify's terms, and applicable laws. This actor works without login and targets public keyword-searchable surfaces only. Review the live Pricing tab before running larger searches, and keep maxResults sized to the actual workflow need.