curl --request POST \
--url https://api.scrapeunblocker.com/ads/meta-ad-library \
--header 'x-scrapeunblocker-key: <api-key>'import requests
url = "https://api.scrapeunblocker.com/ads/meta-ad-library"
headers = {"x-scrapeunblocker-key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'x-scrapeunblocker-key': '<api-key>'}};
fetch('https://api.scrapeunblocker.com/ads/meta-ad-library', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Scrape an advertiser's Meta (Facebook) ads
Pulls a Facebook/Instagram advertiser’s ads from the Meta Ad Library and returns them as JSON for competitor analysis: ad_text, title, cta_text/cta_type, display_format (image/video/DCO/carousel), creatives (image and video URLs), link_url (the landing page), platforms, started_running/ended, and is_active. advertiser is a Page name (keyword search) or a numeric Page ID (that advertiser’s whole set). Meta scopes the library by country. Use active_status (‘active’/‘inactive’/‘all’) and media_type to filter, and max_ads to bound the result.
curl --request POST \
--url https://api.scrapeunblocker.com/ads/meta-ad-library \
--header 'x-scrapeunblocker-key: <api-key>'import requests
url = "https://api.scrapeunblocker.com/ads/meta-ad-library"
headers = {"x-scrapeunblocker-key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'x-scrapeunblocker-key': '<api-key>'}};
fetch('https://api.scrapeunblocker.com/ads/meta-ad-library', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Your ScrapeUnblocker API key. Apply on every request.
Query Parameters
Advertiser to pull ads for: a Facebook Page name (keyword search) or a numeric Page ID (that advertiser's whole set).
Ad Library country (ISO-2, e.g. 'US', 'GB', 'DE'). Meta scopes the library by country.
Which ads to return: 'active', 'inactive', or 'all'.
Creative type filter: 'all', 'image', 'video', or 'meme'.
Upper bound on ads returned (the scraper paginates until it reaches this or runs out).
1 <= x <= 500Response
JSON with a results array of ads (may be empty if the advertiser has no ads for the given filters).

