Collecting data from Facebook Ad Library

This guide explains how to collect data from Facebook Ad Library. To learn how to collect data from a different data source, go back to the Available data sources in Adverity overview.

  • Facebook Ad Library can collect a maximum of 1 million rows per single report. To fetch more data than this, split your fetch into smaller date ranges in the Initial Fetch step of creating a datastream.

Prerequisites

Before you start collecting data from Facebook Ad Library, perform all of the following actions:

  1. Create an app as described in the Meta for Developers documentation.

  2. Assign one of the application roles to your Facebook account.

  3. In the Facebook Ad Library user interface, add domains to the app and Client OAuth settings. When adding app domains, use adverity.com and datatap.io.

  4. In the Facebook Ad Library user interface, add the following URL to Valid OAuth Redirect URLs:

    https://oap.datatap.io/oauth2/callback

    Do not disable Strict Mode in the Facebook Ad Library user interface.

Additionally, to collect data from Facebook Ad Library, confirm your identity and location by following these steps:

  1. Go to facebook.com/id.

  2. Click the Start Identity Confirmation drop-down menu and follow the process. For more information, see the Facebook documentation.

  3. Wait 48 hours for confirmation. When your identity is confirmed, fetch data from the Facebook Ad Library with Adverity.

Creating a datastream to collect data from Facebook Ad Library

The basics of creating a datastream to collect data from any data source are explained in our guide to Creating a datastream. This guide contains information about the specific steps to create a datastream to fetch data from Facebook Ad Library.

Authorization: Allow Adverity to access Facebook Ad Library

To set up a new authorization to fetch data from Facebook Ad Library, follow these steps:

  1. In the Authorization step of the datastream wizard, click Access Facebook Ad Library using your credentials.

  2. Click Next.

  1. In Client ID and Client secret, enter the corresponding information. You can find this information in the Facebook app.

Configuration: Choose the data you want to collect from Facebook Ad Library

To choose what data to collect and customize the Facebook Ad Library datastream configuration, follow these steps:

  1. (Optional) Rename your datastream.

  1. In Ad type, select the ad type for which to collect data. The configuration options below may change depending on the selected ad type.

  2. In Ad statuses, select the ad statuses for which to collect data.

  3. In Reached countries, select the countries which the ad has reached to collect data on such ads.

  1. In Publisher platforms, select the publisher platforms for which to collect data. If you do not select any items in a drop-down list, Adverity collects data for all items in the drop-down list.

  1. In Search terms, enter the terms to search for, separated by spaces. You can enter up to 100 character in this field.

  1. In Fields, change the list of fields that you want to see in your data extract.

  1. In Minimum estimated audience size, select the minimum estimated audience size for the ads for which you want to collect data.

  2. In Maximum estimated audience size, select the maximum estimated audience size for the ads for which you want to collect data.

  3. In Page IDs, enter the page IDs, separated by commas. You can enter up to ten IDs.

What's next?