All platforms

Facebook Ad Library API

5 endpoints for public Facebook Ad Library data, from 5 credits a call. Same response format and field names as every other platform.

curl "https://scrapeio.com/v1/facebook/adLibrary/ad" \
  -H "x-api-key: YOUR_KEY"
GET/v1/facebook/adLibrary/ad5 credits

Ad Details

ParameterTypeDescription
idstringFacebook Ad Id
urlstringFacebook Ad URL
get_transcriptbooleanTranscription is opt-in via gettranscript=true.
trimbooleanSet to true for a trimmed down version of the response
cache_max_age1d, 3d, 7d, 14d, 30dIf we have a response in the cache that is this many days old or newer, return the cached response (0 credits, with "cached": true and a "ca
curl "https://scrapeio.com/v1/facebook/adLibrary/ad" \
  -H "x-api-key: YOUR_KEY"
GET/v1/facebook/adLibrary/ad/transcript5 credits

Ad Transcript

ParameterTypeDescription
idstringFacebook Ad Id
urlstringFacebook Ad URL
cache_max_age1d, 3d, 7d, 14d, 30dIf we have a response in the cache that is this many days old or newer, return the cached response (0 credits, with "cached": true and a "ca
curl "https://scrapeio.com/v1/facebook/adLibrary/ad/transcript" \
  -H "x-api-key: YOUR_KEY"
GET/v1/facebook/adLibrary/company/ads5 credits

Company Ads

ParameterTypeDescription
pageIdstringThe companies ad library page id.
companyNamestringThe name of the company.
countrystringThis can only be one country.
statusALL, ACTIVE, INACTIVEStatus of the ad.
media_typeALL, IMAGE, VIDEO, MEME, IMAGE_AND_MEME, NONEMedia type of the ad.
languagestringLanguage to filter ads on.
sort_bytotal_impressions, relevancy_monthly_groupedSort by impressions (high to low), or Most Recent (relevancymonthlygrouped).
start_datestringStart date to search for.
end_datestringEnd date to search for.
trimbooleanSet to true for a trimmed down version of the response
cursorstringCursor to paginate through results
curl "https://scrapeio.com/v1/facebook/adLibrary/company/ads" \
  -H "x-api-key: YOUR_KEY"
GET/v1/facebook/adLibrary/search/ads5 credits

Search

ParameterTypeDescription
queryrequiredstringKeyword to search for
sort_bytotal_impressions, relevancy_monthly_groupedSort by impressions (high to low), or Most Recent (relevancymonthlygrouped).
search_typekeyword_unordered, keyword_exact_phraseIf you want to search by exact phrase or not
ad_typeall, political_and_issue_adsSearch for all ads or only political and issue ads
countrystringThis can only be one country.
languagestringLanguage to filter ads on.
statusALL, ACTIVE, INACTIVEStatus of the ad.
media_typeALL, IMAGE, VIDEO, MEME, IMAGE_AND_MEME, NONEMedia type of the ad.
start_datestringImpressions start date.
end_datestringImpressions end date.
trimbooleanSet to true for a trimmed down version of the response
cursorstringCursor to paginate through results
curl "https://scrapeio.com/v1/facebook/adLibrary/search/ads?query=coffee" \
  -H "x-api-key: YOUR_KEY"
GET/v1/facebook/adLibrary/search/companies5 credits

Search for Companies

ParameterTypeDescription
queryrequiredstringKeyword to search for
curl "https://scrapeio.com/v1/facebook/adLibrary/search/companies?query=coffee" \
  -H "x-api-key: YOUR_KEY"

Other platforms