Facebook Ads Scraper API
Refer to the official Scrapingdog documentation for Facebook Ads Scraper API parameters and usage.
Endpoint:
https://api.scrapingdog.com/facebookAPI Parameters
π
Scrapingdog Parameters
api_keyRequiredYour personal API key. Available on your dashboard.
Type: String
π
Search Query
page_idOptionalFacebook Page ID used to fetch ads from a specific Facebook page. When this is provided, the API searches ads by page instead of keyword.
Type: StringqueryOptionalSearch keyword or phrase used to find matching ads in the Facebook Ads Library. Required when page_id or url is not provided.
Type: StringurlOptionalFull Facebook Ads Library URL. If provided, the API extracts supported search parameters from the URL automatically.
Type: String
π
Geographic Location and Localization
location_idOptionalLocation identifier used to filter ads by a specific city, region, or country. This must be used together with location_name and location_type.
Type: Stringlocation_nameOptionalName of the location used in the location filter, such as a city, region, or country name. Required when using location_id.
Type: Stringlocation_typeOptionalType of location filter. Accepted values are CITY, REGION, and COUNTRY. Required when using location filters.
Type: StringcountryOptionalCountry code used to filter ads by country. Default value is ALL.
Type: Stringcontent_languageOptionalFilters ads by the language of the ad content. Pass the language code supported by Facebook Ads Library.
Type: String
β
οΈ Filters
ad_typeOptionalType of ads to return. Default value is ALL. Accepted values are ALL, POLITICAL_AND_ISSUE_ADS, HOUSING, EMPLOYMENT, and CREDIT.
Type: Stringactive_statusOptionalFilters ads by their current status. Default value is ALL. Accepted values are ALL, ACTIVE, and INACTIVE.
Type: Stringmedia_typeOptionalFilters ads by creative media type. Default value is ALL. Accepted values are ALL, VIDEO, and IMAGE.
Type: StringplatformsOptionalComma-separated list of platforms where the ads are running. Accepted values are facebook, instagram, messenger, and audience_network.
Type: Stringis_targeted_countryOptionalBoolean value used to apply targeted country filtering.
Type: String
π
Date Range
start_dateOptionalFilters ads that started running on or after this date. Use ISO date format: YYYY-MM-DD.
Type: Stringend_dateOptionalFilters ads that started running on or before this date. Use ISO date format: YYYY-MM-DD.
Type: String
π
Pagination
next_page_tokenOptionalPagination token used to fetch the next page of ad results. Pass the token returned in the previous response to continue scraping from where the last request ended.
Type: String