Google

AdSense Host API

Generates performance reports, generates ad codes, and provides publisher management capabilities for AdSense Hosts.

E-commerce#openapi#analytics#media

Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.

Overview

Generates performance reports, generates ad codes, and provides publisher management capabilities for AdSense Hosts.

Endpoints 26

accounts

  • GETadsensehost.accounts.list/accounts?alt=csv&fields=string&key=string&oauth_token=string&prettyPrint=true&quotaUser=string&userIp=string&filterAdClientId=stringList hosted accounts associated with this AdSense account by ad client id.
  • GETadsensehost.accounts.get/accounts/:accountId?alt=csv&fields=string&key=string&oauth_token=string&prettyPrint=true&quotaUser=string&userIp=stringGet information about the selected associated AdSense account.
  • GETadsensehost.accounts.adclients.list/accounts/:accountId/adclients?alt=csv&fields=string&key=string&oauth_token=string&prettyPrint=true&quotaUser=string&userIp=string&maxResults=0&pageToken=stringList all hosted ad clients in the specified hosted account.
  • GETadsensehost.accounts.adclients.get/accounts/:accountId/adclients/:adClientId?alt=csv&fields=string&key=string&oauth_token=string&prettyPrint=true&quotaUser=string&userIp=stringGet information about one of the ad clients in the specified publisher's AdSense account.
  • GETadsensehost.accounts.adunits.list/accounts/:accountId/adclients/:adClientId/adunits?alt=csv&fields=string&key=string&oauth_token=string&prettyPrint=true&quotaUser=string&userIp=string&includeInactive=true&maxResults=0&pageToken=stringList all ad units in the specified publisher's AdSense account.
  • PUTadsensehost.accounts.adunits.update/accounts/:accountId/adclients/:adClientId/adunits?alt=csv&fields=string&key=string&oauth_token=string&prettyPrint=true&quotaUser=string&userIp=stringUpdate the supplied ad unit in the specified publisher AdSense account.
  • POSTadsensehost.accounts.adunits.insert/accounts/:accountId/adclients/:adClientId/adunits?alt=csv&fields=string&key=string&oauth_token=string&prettyPrint=true&quotaUser=string&userIp=stringInsert the supplied ad unit into the specified publisher AdSense account.
  • PATCHadsensehost.accounts.adunits.patch/accounts/:accountId/adclients/:adClientId/adunits?alt=csv&fields=string&key=string&oauth_token=string&prettyPrint=true&quotaUser=string&userIp=string&adUnitId=stringUpdate the supplied ad unit in the specified publisher AdSense account. This method supports patch semantics.
  • GETadsensehost.accounts.adunits.get/accounts/:accountId/adclients/:adClientId/adunits/:adUnitId?alt=csv&fields=string&key=string&oauth_token=string&prettyPrint=true&quotaUser=string&userIp=stringGet the specified host ad unit in this AdSense account.
  • DELETEadsensehost.accounts.adunits.delete/accounts/:accountId/adclients/:adClientId/adunits/:adUnitId?alt=csv&fields=string&key=string&oauth_token=string&prettyPrint=true&quotaUser=string&userIp=stringDelete the specified ad unit from the specified publisher AdSense account.
  • GETadsensehost.accounts.adunits.getAdCode/accounts/:accountId/adclients/:adClientId/adunits/:adUnitId/adcode?alt=csv&fields=string&key=string&oauth_token=string&prettyPrint=true&quotaUser=string&userIp=string&hostCustomChannelId=stringGet ad code for the specified ad unit, attaching the specified host custom channels.
  • GETadsensehost.accounts.reports.generate/accounts/:accountId/reports?alt=csv&fields=string&key=string&oauth_token=string&prettyPrint=true&quotaUser=string&userIp=string&startDate=string&endDate=string&dimension=string&filter=string&locale=string&maxResults=0&metric=string&sort=string&startIndex=0Generate an AdSense report based on the report request sent in the query parameters. Returns the result as JSON; to retrieve output in CSV format specify…

adclients

  • GETadsensehost.adclients.list/adclients?alt=csv&fields=string&key=string&oauth_token=string&prettyPrint=true&quotaUser=string&userIp=string&maxResults=0&pageToken=stringList all host ad clients in this AdSense account.
  • GETadsensehost.adclients.get/adclients/:adClientId?alt=csv&fields=string&key=string&oauth_token=string&prettyPrint=true&quotaUser=string&userIp=stringGet information about one of the ad clients in the Host AdSense account.

associationsessions

  • GETadsensehost.associationsessions.start/associationsessions/start?alt=csv&fields=string&key=string&oauth_token=string&prettyPrint=true&quotaUser=string&userIp=string&productCode=AFC&websiteUrl=string&callbackUrl=string&userLocale=string&websiteLocale=stringCreate an association session for initiating an association with an AdSense user.
  • GETadsensehost.associationsessions.verify/associationsessions/verify?alt=csv&fields=string&key=string&oauth_token=string&prettyPrint=true&quotaUser=string&userIp=string&token=stringVerify an association session after the association callback returns from AdSense signup.

customchannels

  • GETadsensehost.customchannels.list/adclients/:adClientId/customchannels?alt=csv&fields=string&key=string&oauth_token=string&prettyPrint=true&quotaUser=string&userIp=string&maxResults=0&pageToken=stringList all host custom channels in this AdSense account.
  • PUTadsensehost.customchannels.update/adclients/:adClientId/customchannels?alt=csv&fields=string&key=string&oauth_token=string&prettyPrint=true&quotaUser=string&userIp=stringUpdate a custom channel in the host AdSense account.
  • POSTadsensehost.customchannels.insert/adclients/:adClientId/customchannels?alt=csv&fields=string&key=string&oauth_token=string&prettyPrint=true&quotaUser=string&userIp=stringAdd a new custom channel to the host AdSense account.
  • PATCHadsensehost.customchannels.patch/adclients/:adClientId/customchannels?alt=csv&fields=string&key=string&oauth_token=string&prettyPrint=true&quotaUser=string&userIp=string&customChannelId=stringUpdate a custom channel in the host AdSense account. This method supports patch semantics.
  • GETadsensehost.customchannels.get/adclients/:adClientId/customchannels/:customChannelId?alt=csv&fields=string&key=string&oauth_token=string&prettyPrint=true&quotaUser=string&userIp=stringGet a specific custom channel from the host AdSense account.
  • DELETEadsensehost.customchannels.delete/adclients/:adClientId/customchannels/:customChannelId?alt=csv&fields=string&key=string&oauth_token=string&prettyPrint=true&quotaUser=string&userIp=stringDelete a specific custom channel from the host AdSense account.

reports

  • GETadsensehost.reports.generate/reports?alt=csv&fields=string&key=string&oauth_token=string&prettyPrint=true&quotaUser=string&userIp=string&startDate=string&endDate=string&dimension=string&filter=string&locale=string&maxResults=0&metric=string&sort=string&startIndex=0Generate an AdSense report based on the report request sent in the query parameters. Returns the result as JSON; to retrieve output in CSV format specify…

urlchannels

  • GETadsensehost.urlchannels.list/adclients/:adClientId/urlchannels?alt=csv&fields=string&key=string&oauth_token=string&prettyPrint=true&quotaUser=string&userIp=string&maxResults=0&pageToken=stringList all host URL channels in the host AdSense account.
  • POSTadsensehost.urlchannels.insert/adclients/:adClientId/urlchannels?alt=csv&fields=string&key=string&oauth_token=string&prettyPrint=true&quotaUser=string&userIp=stringAdd a new URL channel to the host AdSense account.
  • DELETEadsensehost.urlchannels.delete/adclients/:adClientId/urlchannels/:urlChannelId?alt=csv&fields=string&key=string&oauth_token=string&prettyPrint=true&quotaUser=string&userIp=stringDelete a URL channel from the host AdSense account.

API details

Base URL
https://www.googleapis.com/adsensehost/v4.1
Authentication
OAuth 2.0 (implicit flow) with 1 scope
OAuth 2.0 (authorization code flow) with 1 scope
Operations
26 operations on 17 pathsGET 16POST 3DELETE 3PUT 2PATCH 2
Main resources
accounts 12customchannels 6urlchannels 3adclients 2associationsessions 2reports 1
Response formats
application/json
Description format
OpenAPI 3.0.0, API version v4.1
Listed from
APIs.guru OpenAPI Directory (CC0-1.0)
Source updated

How to test the AdSense Host API in Swastik Codes

  1. Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
  2. Fork it into your workspaceChoose a workspace. You get your own copy of the AdSense Host API collection, without the publisher's secrets.
  3. Add your credentialsThis API uses OAuth 2.0 (implicit flow) with 1 scope. Add yours in the collection's variables or an environment; the requests already reference it.
  4. Send a requestPick an endpoint, for example “adsensehost.accounts.list” (GET /accounts?alt=csv&fields=string&key=string&oauth_token=string&prettyPrint=true&quotaUser=string&userIp=string&filterAdClientId=string), and press Send. Check the response, add tests and run the whole collection with the runner.

Frequently asked questions

What is the AdSense Host API?

Generates performance reports, generates ad codes, and provides publisher management capabilities for AdSense Hosts. It is listed under E-commerce and has 26 endpoints.

Who publishes the AdSense Host API?

It is listed from Google's public API description (an OpenAPI document), not published by Google on Swastik Codes. Anyone who controls googleapis.com can claim the profile by adding a DNS TXT record.

What is the base URL of the AdSense Host API?

Requests go to https://www.googleapis.com/adsensehost/v4.1. Endpoint paths are added to this base URL.

How do I authenticate with the AdSense Host API?

It accepts 2 methods: OAuth 2.0 (implicit flow) with 1 scope; OAuth 2.0 (authorization code flow) with 1 scope.

How many endpoints does the AdSense Host API have?

26 operations on 17 paths (16 GET, 3 POST, 3 DELETE, 2 PUT, 2 PATCH). The largest groups are accounts, customchannels, urlchannels, adclients.

Is forking the AdSense Host API free?

Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.

Suggest an API

Tell us which public API is missing. We check it, then add it here with its endpoints when it has an OpenAPI (Swagger) description.