For the complete documentation index, see llms.txt. This page is also available as Markdown.

Targeting object

The targeting object is provided as part of the API call when creating line items and creatives. The basic structure of this object is shown below:

{
    "targeting": {
        "deviceTargets": [],
        "adUnitTarget": {},
        "userSegmentTargets": [],
        "dateTarget": {},
        "geospatialTargets": [],
        "keyValueTargets": [],
        "siteTarget": {},
        "adUnitMatchingLabelTargets": [],
        "categoryTargets": [],
        "namedLocationTarget": {},
        "dayPartingTargets": [],
        "retargetingTargets": [],
        "keywordTargets": [],
        "similarKeywordTargets": [],
        "ipAddressTarget": {},
        "siteGroupTarget": {},
        "domainNameTarget": {},
        "viewabilityTarget": {},
        "semanticTargets": [],
        "firstPartyAudienceTarget": {},
        "thirdPartyAudienceTargets": [],
        "publisherTarget": {},
        "articleTarget": {},
        "siteCountryTarget": {},
        "weatherTargets": [],
        "organisationTarget": {}
    }
}

Fields:

Name
Restriction
Description

deviceTargets

Array

adUnitTarget

Object

userSegmentTargets

Array

dateTarget

Object

geospatialTargets

Array

keyValueTargets

Array

siteTarget

Object

adUnitMatchingLabelTargets

Array

categoryTargets

Array

namedLocationTarget

Object

dayPartingTargets

Array

retargetingTargets

Array

keywordTargets

Array

similarKeywordTargets

Array

ipAddressTarget

Object

siteGroupTarget

Object

domainNameTarget

Object

viewabilityTarget

Object

semanticTargets

Array

firstPartyAudienceTarget

Object

thirdPartyAudienceTargets

Array

publisherTarget

Object

articleTarget

Object

siteCountryTarget

Object

weatherTargets

Array

organisationTarget

Object

Device targets

The device targets can be found with it's endpoint /devices.

Name
Data type
Values

targetedBrands

String

UNKNOWN, DESKTOP, APPLE, NOKIA, HTC, SAMSUNG, SONY_ERICSSON, LG, MOTOROLA, RIM, HUAWEI, ZTE, ASUS, PANASONIC, FUJITSU, SHARP, NEC, KYOCERA, ACER

targetedOSes

String

UNKNOWN, WINDOWS_PHONE, WINDOWS, MACINTOSH, IOS, ANDROID, LINUX, SUNOS, BSD, SYMBIAN, BLACKBERRY

targetedDeviceTypes

String

DESKTOP, TABLET, MOBILE

Ad unit targets

The id of the ad units can be found at this endpoint: /adunits.

Segment targets

The id of the segments can be found here at this endpoint: /segments.

When posting targeting data only the id of the adunit is required.

Date targets

All dates must be specified as follows: yyyy-mm-ddThh:mm:ss.

Name
Data type
Values

dateTarget

Object

The date target object.

dateRanges

Array

An array containing the range objects.

first

String

Start of the date range.

second

String

End of the date range.

Geospatial targets

The polygons follow the format of GeoJson.

Key value targets

  • OR values are separated byt objects in the initial array.

  • AND values are separated with keys within entries

  • AND-NOTare speccified with notEntries as listed above.

Site targets

The id of the sites can be found at this endpoint: /sites.

When posting targeting data only the id of the site is required.

Ad unit matching label targets

The ad unit matching labels has to be present on the ad unit for the matching label targeting to work.

For matching labels to work you will need to divide the targeting into separate objects as specified above.

Category targets

  • OR values are separated byt objects in the initial array.

  • AND values are added within the array.

  • AND-NOTare speccified with notEntries as listed above.

Location targets

The id of the location can be found at this endpoint: /location. Municipality ids come from /location/municipalities.

When posting targeting data only the id of the location is required. Both fields accept a bare id as well as an object, so "locations": [1172995] is equivalent to the above.

A municipality is targeted as an indivisible whole: it expands to all of its locations. locations and municipalities share the single negated flag. The municipalities field is omitted from responses when nothing is selected.

Use locations and municipalities when posting. The locationIds and municipalityIds names shown by the interactive API explorer are the internal field names and are ignored on input.

Day parting targets

you can add multiple dayparts by adding multiple objects.

The daypart object is divided in these paramters:

Name
Data type
Values

daysOfWeek

Array

"MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY", "SATURDAY", "SUNDAY"

hoursOfDay

Array

An array containing numbers 0 for 00:00 - 00:59, 1 for 01:00 - 01:59 etc. up to 23 for 23:00 - 23:59.

timeZoneSetting

String

"USER" for user time zone and "SYSTEM" for the system time zone.

Keyword targets

  • OR values are separated byt objects in the initial array.

  • AND values are added within the array.

  • AND-NOTare speccified with notEntries as listed above.

Retargeting targets

  • OR values are separated byt objects in the initial array.

  • AND values are added within the array.

  • AND-NOTare speccified with notEntries as listed above.

IP targets

Contains addresses which is a comma seperated array of IP values. You can add multiple IP addresses by separating each individual one by a comma. For instance, inputting 118.16.78.34, 205.112.45.0/24 will match any of 118.16.78.34 and 205.112.45.0 through to 205.112.45.255. The IP targets follow the CIDR notation.

Site group targets

The id of the sites can be found at this endpoint: /sitegroups.

When posting targeting data only the id of the site is required.

Similar keyword targets

Matches content related to a keyword rather than only the keyword itself. keyword is the numeric id of a keyword. match sets how far the meaning may stray, and is one of VERY_NARROW, NARROW, BROAD or VERY_BROAD.

Domain name targets

Matches the domain the ad request came from.

Viewability targets

Shows the ad only on ad units whose viewability meets a minimum standard. viewability is that minimum, as a percentage from 0 to 100. Leaving it unset, null or zero applies no viewability restriction.

Semantic targets

Matches page content by meaning rather than by exact words. sentence is the numeric id of a target sentence, and score is how close the match must be, from 0 to 1, defaulting to 0.4. Set positiveSentimentOnly to only match content whose sentiment is positive.

Audience targets

firstPartyAudienceTarget matches audiences built from your own data. thirdPartyAudienceTargets matches audiences bought from a data provider, and notThirdPartyAudienceIds excludes them.

Publisher targets

Matches all inventory belonging to a publisher. The id of the earnings account can be found at this endpoint: /earningsaccounts.

Article targets

Matches specific articles by their URL.

Site country targets

Matches inventory by the country of the site, using ISO 3166-1 alpha-2 country codes. This is the country the site belongs to, not the country the reader is in. To target where the reader is, use location targets.

Weather targets

Matches on the weather at a location. type is ABOVE_CELSIUS or BELOW_CELSIUS and value is the temperature in degrees Celsius. location is a named location id, from the /location endpoint; omit it to use the reader's own location.

Organisation targets

Matches the organisation that owns the reader's IP address, which is usually an internet provider or a company network. Names are matched without regard to case. This target has no user interface and is set through the API only.

Examples

A GET request for a targeting object:

Last updated