Scrapingdog

Facebook Ads Scraper API

Refer to the official Scrapingdog documentation for Facebook Ads Scraper API parameters and usage.

Endpoint: https://api.scrapingdog.com/facebook

API Parameters

πŸ”‘

Scrapingdog Parameters

  • api_key Required
    Your personal API key. Available on your dashboard.

    Type: String
πŸ”

Search Query

  • page_id Optional
    Facebook 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: String
  • query Optional
    Search keyword or phrase used to find matching ads in the Facebook Ads Library. Required when page_id or url is not provided.

    Type: String
  • url Optional
    Full Facebook Ads Library URL. If provided, the API extracts supported search parameters from the URL automatically.

    Type: String
🌍

Geographic Location and Localization

  • location_id Optional
    Location identifier used to filter ads by a specific city, region, or country. This must be used together with location_name and location_type.

    Type: String
  • location_name Optional
    Name of the location used in the location filter, such as a city, region, or country name. Required when using location_id.

    Type: String
  • location_type Optional
    Type of location filter. Accepted values are CITY, REGION, and COUNTRY. Required when using location filters.

    Type: String
  • country Optional
    Country code used to filter ads by country. Default value is ALL.

    Type: String
  • content_language Optional
    Filters ads by the language of the ad content. Pass the language code supported by Facebook Ads Library.

    Type: String
βš™

️ Filters

  • ad_type Optional
    Type of ads to return. Default value is ALL. Accepted values are ALL, POLITICAL_AND_ISSUE_ADS, HOUSING, EMPLOYMENT, and CREDIT.

    Type: String
  • active_status Optional
    Filters ads by their current status. Default value is ALL. Accepted values are ALL, ACTIVE, and INACTIVE.

    Type: String
  • media_type Optional
    Filters ads by creative media type. Default value is ALL. Accepted values are ALL, VIDEO, and IMAGE.

    Type: String
  • platforms Optional
    Comma-separated list of platforms where the ads are running. Accepted values are facebook, instagram, messenger, and audience_network.

    Type: String
  • is_targeted_country Optional
    Boolean value used to apply targeted country filtering.

    Type: String
πŸ“…

Date Range

  • start_date Optional
    Filters ads that started running on or after this date. Use ISO date format: YYYY-MM-DD.

    Type: String
  • end_date Optional
    Filters ads that started running on or before this date. Use ISO date format: YYYY-MM-DD.

    Type: String
πŸ“„

Pagination

  • next_page_token Optional
    Pagination 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

API Examples

API result preview