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>",
"input": "<unknown>",
"ctx": {}
}
]
}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. Each ad: ad_archive_id, ad_library_url, collation_id/collation_count, ad_text, title, caption, cta_text/cta_type, link_url (the landing page), link_description, display_format (image/video/DCO/carousel), creatives plus the same media split as images, videos and cards, extra_texts, extra_links, categories, contains_sensitive_content, contains_digital_created_media, platforms, started_running/ended, is_active, total_active_time (seconds), impressions, spend, reach_estimate, targeted_or_reached_countries, and the page: page_id, page_name, page_profile_uri, page_profile_picture_url, page_like_count, page_categories, page_is_deleted; each always present, null or [] when Meta shows none. The answer also echoes the query and the search_url read. advertiser is a Page name (keyword search) or a numeric Page ID (that advertiser’s whole set). Meta scopes the library by country (‘ALL’ for every 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>",
"input": "<unknown>",
"ctx": {}
}
]
}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'), or 'ALL' for every country. 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).

