AdSets
Query information about an Ad Set or the Ad Sets on a specific Campaign or Ad Account. Accessing Ad Set information requires the ads_read permission.
Table Specific Information
AdSets in Facebook represent a collection of Ads in Facebook.
Select
When querying ad sets, either the Id or Target must be used to filter results. The Target may be an ad account, or a campaign. For instance:
SELECT * FROM AdSets WHERE Target = 'act_123456'
Columns
Name | Type | Description |
ID [KEY] | String | The Id of Ad Set. |
Target | String | The Ad Account Id or Campaign Id to get Ad Sets of. |
Name | String | The name of the Ad Set. |
BudgetRemaining | Integer | The amount of budget remaining for this Ad Set. |
CampaignId | String | The Ad Campaign this ad set is a part of. |
AdSetStatus | String | The status of the Ad Set.
The allowed values are ACTIVE, PAUSED, ARCHIVED, DELETED. |
BillingEvent | String | The billing event that this adset is using: APP_INSTALLS: Pay when people install your app. CLICKS: Pay when people click anywhere in the ad. IMPRESSIONS: Pay when the ads are shown to people. LINK_CLICKS: Pay when people click on the link of the ad. OFFER_CLAIMS: Pay when people claim the offer. PAGE_LIKES: Pay when people like your page. POST_ENGAGEMENT: Pay when people engage with your post. VIDEO_VIEWS: Pay when people watch videos. |
CreatedTime | Datetime | When the Ad Set was created. |
DailyBudget | Integer | The daily budget of the set defined in your account currency, it is allowed only for ad sets with a duration longer than 24 hours. |
LifetimeBudget | Decimal | The lifetime budget of the set defined in your account currency. |
EndTime | Datetime | When the Ad Set is scheduled to end. |
StartTime | Datetime | When the Ad Set started. |
UpdatedTime | Datetime | The time the Ad Set was last updated. |
Recommendations | String | If there are recommendations for this ad set, this field includes them. Otherwise, this field will be null. |
TargetingGenders | Integer | Indicates gender-based targeting. 0=all, 1=male, 2=female.
The allowed values are 0, 1, 2. |
TargetingAgeMax | Integer | Maximum age. If used, must be 65 or lower. |
TargetingAgeMin | Integer | Minimum age. If used, must be 13 or higher. If omitted, will default to 18. |
TargetingCountries | String | Values for country targeting. |
TargetingLocationTypes | String | Values for the types of locations to target. |
TargetingRegions | String | The state, province, or region. |
TargetingCities | String | Cities to target with a radius and distance. |
TargetingZips | String | The zip codes used for targeting. |
TargetingCustomLocations | String | Any custom locations to target. |
TargetingGeoMarkets | String | They key for the market. The destination market areas (DMA) and keys are in the format DMA:NUMBER, such as DMA:501. |
TargetingInterests | String | Interests to target based on. |
TargetingBehaviors | String | Behaviors to target based on. |
TargetingDevicePlatforms | String | The device platforms to target. |
TargetingPublisherPlatforms | String | The publisher platforms to target. |
TargetingInstagramPositions | String | The instagram positions to target. |
TargetingPageTypes | String | The types of pages to use when targeting. Values may include desktop, feed, desktopfeed, mobile, rightcolumn, rightcolumn-and-mobile, home, mobilefeed-and-external, desktop-and-mobile-and-external, feed-and-external, rightcolumn-and-mobile-and-external. |
LearningStageInfoStatus | String | Learning Phase progress for the ad set. |