The AdSense Management API allows publishers to access their inventory and run earnings and performance reports.
- REST Resource: v2.accounts
- REST Resource: v2.accounts.adclients
- REST Resource: v2.accounts.adclients.adunits
- REST Resource: v2.accounts.adclients.customchannels
- REST Resource: v2.accounts.adclients.urlchannels
- REST Resource: v2.accounts.alerts
- REST Resource: v2.accounts.payments
- REST Resource: v2.accounts.policyIssues
- REST Resource: v2.accounts.reports
- REST Resource: v2.accounts.reports.saved
- REST Resource: v2.accounts.sites
Service: adsense.googleapis.com
To call this service, we recommend that you use the Google-provided client libraries. If your application needs to use your own libraries to call this service, use the following information when you make the API requests.
Discovery document
A Discovery Document is a machine-readable specification for describing and consuming REST APIs. It is used to build client libraries, IDE plugins, and other tools that interact with Google APIs. One service may provide multiple discovery documents. This service provides the following discovery document:
Service endpoint
A service endpoint is a base URL that specifies the network address of an API service. One service might have multiple service endpoints. This service has the following service endpoint and all URIs below are relative to this service endpoint:
- https://adsense.googleapis.com
REST Resource: v2.accounts
| Methods | |
|---|---|
| get | GET /v2/{name=accounts/*}Gets information about the selected AdSense account. | 
| getAdBlockingRecoveryTag | GET /v2/{name=accounts/*}/adBlockingRecoveryTagGets the ad blocking recovery tag of an account. | 
| list | GET /v2/accountsLists all accounts available to this user. | 
| listChildAccounts | GET /v2/{parent=accounts/*}:listChildAccountsLists all accounts directly managed by the given AdSense account. | 
REST Resource: v2.accounts.adclients
| Methods | |
|---|---|
| get | GET /v2/{name=accounts/*/adclients/*}Gets the ad client from the given resource name. | 
| getAdcode | GET /v2/{name=accounts/*/adclients/*}/adcodeGets the AdSense code for a given ad client. | 
| list | GET /v2/{parent=accounts/*}/adclientsLists all the ad clients available in an account. | 
REST Resource: v2.accounts.adclients.adunits
| Methods | |
|---|---|
| create | POST /v2/{parent=accounts/*/adclients/*}/adunitsCreates an ad unit. | 
| get | GET /v2/{name=accounts/*/adclients/*/adunits/*}Gets an ad unit from a specified account and ad client. | 
| getAdcode | GET /v2/{name=accounts/*/adclients/*/adunits/*}/adcodeGets the ad unit code for a given ad unit. | 
| list | GET /v2/{parent=accounts/*/adclients/*}/adunitsLists all ad units under a specified account and ad client. | 
| listLinkedCustomChannels | GET /v2/{parent=accounts/*/adclients/*/adunits/*}:listLinkedCustomChannelsLists all the custom channels available for an ad unit. | 
| patch | PATCH /v2/{adUnit.name=accounts/*/adclients/*/adunits/*}Updates an ad unit. | 
REST Resource: v2.accounts.adclients.customchannels
| Methods | |
|---|---|
| create | POST /v2/{parent=accounts/*/adclients/*}/customchannelsCreates a custom channel. | 
| delete | DELETE /v2/{name=accounts/*/adclients/*/customchannels/*}Deletes a custom channel. | 
| get | GET /v2/{name=accounts/*/adclients/*/customchannels/*}Gets information about the selected custom channel. | 
| list | GET /v2/{parent=accounts/*/adclients/*}/customchannelsLists all the custom channels available in an ad client. | 
| listLinkedAdUnits | GET /v2/{parent=accounts/*/adclients/*/customchannels/*}:listLinkedAdUnitsLists all the ad units available for a custom channel. | 
| patch | PATCH /v2/{customChannel.name=accounts/*/adclients/*/customchannels/*}Updates a custom channel. | 
REST Resource: v2.accounts.adclients.urlchannels
| Methods | |
|---|---|
| get | GET /v2/{name=accounts/*/adclients/*/urlchannels/*}Gets information about the selected url channel. | 
| list | GET /v2/{parent=accounts/*/adclients/*}/urlchannelsLists active url channels. | 
REST Resource: v2.accounts.alerts
| Methods | |
|---|---|
| list | GET /v2/{parent=accounts/*}/alertsLists all the alerts available in an account. | 
REST Resource: v2.accounts.payments
| Methods | |
|---|---|
| list | GET /v2/{parent=accounts/*}/paymentsLists all the payments available for an account. | 
REST Resource: v2.accounts.policyIssues
| Methods | |
|---|---|
| get | GET /v2/{name=accounts/*/policyIssues/*}Gets information about the selected policy issue. | 
| list | GET /v2/{parent=accounts/*}/policyIssuesLists all the policy issues where the specified account is involved, both directly and through any AFP child accounts. | 
REST Resource: v2.accounts.reports
| Methods | |
|---|---|
| generate | GET /v2/{account=accounts/*}/reports:generateGenerates an ad hoc report. | 
| generateCsv | GET /v2/{account=accounts/*}/reports:generateCsvGenerates a csv formatted ad hoc report. | 
| getSaved | GET /v2/{name=accounts/*/reports/*}/savedGets the saved report from the given resource name. | 
REST Resource: v2.accounts.reports.saved
| Methods | |
|---|---|
| generate | GET /v2/{name=accounts/*/reports/*}/saved:generateGenerates a saved report. | 
| generateCsv | GET /v2/{name=accounts/*/reports/*}/saved:generateCsvGenerates a csv formatted saved report. | 
| list | GET /v2/{parent=accounts/*}/reports/savedLists saved reports. | 
REST Resource: v2.accounts.sites
| Methods | |
|---|---|
| get | GET /v2/{name=accounts/*/sites/*}Gets information about the selected site. | 
| list | GET /v2/{parent=accounts/*}/sitesLists all the sites available in an account. |