This section describes the columns in the Ad Targeting, Ad Targeting delta, and Ad Library data tables, and provides some related clarifications.
In this table, the Type (data type) can be:
String: Sequence of characters, representing either a constant or a variable.
Boolean: One of two possible values (usually denoted true and false).
BigInt: Integer (numerical) value.
List: Series of values. Angle brackets indicate the data type of the values in the list.
Map: Series of key/value pairs. Angle brackets indicate the data type of the key and the data type of the value, separated by a comma.
Column name | Type | Description | Sample value |
---|---|---|---|
| string | Age group targeted by the ad. |
|
| BigInt | Ad dataset ID. |
|
| string | Table partition date stamp. |
|
| map<string, string> | Ad excludes people who are categorized by ANY of the items listed, which can include behavior, field of study, education level, school, job title, and many more. |
|
This column is new in the May 2022 dataset. See Columns for Indicating Missing Data for more information. | Boolean | Indicates whether information is missing from the exclude_custom_audience, exclude_data_file_custom_audience, or exclude_lookalike column. |
|
| Boolean | Ad excludes ( |
|
| Boolean | Ad excludes (`True`) or does not exclude (`False`) a custom audience created by the advertiser. |
|
| Boolean | Ad excludes (`True`) or does not exclude (`False`) people in a custom audience created by the advertiser from a customer list. |
|
| map<string, map<string, mixed>> | Locations (cities, countries, zip codes) excluded by the ad, plus an optional radius in miles. See Location data for additional information. |
|
| Boolean | Ad excludes (`True`) or does not exclude (`False`) a lookalike audience created by the advertiser. |
|
| string | Gender targeted by the ad. |
|
| list<map<string, string>> | Ad targets people who are categorized by ANY of the items listed, with at least one item in each group. Items can include behavior, field of study, education level, school, job title, and many more. | The following example shows two groups, each enclosed in curly braces. Ad targets people with at least one item in each group. [ { "College grad": "Education level" }, { "Wine": "Interests", "Golf": "Interests", "Organic food": "Interests", "Skiing": "Interests", "Security (finance)": "Interests", "Frequent Travelers": "Behaviors", "Sustainable development": "Interests", "Business and industry": "Interests", "Natural environment": "Interests", "Sailing": "Interests", "Running": "Interests", "SVT Play": "Interests", "Politics": "Interests" } ] |
This column is new in the May 2022 dataset. See Columns for indicating missing data for more information. | Boolean | Indicates whether information is missing from the include_custom_audience, include_data_file_custom_audience, or include_lookalike column. |
|
| Boolean | Ad targets ( |
|
| Boolean | Ad targets (`True`) or does not target (`False`) a custom audience created by the advertiser. |
|
| Boolean | Ad targets (`True`) or does not target (`False`) people in a custom audience created by the advertiser from a customer list. |
|
| Boolean | Ad targets ( |
|
| map<string, map<string, mixed>> | Locations targeted by the ad. Radius in miles included if specified by the advertiser. Can be cities, countries, or zip codes, plus an optional radius in miles. See Location data for additional information. |
|
| Boolean | Ad targets (`True`) or does not target (`False`) a lookalike audience created by the advertiser. |
|
This column is new in the May 2022 dataset. | string | Languages targeted by the ad. |
|
| string | Ad targets people by their relationship to a location. The location is the area selected by the advertiser upon ad creation and is identified by the Possible values:
See Location data for additional information. |
|
The delta table lists ads that were reclassified as non-political (and therefore, removed from the table) since the last table publication. It is a single table to which we add data month to month.
Column name | Type | Description | Sample value |
---|---|---|---|
| BigInt | Ad dataset archive ID that was reclassified and removed. |
|
| string | Type of change being reported. |
|
| string | Name of column affected by the change. Can also be empty. |
|
| string | Value after the change. Can also be empty. |
|
| string | Date the ad no longer appeared in the dataset. |
|
| string | Value before the change. Can also be empty. |
|
As of November 1, 2021, we started tracking information about custom audiences that were deleted sometime after the ads were initially run. For data prior to that date, the Ad Targeting dataset might be missing information about whether custom audiences, datafile custom audiences, or lookalike audiences were used or not. By "missing information", we mean that one of the affected columns could read False when it should actually be True. If it already reads True, we know for sure that it is True.
We have added two columns to the table schema where we indicate whether data is missing. The following table lists the two new columns, indicates the columns of data to which they pertain, and provides the meaning of the possible values:
include_audience_data_missing column | exclude_audience_data_missing column | |
---|---|---|
Columns tracked |
|
|
Value of True means... | Information is missing. At least one of the columns above could read False when it should actually be True. | Information is missing. At least one of the columns above could read False when it should actually be True. |
Value of False means... | No data is missing. | No data is missing. |
Throughout the Ad Targeting dataset, we provide the location targeting chosen by an advertiser for the ad. Advertisers can input location targeting in a number of ways, for example by selecting zip codes, countries, Designated Market Areas (DMAs), pin drops (longitude and latitude), addresses, and places within a specified radius. To prevent inadvertently sharing granular location of people on Facebook, we've provided the location options chosen by advertisers when these levels have been set to zip code level or greater. For smaller geographic designations, we note the type of selection (such as an address, place, or location pin drop), the city it falls in, and the radius specified by the advertiser.
The following examples help illustrate the transformations. The left column shows the targeting selection by the advertiser; the right column shows the transformation found in the data set. You will see that addresses, pin drops, and places are redacted and replaced by the text "<address>", "<location>", and "<place>", respectively.
Advertiser selection | Transformed dataset value |
---|---|
Seattle + 5 miles |
|
38 North Almaden blvd, San Jose +5 miles |
|
95110, San Jose |
|
95110, San Jose +5 miles |
|
37.335080; -121.895480 + 5 miles |
|
Acme park, San Jose (+1 mile) |
|
Whenever we cannot report a specific location, we replace it with "Unknown Country"
, <unknown location>
, or <unknown place>
as in this example: {"Unknown Country":{"":{"":["<unknown place> (+5 km)"]}}}
. This can happen for a number of reasons. A country, for example, could be unknown because the location is too close to a border to classify accurately, or because borders have changed. A place (such as a church or a school), could become unknown because the Facebook page from which the place's location was extracted was deleted.
An ad's archive_id
in the Ad Targeting dataset maps to the ad's ID in the Ad Library product, where researchers can access the ad creative, the Page associated with the ad, who paid for the ad ("Paid for by" disclaimer), a range of how much they spent, and the reach of the ad across multiple demographics.
If an advertiser makes changes to an ad after it has been created, (such as editing the creative, targeting logic, or spend limits), then our system stores the updated version of the ad as a new distinct ID.
This means that distinct archive_id
values in the dataset could relate to a similar creative, such as if the only modification was to change the targeting of the ad.
The Ad Targeting dataset (refreshed monthly) contains data about targeting selections for each ad, specified by `archive_id`. We also provide the Ad Library data table that contains information about ad delivery, such as what pages ran the ad, when it was created, how many users it reached, and so on. This table is refreshed daily.
To get a complete picture of the advertisement and its content, including both its targeting and its delivery, you need information from both tables. See Joining Ad Targeting dataset data with Ad Library data.
Column | Type | Description |
---|---|---|
| string | ID for the archived ad object. |
| string | Same as |
| string | The UTC date and time when someone created the ad. This is not the same time as when the ad ran. Includes date and time separated by T. Example: 2019-01-24T19:02:04+0000, where +0000 is the UTC offset. |
| list< string> | A list of the text that displays in each unique ad card of the ad. Some ads run with multiple ad versions or carousel cards, each with its own unique text. See Ad Creative for more information. |
| list< string> | A list of the captions that appear in the call to action section for each unique ad card of the ad. Some ads run with multiple ad versions or carousel cards, each with its own unique text that appears in the link. |
| list< string> | A list of text descriptions that appear in the call to action section for each unique ad card of the ad. Some ads run with multiple ad versions or carousel cards, each with its own unique text describing the link. |
| list< string> | A list of titles that appear in the call to action section for each unique ad card of the ad. Some ads run with multiple ad versions or carousel cards, each with its own unique title text about the link. |
| string | Date and time when an advertiser wants Facebook to start delivering an ad. Provided in UTC as in |
| string | The time when an advertiser wants to stop delivery of their ad. If this is blank, Facebook runs the ad until the advertiser stops it or they spend their entire campaign budget. Provided in UTC. |
| string | String with URL link that displays the archived ad. This displays uncompressed images and videos from the ad. Note that you cannot currently download a batch of archived ads, however you can download ad creative such as images and text for an individual ad. If you do so, it must be for analysis and you must comply with the data storage terms in Facebook Terms of Service. |
| string | A string containing the name of the person, company, or entity that provided funding for the ad. Provided by the purchaser of the ad. |
| string | The currency used to pay for the ad, as an ISO currency code. |
| Regional distribution of people reached by the ad. Provided as a percentage and where regions are at a sub-country level. | |
| The demographic distribution of people reached by the ad. Provided as age ranges and gender.
| |
| Estimated Audience Size generally estimates how many people meet the targeting and ad placement criteria that advertisers select while creating an ad. Learn more. | |
| A string containing the number of times the ad created an impression. In ranges of:< 1000, 1K-5K, 5K-10K, 10K-50K, 50K-100K, 100K-200K, 200K-500K, >1M. | |
| list< string> | The list of languages contained within the ad. These are displayed in ISO 639-1 language codes. |
| numeric string | ID of the Facebook Page that ran the ad. |
| string | Name of the Facebook Page that ran the ad. |
| list< enum> | A list of platforms where the archived ad appeared, such as Facebook or Instagram. |
| A string showing amount of money spent running the ad as specified in currency. This is reported in ranges; <100, 100-499, 500-999, 1K-5K, 5K-10K, 10K- 50K, 50K-100K, 100K-200K, 200K-500K, >1M. | |
| boolean | Whether the ad is currently actively running on any platform. |
| list< string> | List of countries (as ISO country codes) that ran the ad. |
| list< string> | A list of media types contained within the ad. |
| string | Table partition date stamp. |
If you want more information about an ad (its creative, spend, and so on) and want to map the ad with its targeting information, perform a join between the archive_id
column of the ad_targeting_dataset_siep_aug_2020
table (the Ad Targeting dataset) and the fbid
column of the ad_archive_api
table (the Ad Library dataset) as shown in this example:
data_joined = execute("SELECT * FROM fbri_prod_atp.ad_archive_api AS a, fbri_prod_atp.ad_targeting_dataset_siep_aug_2020 AS b WHERE a.ds = b.ds AND a.fbid = b.archive_id")
Column name change notice
The name of the fbid
column of the ad_archive_api
table was ad_archive_id
prior to April 21, 2021. If you want to join on data before that date, use the ad_archive_id
column name.
If you perform a join between the two tables, you will see that there are ads in the Ad Targeting dataset table that do not have a corresponding entry in the Ad Library data table (or vice versa). This happens because ads initially classified as political can be reclassified as non-political after they have been run.
When a reclassification occurs, the Ad Library data table reflects the change before the Ad Targeting dataset because the Ad Library data table is updated daily and the Ad Targeting dataset is updated monthly.
Beginning with the second monthly update, there is an Ad Targeting dataset delta table that describes ads that were reclassified as non-political (and therefore, removed from the dataset) since the previous monthly update.