Ads
Query information about an Ad or the Ads in a specific Ad Set, Campaign, or Ad Account. Accessing Ad Information requires the ads_read permission.
Table Specific Information
Ads in Facebook represent individual ads that have been created.
Select
When querying ad accounts, either the Id or Target must be used to filter results. For instance:
SELECT * FROM Ads WHERE Target = 'act_123456'
Additionally, UpdatedTime may be used with the > or >= operators to retrieve only records newer than a certain date. For instance:
SELECT * FROM Ads WHERE Target = 'act_123456' AND UpdatedTime > '01/01/2016'
Columns
| Name | Type | Description |
| ID [KEY] | String | The Id of Ad. |
| Target | String | The Ad Account Id, Campaign Id, or Ad Set Id to get Ads in. |
| Name | String | The name of the Ad. |
| AdStatus | String | The status of the Ad.
The allowed values are ACTIVE, PAUSED, CAMPAIGN_PAUSED, CAMPAIGN_GROUP_PAUSED, CREDIT_CARD_NEEDED, DISABLED, DISAPPROVED, PENDING_REVIEW, PREAPPROVED, PENDING_BILLING_INFO, ARCHIVED, DELETED. |
| BidInfo | String | The value of the bid info taken from the Ad Set. |
| BidType | String | The bid type value taken from the Ad Set.
The allowed values are CPM, CPC, MULTI_PREMIUM, ABSOLUTE_OCPM, CPA. |
| CampaignId | String | The Id of the Campaign the Ad belongs to. |
| AdSetId | String | The Id of the Ad Set the Ad belongs to. |
| AdCreativeId | String | The Id of the Ad Creative associated with the Ad. |
| ConfiguredStatus | String | The configured status of the ad. Prefer using 'status' instead of this.
The allowed values are ACTIVE, PAUSED, DELETED, ARCHIVED. |
| CreatedTime | Datetime | The time when the Ad was created. |
| UpdatedTime | Datetime | When the Ad was last updated. |
| ConversionSpecs | String | The Ad's conversion specs. |
| FailedDeliveryChecks | String | Possible checks that could have failed which will prevent the Ad from showing up. |
| Recommendations | String | If there are recommendations for this ad, this field includes them. Otherwise, this field will be null. |
| TrackingSpecs | String | The Ad's tracking specification. This field will be defaulted based on the objective, if not set to NONE, or based on the ad creative. |
| AdActiveTime | String | The time from when the ad was recently active. |
| AdScheduleEndTime | Datetime | An optional parameter that defines the end time of an individual ad. If no end time is defined, the ad will run on the campaign’s schedule. |
| AdScheduleStartTime | Datetime | An optional parameter that defines the start time of an individual ad. If no start time is defined, the ad will run on the campaign’s schedule. |
| BidAmount | Integer | Bid amount for this ad which will be used in auction. |
| LastUpdatedByAppId | String | Indicates the app used for the most recent update of the ad. |
| PreviewShareableLink | String | A link that enables users to preview ads in different placements. |
| SourceAdId | String | The source ad id that this ad is copied from. |
Pseudo-Columns
Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source. For more information, see the WHERE clause section.
| Name | Type | Description |
| DateStart | Date | The starting date to retrieve ads. |
| DateEnd | Date | The ending date to retrieve ads. |
| DatePreset | String | An alternative to specifying the DateStart and DateEnd. A date range will automatically be calculated based on the specified preset value.
The allowed values are maximum, today, yesterday, this_week_sun_today, this_week_mon_today, last_week_sun_sat, last_week_mon_sun, last_3d, last_7d, last_14d, last_28d, last_30d, last_90d, this_month, last_month. |