--- title: "Contextuals Targeting" slug: "contextuals-1" updated: 2026-08-21T19:57:48Z published: 2026-08-21T19:57:48Z canonical: "help.yahooinc.com/contextuals-1" --- > ## Documentation Index > Fetch the complete documentation index at: https://help.yahooinc.com/llms.txt > Use this file to discover all available pages before exploring further. # Contextuals Targeting *This article describes resources that enable you to read and define contextual targeting.* ## Overview If you have created contextuals for an advertiser, you can set up targeting to serve or exclude ads based on the contextual. The Yahoo DSP supports `CONTEXTUALS` targeting for lines serving display and video ads. To learn more, refer to [Contextuals](/dsp-api/docs/contextuals). ## Endpoint ```plaintext /traffic/lines/{id}/targeting ``` - A `GET` request enables you to view contextuals targeted by the specified line. - A `POST` request enables you to target contextuals with the specified line. ## Resources ### Targeting The `targeting` resource is the standard Yahoo DSP resource for targeting consumers based on their profiles, behaviors, and ad content. The `targeting` resource is defined by the following `CONTEXTUALS` targeting type-specific fields: | **Parameter** | **Parameter Type** | **Definition** | **Data Type** | **Required** | | --- | --- | --- | --- | --- | | `id` | path | Specifies the line ID. | `integer` | Y | | `contextuals` | body | Specifies contextuals to target or exclude from targeting. To learn more, refer to [Contextuals Payload Object](/dsp-api/docs/contextuals-1#contextuals-payload-object). | `array` | Y | | `contextualsIncluded` | body | A read-only array that identifies contextuals targeted by the line. For detailed field reference, refer to [Contextual](/dsp-api/docs/contextuals). | `array` | N/A | | `contextualsExcluded` | body | A read-only array that identifies contextuals not targeted by the line. For detailed field reference, refer to [Contextual](/dsp-api/docs/contextuals). | `array` | N/A | | `types` | body | Specifies an array of targeting types to update, enable, or disable. `CONTEXTUALS` targeting type must be specified to apply the changes. To learn more, refer to [Targeting Types](/dsp-api/docs/about-targeting). | `array` | Y | > [!NOTE] > Note > > For a complete list of targeting resource fields, refer to [Targeting Object](/dsp-api/docs/about-targeting). ### Contextuals Payload Object | **Field** | **Description** | **Data Type** | | --- | --- | --- | | `added` | [Contextuals to add](/dsp-api/docs/contextuals-1#contextual-item-object) (either targeted or blocked). | `array` | | `clearAll` | Indicates if all existing targeted contextuals should be removed. By default, `false`. - If `true`, remove all targeted Contextuals. This will disable `CONTEXTUALS` targeting. - If `false`, do not remove any targeted Contextuals. | `boolean` | | `removed` | Contextual IDs to be removed from targeting. | `array` | ### Contextual Item Object | Field | Description | Data Type | | --- | --- | --- | | `contextualId` | Specifies the ID number associated with the contextual. | `integer` | | `excluded` | Indicates whether the added contextual is to be excluded or included. - If `true`, exclude from targeting (block). - If `false`, include in targeting (target). | `boolean` | ## Read Targeting Contextuals Get a list of contextuals that are available for targeting. ```plaintext GET /traffic/targeting/contextuals?lineId={lineId}&taxonomyType={taxonomyType}&query={query} ``` All of the accepted parameters are query parameters. ### Parameters | **Parameter** | **Description** | **Data Type** | **Required** | | --- | --- | --- | --- | | `lineId` | Specifies the line ID. | `integer` | Y | | `taxonomyType` | Specifies the taxonomy type. - `COMSCORE_BRAND_SAFETY` - Specifies a comScore Brand Safety contextual. - `COMSCORE_BRAND_SUITABILITY` - Specifies a comScore Brand Suitability contextual. - `COMSCORE_IAB2` - Specifies a comScore IAB2 contextual. - `COMSCORE_PREDICTIVE` - Specifies a comScore Predictive contextual. - `COMSCORE_TV_GENRE` - Specifies a comScore TV Genre contextual. - `DOUBLE_VERIFY` - Specifies a Double Verify Brand Suitability contextual. - `DOUBLE_VERIFY_AUTHENTIC_BRAND_SAFETY` - Specifies a Double Verify Authentic Brand Safety contextual. - `DOUBLE_VERIFY_CUSTOM_CONTEXTUAL` - Specifies a Double Verify Custom contextual. - `IAS_BRAND_SAFETY` - Specifies an IAS Brand Safety contextual. - `IAS_CONTEXT_CONTROL_TARGETING` - Specifies an IAS Context Control (Targeting) contextual. - `IAS_CONTEXTUAL` - Specifies an IAS contextual. - `IAS_KEYWORD_BLACKLIST` - Specifies an IAS Context Control (Avoidance) contextual. - `IAS_QUALITY_SYNC` - Specifies an IAS Quality Sync contextual. - `MOBIAN_CTV_CONTEXTUAL` - Specifies a Mobian CTV contextual. - `PEER39_BRAND_SAFETY` - Specifies a Peer39 Brand Safety contextual. - `PEER39_CONTEXTUAL` - Specifies a Peer39 Content contextual. - `PEER39_CTV_QUALITY_SCORE` - Specifies a Peer39 CTV Quality Score contextual. - `PEER39_CUSTOM` - Specifies Peer39 custom contextual. - `PEER39_GARM_BRAND_SAFETY` - Specifies a Peer39 Garm Brand Safety contextual. - `PEER39_HOTSPEX` - Specifies a Peer39 Hotspex contextual. - `PEER39_MOBILE` - Specifies a Peer39 Mobile contextual. - `PEER39_NEWS_GUARD` - Specifies a Peer39 News Guard contextual. - `PEER39_OTT_CTV` - Specifies a Peer39 OTT CTV contextual. - `PEER39_OTT_CTV_BRAND_SUITABILITY` - Specifies a Peer39 OTT CTV Brand Suitability contextual. - `PEER39_PAGE_LANGUAGE` - Specifies a Peer39 Page Language contextual. - `PEER39_PAGE_LEVEL_INTEREST` - Specifies a Peer39 Page Level Interest contextual. - `PEER39_PAGE_QUALITY` - Specifies a Peer39 Page Quality contextual. - `PEER39_SCOPE3_CLIMATE_SHIELD` - Specifies a Peer39 Scope3 Climate Shield contextual. - `PEER39_SENTIMENT` - Specifies a Peer39 Sentiment contextual. - `PEER39_SOCIAL_PREDICTS` - Specifies a Peer39 Social Predicts contextual. - `PUBLISHER_DECLARED` - Specifies a Publisher Declared contextual. - `YAHOO_CUSTOM` - Specifies a Yahoo custom contextual. - `YAHOO_GROUP_STANDARD` - Specifies a Yahoo standard contextual. | `string` | Y | | `query` | Specifies the search term. Use URL encoding conventions (i.e. a space should be replaced with a `+` or `%20`). | `string` | Y | ### Sample Request URL ```plaintext GET https://dspapi.admanagerplus.yahoo.com/traffic/targeting/contextuals?lineId=365277&taxonomyType=PUBLISHER_DECLARED&query=test ``` ### Sample Response ```json {  "response": [    {      "taxonomyType": "PUBLISHER_DECLARED",      "id": "43188",      "name": "contextual_update_test"    },    {      "taxonomyType": "PUBLISHER_DECLARED",      "id": "41843",      "name": "test-iab"    }  ],  "errors": null,  "timeStamp": "2017-07-27T21:30:07Z" } ``` ## Add/Update Contextuals Targeting Add or update contextual targets for the specified line. ```plaintext POST traffic/lines/{id}/targeting/ ``` ### Parameters The line ID is specified in the path of the URL. All other parameters are specified in the body of the `application/json` payload. ### Sample Request URL ```plaintext POST https://dspapi.admanagerplus.yahoo.com/traffic/lines/365277/targeting/ ``` ### Sample Request Body ```json {  "contextuals": {    "clearAll": false,    "added": [      {         "contextualId": 65733,         "excluded" : false      }    ],    "removed": []  },  "types": [    {      "name": "CONTEXTUALS",      "isTargeted": true    }  ] } ``` ### Sample Response ```json {  "response": {    "types": [      {        "name": "CONTEXTUALS",        "isTargeted": true      }    ],    "contextualsIncluded": [      {        "id": 65733,        "accountId": 306442,        "name": "dv-abs",        "updatedAt": "2019-10-11T23:00:47Z",        "categories": [          {            "id": 184132,            "categoryId": 50571280          },          {            "id": 184131,            "categoryId": 50571278          }        ],        "taxonomyType": "DOUBLE_VERIFY_AUTHENTIC_BRAND_SAFETY"      }    ]  },  "errors": null,  "timeStamp": "2019-10-15T00:54:14.401Z" } ``` ### Additional Resources [About Targeting](/dsp-api/docs/about-targeting) [Contextuals](/dsp-api/docs/contextuals)