Social Media · Facebook Scraper
Facebook Ad Library Search Scraper API
Search the Facebook Ad Library by keyword and get the live ads back with creatives, advertiser, spend range and run dates. No headless browsers, no captchas, proxies included.
// Facebook · Ad Library Search
curl -H "X-API-Key: hpx_your_key_here" \
"https://hproxy.com/api/v1/scrape/facebook/ad-search?query=coffee"
// → { "data": { … }, "records": 1, "costUsd": … }
From Request to Clean JSON
You write one line. We do everything between the request and the data.
You send
One API call
GET the Facebook endpoint with your key. That's all your code does.
We handle
Proxies · captchas · parsing
Residential exit, anti-bot walls, JS rendering and extraction, all server-side, on us.
You get
Clean JSON
A structured object every time. No HTML, no scraping code, no maintenance.
The Facebook Ad Library Search endpoint is one API call: send a search query with your HProxy key and get back a clean, structured JSON object. Search the Facebook Ad Library by keyword and get the live ads back with creatives, advertiser, spend range and run dates. HProxy runs the proxies, sessions, anti-bot handling and parsing server-side, so there is no headless browser to babysit and no parser to keep fixing when Facebook changes its markup. You only ever touch the JSON. Longer result sets come back page by page with a cursor, so you can walk the whole set without holding it in memory.
What the Facebook Ad Library Search API returns
creatives[]
Each active ad's media, copy and format.
advertiser
The page or advertiser running the ad.
spend / impressions
Spend range and reach where disclosed.
dates
First-seen and last-seen run dates.
Example response
{
"advertiser": { "name": "Brand Inc", "pageId": "104..." },
"creatives": [
{ "format": "video", "body": "Shop the new drop", "media": "https://.../ad.mp4" }
],
"spend": { "min": 5000, "max": 10000, "currency": "USD" },
"dates": { "firstSeen": "2026-06-30", "lastSeen": "2026-07-17" }
}Trimmed for brevity. Every call returns the full object with all fields listed here.
The Facebook ad library search endpoint
Full Facebook reference/api/v1/scrape/facebook/ad-searchParameters
querystringrequiredSearch term or keyword.
sort_bystringoptionalOrdering to apply to the results. Allowed values: `total_impressions`, `relevancy_monthly_grouped`.
search_typestringoptionalThe search type parameter. Allowed values: `keyword_unordered`, `keyword_exact_phrase`.
ad_typestringoptionalThe ad type parameter. Allowed values: `all`, `political_and_issue_ads`.
countrystringoptionalTwo-letter region/country code, e.g. US.
statusstringoptionalThe status parameter. Allowed values: `ALL`, `ACTIVE`, `INACTIVE`.
media_typestringoptionalThe media type parameter. Allowed values: `ALL`, `IMAGE`, `VIDEO`, `MEME`, `IMAGE_AND_MEME`, `NONE`.
start_datestringoptionalFilter by date, as YYYY-MM-DD.
end_datestringoptionalFilter by date, as YYYY-MM-DD.
cursorstringoptionalPagination token from the previous response.
trimbooleanoptionalReturn a slimmed-down payload (drops verbose fields).
Example request
curl "https://hproxy.com/api/v1/scrape/facebook/ad-search?query=coffee" \
-H "X-API-Key: hpx_your_key_here"POST with a JSON body works too. Errors, timeouts and rate limits are never billed; a target that does not exist counts as a call.
Scraping Facebook ad library search in three steps
Create a free account
Sign up and top up any amount. The balance pays for every HProxy product and never expires.
Grab your API key
One key from the dashboard authenticates every scraper, Facebook ad library search included.
Call the endpoint
Send the target to the Facebook Ad Library Search endpoint and read the JSON. That is the whole integration.
No captchas, ever
Anti-bot walls, JS rendering and rate limits are handled server-side. You call an API, that is the whole job.
Residential-backed
Every request exits through HProxy's own residential network, so it looks like a real user on a real device.
Pay per call
No subscription, no seat licenses. Calls are billed from your balance and the balance never expires.
Fresh on every call
Responses are scraped live at request time, no stale cache dressed up as data.
Errors are free
Blocked, errored or timed-out calls are not charged. A target that does not exist counts as a call, because the platform still had to be asked.
Scales with you
From one call to millions: same endpoint, same price curve, volume discounts as you grow.
What people build with it
Spy on competitor ad creatives and messaging.
Track ad spend and campaign timing in your niche.
Build a swipe file of what is running right now.
Facebook Ad Library Search pricing
$3.50
per 1,000 calls · 0.35¢ each
Pay per call, no subscription
Errors and timeouts are not charged
Proxies included in the price
This endpoint is priced above Facebook's $3.00/1k entry rate
Facebook Ad Library Search scraper FAQ
How do I scrape Facebook ad library search?
What does the Facebook ad library search scraper return?
How much does it cost to scrape Facebook ad library search?
Can I pull more than one page of Facebook ad library search?
Do I need my own proxies to scrape Facebook?
Is scraping Facebook ad library search allowed?
The same data on other platforms
All Ad Library API endpointsReady when you are.Your dashboard is ten seconds away.
Or talk to us at support@hproxy.com