Facebook Ad Library API

Search public ads by keyword or advertiser

Changed on
get/facebook-ad-library/search

Request

  • Base URL: https://scrappa.co/api
  • URL: https://scrappa.co/api/facebook-ad-library/search
  • Auth: API key in header X-API-KEY

Query parameters

querystring nullable

Keyword to search for in public ads. Either query or page_id is required.

page_idstring nullable

Numeric advertiser page id. Either query or page_id is required.

countrystring nullable

Two-letter ISO country code to restrict the search to.

ad_type'ALL' | 'POLITICAL_AND_ISSUE_ADS' | 'CREDIT_ADS' | 'FINANCIAL_PRODUCTS_AND_SERVICES_ADS' | 'EMPLOYMENT_ADS' | 'HOUSING_ADS' | 'UNCATEGORIZED_ADS' | 'null' nullable

Ad category to filter by: ALL, POLITICAL_AND_ISSUE_ADS, CREDIT_ADS, FINANCIAL_PRODUCTS_AND_SERVICES_ADS, EMPLOYMENT_ADS, HOUSING_ADS or UNCATEGORIZED_ADS.

media_type'ALL' | 'IMAGE' | 'MEME' | 'IMAGE_AND_MEME' | 'VIDEO' | 'NONE' | 'null' nullable

Creative format to filter by: ALL, IMAGE, MEME, IMAGE_AND_MEME, VIDEO or NONE.

active_status'ALL' | 'ACTIVE' | 'INACTIVE' | 'null' nullable

Restrict to currently running ads (ACTIVE), stopped ads (INACTIVE) or both (ALL).

publisher_platforms[]string[]

Restrict to ads placed on given platforms, such as facebook, instagram or audience_network. Pass the parameter more than once to allow several platforms.

start_dateinteger nullable

Only return ads whose delivery started at or after this Unix timestamp in seconds.

cursorstring nullable

Pagination cursor taken from the previous response.

Response

search_parametersobject required
adsobject[] required
ads_countinteger required
response_time_msinteger nullable required

Changes