targetingKeywords

Target a campaign on the site section by keywords/phrases.

Request format

https://adfox.yandex.com/api/v1
  ? object=campaign
  & action=targetZone
  & actionObject=targetingKeywords
  & objectID=<integer>
  & zoneID=<integer>
  & isRedefined=<integer>
  & [keywordsLogic=<integer>]
  & [keywords=<string>]
  & [keywordsNotAllowed=<string>]

objectID*

ID of the object that the action is performed on.

zoneID*

Site section ID.

isRedefined*

Redefine targeting.

Acceptable values:

  • 0: Inherit targeting settings from a higher level. Level hierarchy from top to bottom:

    • Campaign.
    • Campaign on the site.
    • Campaign in the site section.
    • Campaign on the placement.
    • Banner.
  • 1: Cancel targeting settings at higher levels and use the settings of the current level.

keywordsLogic

Targeting method.

Acceptable values:

  • 0: by keywords.
  • 1: by phrases.

Default value: 0.

keywords

Specify keywords or phrase for targeting the object.

You can't target by both phrases and specific keywords at the same time.

Entry format:

  • Use a comma to separate phrases.
  • Use a space or comma to separate keywords.

An entry can contain Russian and Latin letters, numbers, and any special characters.

keywordsNotAllowed

A keyword or words that can't be used in the banner request for serving the banner.

Entry format:

  • Use a comma to separate phrases.
  • Use a space or comma to separate keywords.

An entry can contain Russian and Latin letters, numbers, and any special characters

* Required

Response format

<response>
<status>
  <code>{integer}</code>
</status>
</response>

Response parameters

code

Request processing status. For the key, see Error handling.

Sample request and response

Request:

https://adfox.yandex.com/api/v1?object=campaign&action=targetZone&actionObject=targetingKeywords&objectID=474205&zoneID=321&isRedefined=1

Response:

<response>
<status>
  <code>0</code>
</status>
</response>

Other actions with the object

See more actions with the campaign object: