Facebook Developers
DocsToolsSupportNewsApps
Log In
  • Social Plugins
  • Facebook Login
  • Open Graph
  • Facebook APIs
    • Graph API
    • FQL
    • Open Graph
    • Dialogs
    • Chat
    • Internationalization
    • Ads
  • Games
  • Media
  • Payments
  • App Center
  • Promote Your App
  • iOS
  • Android
  • Web
  • Technology Partners
  • Best Practices
    • Batch Requests
    • Using ETags
  • Reference
    • Conversion pixels
    • Cost Per Action (CPA) Ads
    • Currencies
    • Homepage Ads via API
    • Introduction to Action Spec
    • Introduction to Sponsored Stories
    • Mobile App Install Ads
    • Optimized CPM
    • Real Time Bidded Exchange protocol
    • Sponsored Results
    • Thrift file for Real Time Bidded Exchange protocol
  • Specs
    • Action Specs
    • Conversion Specs
    • Creative Specs
    • Targeting Specs
    • Tracking Specs
  • Advanced Targeting
    • Action Spec Targeting
    • Custom Audience targeting
    • Partner Categories
    • Topic Targeting
    • ZIP Code Targeting
  • Queries
    • Action Estimate
    • Action Spec Ad Previews
    • Ad Statistics
    • Autocomplete Data
    • Broad Target Categories
    • Connection Objects
    • Conversion Stats
    • Keyword Stats
    • Reach estimate
    • Targeting Description
  • Objects
    • Ad account
    • Ad account group
    • Ad campaign
    • Ad creative
    • Ad group
    • Ad image
    • Ad user

Targeting Description

Facebook APIs › Ads › Targeting Description

Targeting Description

Object representing the human-readable description of a set of targeting specs

The values returned in a targeting description are

Name Description Permissions Returns
targetingsentencelines The human-readable description of the targeting ads_management array of string
id The ID of the targetingsentencelines. Returned only querying an existing adgroup ads_management string
params The targeting spec used to generate the description. This is returned only when querying an arbitrary targeting spec. This will represent the targeting parameters described in the targetingsentencelines response. ads_management targeting-spec
  • Note: The params value may differ from what you provided when making your request if the provided values were autocorrected. For example, if you specify {'age_min':10} in your request, params will show {'age_min':13} which is the minimum supported.

Existing Ad Groups

The adgroup object has a targetingsentencelines connection of this type which returns the description of the targeting for that adgroup.

Example

When requesting the targetingsentencelines connection of an existing adgroup the request format is:

/1234567890/targetingsentencelines

And a sample response is:

 {
 "id": "1234567890/targetingsentencelines", 
   "targetingsentencelines": [
     "who live in Ireland", 
     "exactly between the ages of 20 and 35 inclusive", 
     "who are female", 
     "who are not already connected to [PAGE NAME]"
   ]
 }

Arbitrary targeting specs

The adaccount object has a targetingsentencelines connection of this type which returns the description of the targeting for an arbitrary targeting spec on that account, which must be supplied in the targeting_spec parameter, and formatted following the instructions in the targeting specs documentation.

Example

Checking the targeting description for users in the US who are in a relationship, engaged, or married

 curl "https://graph.facebook.com/act_368811234/targetingsentencelines?targeting_spec=%7B'countries'%3A%5B'US'%5D%2C'relationship_statuses'%3A%5B2%2C3%2C4%5D%7D&access_token=____"

The response format is:

 {
   "params": {
     "countries": [
       "US"
     ], 
     "relationship_statuses": [
       2, 
       3, 
       4
     ]
   }, 
   "targetingsentencelines": [
     "who live in the United States", 
     "who are in a relationship, married or engaged"
   ]
 }
Updated over a year ago
Facebook © 2013 · English (US)
AboutAdvertisingCareersPlatform PoliciesPrivacy Policy