Demographic Targeting

This article describes resources that enable you to read and define demographic targeting.

Overview

Reach your desired audience with age and gender targeting.

The Yahoo DSP supports DEMOGRAPHIC targeting for lines serving display, video, and native ads.

Endpoint

/traffic/lines/{id}/targeting
  • A GET request enables you to view demographics targeted by the specified line.

  • A POST request enables you to target demographics with the specified line.

Resources

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 DEMOGRAPHIC targeting type-specific fields:

Parameter

Parameter Type

Description

Data Type

Required

id

path

Specifies the line ID.

integer

Y

genders

body

Specifies the genders targeted.

  • MALE

  • FEMALE

  • UNKNOWN

  • ALL

array

Y

ages

body

Specifies the age ranges targeted.

  • 18-20

  • 21-24

  • 25-34

  • 35-44

  • 45-49

  • 50-54

  • 55-64

  • 65-999

  • UNKNOWN

  • ALL

array

Y

types

body

Specifies an array of targeting types to target. To target consumers by age or gender, DEMOGRAPHIC targeting type must be specified.

To learn more, refer to Targeting Types.

array

Y

Note

For a complete list of targeting resource fields, refer to Targeting Object.

Add/Update Demographic Targeting

Add or update age and gender demographic targeting controls to specified line.

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.

Example Request URL

POST https://dspapi.admanagerplus.yahoo.com/traffic/lines/365277/targeting/

Example Request Body

{
  "id": 365277,
  "genders": [
    "ALL"
  ],
  "ages": [
    "21-24",
    "65-999",
    "UNKNOWN"
  ],
  "types": [
    {
      "name": "DEMOGRAPHIC",
      "isTargeted": true
    }
  ]
}

Example Response

{
  "response": {
    "types": [
      {
        "name": "DEMOGRAPHIC",
        "isTargeted": true
      }
    ],
    "genders": [
      "ALL"
    ],
    "ages": [
      "21-24",
      "65-999",
      "UNKNOWN"
    ]
  },
  "errors": null,
  "timeStamp": "2019-10-07T17:23:30.666Z"
}

Additional Resources

About Targeting