v1.4 of the AdSense Management API is now deprecated. This version will stop returning data on October 12, 2021. Please migrate to v2 as soon as possible.

REST Resource: adunits

Resource: AdUnit

JSON representation
{
  "id": string,
  "code": string,
  "name": string,
  "status": string,
  "customStyle": {
    object (AdStyle)
  },
  "savedStyleId": string,
  "kind": string,
  "contentAdsSettings": {
    object (ContentAdsSettings)
  },
  "mobileContentAdsSettings": {
    object (MobileContentAdsSettings)
  },
  "feedAdsSettings": {
    object (FeedAdsSettings)
  }
}
Fields
id

string

Unique identifier of this ad unit. This should be considered an opaque identifier; it is not safe to rely on it being in any particular format.

code

string

Identity code of this ad unit, not necessarily unique across ad clients.

name

string

Name of this ad unit.

status

string

Status of this ad unit. Possible values are:

NEW: Indicates that the ad unit was created within the last seven days and does not yet have any activity associated with it.

ACTIVE: Indicates that there has been activity on this ad unit in the last seven days.

INACTIVE: Indicates that there has been no activity on this ad unit in the last seven days.

customStyle

object (AdStyle)

Custom style information specific to this ad unit.

savedStyleId

string

ID of the saved ad style which holds this ad unit's style information.

kind

string

Kind of resource this is, in this case adsense#adUnit.

contentAdsSettings

object (ContentAdsSettings)

Settings specific to content ads (AFC) and highend mobile content ads (AFMC - deprecated).

mobileContentAdsSettings

object (MobileContentAdsSettings)

Settings specific to WAP mobile content ads (AFMC) - deprecated.

feedAdsSettings

object (FeedAdsSettings)

Settings specific to feed ads (AFF) - deprecated.

Methods

get

Gets the specified ad unit in the specified ad client.

getAdCode

Get ad code for the specified ad unit.

list

List all ad units in the specified ad client for this AdSense account.