Actor picture

Facebook Page Ads

alexey/facebook-page-ads

Scrape relevant advertising data from Facebook Ads global database, including information about your competitors.

No credit card required

Author's avatarAlexey Udovydchenko
  • Modified
  • Users185
  • Runs9,489

Features

Scraping for Facebook page ads, RESIDENTIAL PROXIES required.

Input

Provide Facebook page URLs like https://www.facebook.com/drive4quantix/ OR Facebook Ads URLs like https://www.facebook.com/ads/library/?active_status=all&ad_type=all&country=ALL&q=%7B%7D&sort_data[direction]=desc&sort_data[mode]=relevancy_monthly_grouped&start_date[min]=2022-10-12&start_date[max]=&search_type=keyword_unordered&media_type=video (just copied pasted with your settings and filters from https://www.facebook.com/ads/library) and amount of scrolls to do for ads per page. Zero scrolls will return initial set of ads. Each scroll expected to return 30 ads, also facebook limiting max amount of ads displayed per page, so some older ads might not be available.

If only total results chosen output will be saved as single dataset item per page.

{
  "startUrls": [ { "url": "https://www.facebook.com/drive4quantix/" } ],
  "scrollsAmount": 0
}

Output

Please note that startDate and endDate when-if available will be also added as formatted ISO values startDateFormatted: "2022-10-12T07:00:00.000Z" and endDateFormatted: "2022-10-12T07:00:00.000Z"

{
  "adid": "0",
  "adArchiveID": "642733917513171",
  "archiveTypes": [
    1
  ],
  "categories": [
    1
  ],
  "collationCount": 1,
  "collationID": 1252762005510933,
  "currency": "CZK",
  "endDate": 1665558000,
  "entityType": "regular_page",
  "fevInfo": {
    "authorized_entity_text": "This information was submitted by the advertiser.",
    "email": "prchal@anobudelip.cz",
    "phone": "+420602346701",
    "website": "http://www.anobudelip.cz/",
    "submitted_on": "Submitted May 3, 2019",
    "address": "Babická 2, Praha 4 14000, CZ",
    "fec_additional_info": null,
    "learn_more_content": {
      "help_center_text": "Visit the Help Center to learn about what we require from advertisers to run ads about social issues, elections or politics.",
      "help_center_url": "https://www.facebook.com/help/180607332665293?ref=infosheet",
      "learn_more_text": "Learn more"
    },
    "free_form_additional_info": {
      "committee_id": null,
      "cnpj_or_cpf": null,
      "director_name": null,
      "ec_certificates": [],
      "gst_number": null,
      "point_of_contact": null,
      "treasurer_name": null,
      "agent_name": null,
      "corporate_purpose": null,
      "promoter_name": null
    },
    "page_admin_additional_info": null,
    "page_name_additional_info": null
  },
  "gatedType": "eligible",
  "hasUserReported": false,
  "hiddenSafetyData": false,
  "hideDataStatus": "NONE",
  "impressionsWithIndex": {
    "impressionsText": "<1K",
    "impressionsIndex": 0
  },
  "isActive": true,
  "isProfilePage": false,
  "pageID": "214827221987263",
  "pageInfo": null,
  "pageIsDeleted": false,
  "pageName": "Andrej Babiš",
  "politicalCountries": [
    "CZ"
  ],
  "reachEstimate": "100K - 500K people",
  "reportCount": null,
  "snapshot": {
    "ad_creative_id": "23852136828240015",
    "cards": [],
    "body_translations": {},
    "byline": "ANO",
    "caption": null,
    "cta_text": null,
    "dynamic_item_flags": {},
    "dynamic_versions": null,
    "edited_snapshots": [],
    "effective_authorization_category": "POLITICAL",
    "event": [],
    "extra_images": [],
    "extra_links": [],
    "extra_texts": [],
    "extra_videos": [],
    "instagram_shopping_products": [],
    "display_format": "video",
    "title": null,
    "link_description": null,
    "link_url": null,
    "page_welcome_message": null,
    "images": [],
    "videos": [
      {
        "video_hd_url": "https://video.fosu2-2.fna.fbcdn.net/v/t42.1790-2/310244466_514091377211029_7281870979738982870_n.?_nc_cat=108&ccb=1-7&_nc_sid=cf96c8&_nc_ohc=wI7_vRzlr4AAX-iJbX7&_nc_ht=video.fosu2-2.fna&oh=00_AT94pLF80kNdcTDNliTbw8TxhCndMFVyMH7rv5wDDBwCUw&oe=63475753",
        "video_sd_url": "https://video-iad3-1.xx.fbcdn.net/v/t42.1790-2/311267555_639267554404882_8749856098481071598_n.mp4?_nc_cat=109&ccb=1-7&_nc_sid=cf96c8&_nc_ohc=AnllFC4zFiEAX_Shd4z&_nc_oc=AQnYVoyIOhDoHp53nBcuum4yGHDwi6tGNs3wqeqJ2Z0lv48mLwaebUJKLwyptaFefaI&_nc_ht=video-iad3-1.xx&oh=00_AT_FB4kQaMsBYJhN_FlwgFJTYpmFxeWmgnUErCG6w51d4w&oe=63475366",
        "video_preview_image_url": "https://scontent.fosu2-1.fna.fbcdn.net/v/t39.35426-6/310312367_1289180735178095_5443946697486037845_n.jpg?_nc_cat=105&ccb=1-7&_nc_sid=cf96c8&_nc_ohc=xeSVT-ZLilMAX_BDRzm&_nc_ht=scontent.fosu2-1.fna&oh=00_AT9SBmQEElrlwghIrsHFxxjKPdevEOO_4muNUb2ELs_GrA&oe=634CEC0A"
      }
    ],
    "creation_time": 1665580010,
    "page_id": 214827221987263,
    "page_name": "Andrej Babiš",
    "page_profile_picture_url": "https://scontent.fosu2-2.fna.fbcdn.net/v/t39.35426-6/310475095_2315018445332449_3498573612659897357_n.jpg?stp=dst-jpg_s60x60&_nc_cat=104&ccb=1-7&_nc_sid=cf96c8&_nc_ohc=zakVY8IuAqsAX98A-rG&_nc_ht=scontent.fosu2-2.fna&oh=00_AT_pD9FqokuaVpDIelEV0oDCwjKvRkgwZqGXeXfk-NVduQ&oe=634BFB01",
    "page_categories": {
      "1700": "Politician"
    },
    "page_entity_type": "regular_page",
    "page_is_profile_page": false,
    "instagram_actor_name": "Andrej Babiš",
    "instagram_profile_pic_url": "https://scontent.fosu2-2.fna.fbcdn.net/v/t39.35426-6/311407172_1462052414280609_4592995507852299300_n.jpg?_nc_cat=104&ccb=1-7&_nc_sid=cf96c8&_nc_ohc=eRoAWQReBJsAX8oSc2E&_nc_ht=scontent.fosu2-2.fna&oh=00_AT_zb9Pw4CUwHgZ0GVL2Ji2Ax1z-Y6V7fJE8ZkzElcS2jA&oe=634B9975",
    "instagram_url": "",
    "instagram_handle": "",
    "is_reshared": false,
    "version": 3,
    "body": {
      "context": {},
      "markup": {
        "__html": ""
      },
      "callerHash": "88d0be508cd6aa45e308df43cc9802b6"
    },
    "brazil_tax_id": "",
    "branded_content": null,
    "current_page_name": "Andrej Babiš",
    "disclaimer_label": 1,
    "page_like_count": 248539,
    "page_profile_uri": "https://www.facebook.com/AndrejBabis/",
    "page_is_deleted": false,
    "root_reshared_post": null,
    "cta_type": null,
    "additional_info": {
      "treasurer_name": null,
      "director_name": null,
      "point_of_contact": null,
      "committee_id": null,
      "phone_number": "+420602346701",
      "email": "prchal@anobudelip.cz",
      "website": "www.anobudelip.cz",
      "street_address_1": "Babická 2",
      "street_address_2": null,
      "city": "Praha 4",
      "state": null,
      "zipcode": "14000",
      "corporate_purpose": null
    },
    "ec_certificates": null,
    "country_iso_code": "CZ",
    "instagram_branded_content": null
  },
  "spend": "<CZK100",
  "startDate": 1665558000,
  "stateMediaRunLabel": null,
  "publisherPlatform": [
    "facebook",
    "instagram"
  ],
  "menuItems": [],
  "endDateFormatted": "2022-10-12T07:00:00.000Z",
  "startDateFormatted": "2022-10-12T07:00:00.000Z"
}

Integrations and Facebook Page Ads Scraper

Last but not least, Facebook Page Ads Scraper can be connected with almost any cloud service or web app thanks to integrations on the Apify platform. You can integrate with Make, Zapier, Slack, Airbyte, GitHub, Google Sheets, Google Drive, and more. Or you can use webhooks to carry out an action whenever an event occurs, e.g. get a notification whenever Instagram API Scraper successfully finishes a run.

Using Facebook Page Ads Scraper with the Apify API

The Apify API gives you programmatic access to the Apify platform. The API is organized around RESTful HTTP endpoints that enable you to manage, schedule, and run Apify actors. The API also lets you access any datasets, monitor actor performance, fetch results, create and update versions, and more.

To access the API using Node.js, use the apify-client NPM package. To access the API using Python, use the apify-client PyPI package.

Check out the Apify API reference docs for full details or click on the API tab for code examples.

Industries

See how Facebook Page Ads is used in industries around the world