If you’re already working with the AdSense API, please refer to our migration guide to get started. Please make plans to migrate to the new AdMob API, as we will sunset access to AdMob data via the AdSense API in the fall of 2021.
Today we’re announcing the open beta release of the AdMob API v1. It offers a new and improved way to interact with AdMob reporting data programmatically.
Built with app publishers in mind, the new AdMob API will replace the need for you to use the AdSense API and provide enhanced capabilities to query AdMob reporting data. For example, unlike the AdSense API that uses different definitions of certain ads metrics for app publishers, the AdMob API includes metrics that are consistent with the AdMob UI.
The AdMob API v1 beta release offers the following benefits for app publishers:
Receive metrics that are more accurate and consistent with the AdMob UI.
Gain access to mediation reporting programmatically.
Integrate newer technologies like JSON REST into your product sooner.
We will continue to make improvements to the AdMob API and we encourage you to join the open beta now and provide feedback to influence the product roadmap before the general release.
How can I join the beta?
The beta is available to all AdMob users. You can start with the Getting Started guide or use the client libraries that we have created for you. Additional client library samples will be coming soon.
AdSense Management API v1.2 and v1.3 have been marked as deprecated and will be sunset on August 17th 2016, after which all requests will begin to fail. Please migrate to v1.4 as soon as possible to ensure your API access is unaffected; be sure to check the release notes and migration guide for help while changing versions.
If you have any questions about this migration, please contact us via the forum.
Today we’re announcing the availability of three new reporting dimensions created specifically for AdMob publishers: APP_ID, APP_NAME, and APP_PLATFORM.
Here’s how they work:
APP_ID - This dimension matches the store ID of an application. It will be prefixed with “1:” for an App Store ID (iOS) and “2:” for a Google Play ID (Android). For example, “1:476954712” or “2:com.labpixies.lineup”.
APP_NAME - Matches the name of an application, like “Flood-It!” or “Line Up”.
APP_PLATFORM - This dimension can partition results by platform (e.g. “Android” or “iOS”).
These new dimensions are available now in the AdSense Management API. If you’re unfamiliar with it, the AdSense Management API is a web-based API that you can query to get information about your AdSense account. There are client libraries for a number of platforms, though any standard HTTP client can send requests to it and parse the responses. With a little code and these new dimensions, you can create custom reports about a single app, a family of them, or even your entire platform lineup!
For more information on building and customizing AdMob reports, check out the reporting section of the AdMob developer site. You can also use the API Explorer to test out queries that include these fields.
The Accounts resource offers both a name and an ID but for most accounts these were showing the same string (something like "pub-12345678901234"). To make the process more intuitive for users, we are improving the logic behind the name.
From now on, the account.name property will have the company name or, in its absence, the contact name. If you still want to show the account ID, just use the id field.
This also applies to the Host API, although the default namespace can still be used.
As always, if you have any questions, feel free to drop us a line on our API forums.
TL;DR Projects using the AdSense Management API should now check for accounts with multiple AdSense/AdX accounts and let users pick instead of using the default namespace, as it will be disabled for some accounts.
API users with access to more than one AdSense or AdX accounts will receive an error when using the default namespace due to cases of ambiguity. We expect a very small percentage of users to have this problem, as this functionality is restricted to a limited set of accounts.
To avoid complications, make sure you're not using the default account namespace adclients.list, adunits.getAdCode, etc. and specify an account ID for every call. For that, use accounts.adclients.list, accounts.adunits.getAdCode, etc. You’ll find the whole list of calls in the API reference pages.
The flow you should always use from now on is:
Show a publisher account picker if there's more than one account