[go: up one dir, main page]

On October 12, 2021, you will no longer be able to retrieve AdMob data from the AdSense Management API v1.4. To retrieve AdMob data programmatically, migrate to the AdMob API.

What do I need to do?

Follow the instructions in the migration guide to migrate your API workflow. Review these additional resources to support your migration:


Start migrating from the AdSense API to the AdMob API as soon as possible. If you don’t complete the migration by October 12th, 2021, you will lose access to AdMob data through the AdSense API, which may impact your ability to make data-driven business decisions.

Feel free to reach out to us via the AdMob API Developer forum if you have questions or feedback regarding the AdMob API.


This is the final reminder that v1.4 of the AdSense Management API will sunset on October 12, 2021. Any requests made this this version will stop working on this date. If you haven’t already migrated to v2 of the AdSense Management API, now is the time to do so.

For help with migrating, see our migration overview guide. We also have updated examples for all five of our client libraries: Java, Python, Ruby, PHP, and .NET. For a full list of changes, see the release notes.

As always, feel free to reach out to us on the AdSense API forum with any API-related questions.

Starting on October 12, 2021, developers will no longer be able to retrieve AdMob data from the AdSense Management API v1.4. Please start to migrate to the AdMob API which is generally available.

Where can I get my AdMob data?

After October 12th, 2021, using the AdMob API will be the only way you can access your AdMob data programmatically. The AdMob API helps app developers retrieve:

  • metrics that are consistent with the AdMob UI definitions and calculations
  • mediation reports that are not available through the AdSense API

What do I need to do?

Start migrating from the AdSense API to the AdMob API as soon as possible. If you do not complete the migration by October 12th, 2021, you will lose access to AdMob data through the AdSense API, which may impact your ability to make data-driven business decisions.

Follow the instructions in the migration guide to migrate your API workflow. Review these additional resources to support your migration:

Feel free to reach out to us via the AdMob API forum if you have questions or feedback regarding the AdMob API.

We're happy to announce that v2 of the AdSense Management API is available starting today. This version adds the ability to fetch the status of sites on your account and aligns the AdSense Management API with current Google API standards.

At this time, v1.4 of the AdSense Management API is now deprecated, and it will sunset on October 12, 2021.

Notable changes from v1.4 to v2 include the following:
  • All deprecated methods in v1.4 have been removed in v2. This includes resource methods that did not specify an AdSense account.
  • Resources are now identified by a name field. For example, an AdClient’s name would be “accounts/{accountId}/adclients/{adClientId}”.
  • With v2, AdSense Management API reporting data now aligns with the AdSense UI. This means that AdMob and YouTube properties are no longer supported. If you need to continue to fetch AdMob data programmatically, please migrate to the AdMob API. Additionally, the AdSense Management API will only support report data going back 3 years.

For a full list of changes, see the release notes. As always, feel free to reach out to us on the AdSense API forum with any API-related questions.

Today we’re excited to announce the general availability v1 release of the new AdMob API. It allows publishers to programmatically get information on their AdMob account.

The AdMob API v1 release offers the following benefits for app developers compared with the existing AdSense API used to access AdMob data:

  • Retrieve metrics that are consistent with how the AdMob UI defines and calculates them
  • Retrieve mediation reports previously not available through the AdSense API

How can I get started?

The AdMob API is now available to all AdMob users. You can use the Getting Started guide and the client libraries to get started.

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.

If you have any questions, please contact us via the AdMob API Developer Forum. We will be able to provide suggestions on how to best migrate your workflow. We look forward to hearing your feedback.

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.

Where can I learn more?

If you have any questions or need additional help, please contact us via the forum. We look forward to hearing your feedback.

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.

To bring the API in line with UI changes, the Product Codes AFMC and AFS have been deprecated and are now ignored by the API. Valid values are AFC, AFG and AFV.

The mobileContentAdsSettings information for an AdUnit will no longer be populated since AFMC is no longer supported; the fields will still be returned but they will be empty.

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.

We recently deprecated the default namespace in the AdSense Management API so now you should show an account picker to your users and add an account ID to all requests.

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:
  • Authenticate
  • Call accounts.list
  • Show a publisher account picker if there's more than one account
  • Do the rest of the requests using the account ID
If you have questions about this change or need help with updating your code, please let us know on the AdSense API forum or our Google+ page.

Version 1.4 of the AdSense Management API is now available and comes with new features mainly based on suggestions and requests from developers: If you are new to the API, check out the new getting started video that covers everything you need to know to start your integration with the AdSense Management API.



Remember to visit the AdSense API forum or our Google+ page if you need any help implementing these new features!


We have recently published several new resources to help developers build reporting calls to the API:

1. Metrics and dimensions reference pages, with each defined by the relevant values, formats and limits.
2. New metadata calls in the AdSense Management API V1.3 that allow developers to fetch the list of available dimensions and metrics, check compatibility between each other and find out what products are supported. A sample response might be:
{
  "kind": "adsense#reportingMetadataEntry",
  "id": "EXAMPLE_DIMENSION",
  "compatibleDimensions": [
    "1",
    "2",
    "4",
    ...
  ],
  "compatibleMetrics": [
    "AD_REQUESTS",
    "AD_REQUESTS_COVERAGE",
    "AD_REQUESTS_CTR",
    ...
  ],
  "supportedProducts": [
    "AFMC",
    "AFC",
    "AFV"
  ]
},
The compatibleDimensions field shows a list where each item is an integer representing a group of compatible dimensions. As there is no one-to-one relation between compatible dimensions, they are represented as groups (as shown below).

Examples
Group #1 Group #2 Group #3 Group #4
AD_CLIENT_ID
AD_FORMAT_CODE
AD_FORMAT_NAME





BID_TYPE_CODE
BID_TYPE_NAME







DATE
DOMAIN_NAME
MONTH
PLATFORM_TYPE_CODE
PLATFORM_TYPE_NAME
PRODUCT_CODE
PRODUCT_NAME
TARGETING_TYPE_CODE
TARGETING_TYPE_NAME
WEEK
AD_CLIENT_ID
AD_FORMAT_CODE
AD_FORMAT_NAME





BID_TYPE_CODE
BID_TYPE_NAME





BUYER_NETWORK_ID
BUYER_NETWORK_NAME
DATE

MONTH
PLATFORM_TYPE_CODE
PLATFORM_TYPE_NAME
PRODUCT_CODE
PRODUCT_NAME
TARGETING_TYPE_CODE
TARGETING_TYPE_NAME
WEEK
AD_CLIENT_ID
AD_FORMAT_CODE
AD_FORMAT_NAME
AD_UNIT_CODE
AD_UNIT_ID
AD_UNIT_NAME
AD_UNIT_SIZE_CODE
AD_UNIT_SIZE_NAME
BID_TYPE_CODE
BID_TYPE_NAME
COUNTRY_CODE
COUNTRY_NAME





DATE

MONTH
PLATFORM_TYPE_CODE
PLATFORM_TYPE_NAME
PRODUCT_CODE
PRODUCT_NAME
TARGETING_TYPE_CODE
TARGETING_TYPE_NAME
WEEK
AD_CLIENT_ID
AD_FORMAT_CODE
AD_FORMAT_NAME





BID_TYPE_CODE
BID_TYPE_NAME
COUNTRY_CODE
COUNTRY_NAME
CUSTOM_CHANNEL_CODE
CUSTOM_CHANNEL_ID
CUSTOM_CHANNEL_NAME


DATE

MONTH
PLATFORM_TYPE_CODE
PLATFORM_TYPE_NAME
PRODUCT_CODE
PRODUCT_NAME
TARGETING_TYPE_CODE
TARGETING_TYPE_NAME
WEEK

From the previous table, note that:
  • DATE, MONTH and WEEK are compatible with every group. 
  • DOMAIN_NAME (Group #1) is not compatible with CUSTOM_CHANNEL_* (Group #4). 
  • If you want to report on ad units (Group #3) you won’t be able to use custom channels since a custom channel can be applied to one or more ad units. 
  • Country names (Group #3) can be used in combination with ad units (Group #3) or custom channels (Group #4) but ad units cannot be combined with custom channels
Remember to visit the AdSense API forums or our Google+ page if you need any help generating reports!

Version 1.3 of the AdSense Management API is now available and comes with new features to help you retrieve more publisher and reporting information.

Metadata for reporting dimensions and metrics
This is a highly requested feature that provides information on the list of available dimensions and metrics for the publishers, as well as their compatibility. This is useful to help developers avoid generating reports with invalid dimensions and metrics.

Alerts
You can now list the publisher’s current alerts, in their default language or in the one you specify.

Ad code
You can now programmatically fetch the code of an ad unit using getAdCode.

Remember to visit the AdSense API forums or our Google+ page if you need any help implementing these new features!

You spoke and we listened; we like to do that in Developer Relations! We've heard your comments regarding Google Developer Live (GDL) events and we understand that they are often key to solving complex questions you have. In order to keep up with your demand we've scheduled another round of Hangouts for all of our products over the next few months.

In the upcoming Hangouts you'll notice that we are experimenting with some new formats. On some products you'll see engineer interviews, third party product discussions, or the typical Office Hours. You can view the newly scheduled hangouts on the Google Developers events page. Please RSVP by clicking the “I’ll be there” button if you plan on attending.

In case you haven’t joined us before, you'll need four things to join the hangout:

These hangouts are informal and conversational, which make them a great place to ask questions or give us feedback. If you have questions about our GDLs, reach out to us on the forums.

In the AdSense Management API and AdSense Host API, you can let us manage date calculations for you. Apart from the standard YYYY-MM-DD format, all date fields accept the following special keywords:
  • today
  • startOfMonth
  • startOfYear
With these keywords you can define useful date ranges such as the following:

Start date End date
This month’s performance so far startOfMonth today
This year’s performance so far startOfYear today

But here is the really useful part: there is a handy feature that you can use to calculate relative dates by adding or subtracting days, weeks, months, or years:

Start date End date
Last 7 days’ performance today-6d today
Last month’s performance startOfMonth-1m startOfMonth-1d
Previous six months startOfMonth-6m startOfMonth-1d

You can use up to two operations per date. Let’s say we need to compare last month with the same period last year. We would need two requests like these two requests with these start and end dates:

Start date End date
Last month’s performance startOfMonth-1m startOfMonth-1d
Same month last year startOfMonth-1m-1y startOfMonth-1d-1y

If you want to try these out, we recommend using the APIs explorer. You’ll find it at the bottom of each method documentation page:
If you have any questions about this post or the AdSense APIs in general, visit the AdSense API Forum. You can also follow our Google Ads Developers G+ page for ad-related updates.


We’ll soon be sunsetting v1.0 and v1.1 of the AdSense Management API so we encourage you to migrate to v1.2 as soon as possible. To get you started, follow this simple guide.

If you don't use the client libraries you need to replace the version on the base URL that you are using:
https://www.googleapis.com/adsense/v1.1/
with
https://www.googleapis.com/adsense/v1.2/
That will allow you to continue using the API as you were and should require no further modifications to your code.

If you use the client libraries, what you need to do depends on the language you use:
  • Java
    Download the latest client libraries and replace your project dependencies.
  • PHP
    Make sure you get the latest files from the trunk of the repository. You may only need to replace trunk/src/contrib/Google_AdSenseService.php but you should update all the files you use.
  • Python
    Good news for you! No need to download any libraries, the discovery service knows what to do. Create the service as follows:
    http = httplib2.Http()
    service = build("adsense", "v1.2", http=http)
  • C#
    Download the latest client libraries and replace your project dependencies.
To make sure you’re using the latest version, list your saved ad styles. It’s a new feature only available to v1.2, so if you don’t get an error, you’re on the right track.

To learn about the AdSense Management API read the docs and post your questions on the AdSense API Forum and we’ll do our best to help you! Also, follow our Google Ads Developers G+ page to receive important announcements and tips.


Good news, everyone! Version 1.2 of the AdSense Management API is now available, and with it come two new features:
  • the ability to retrieve saved ad styles
  • the ability to retrieve and run saved reports

In addition, we’ll soon be deprecating versions 1.0 and 1.1. These will both be sunset six months from now, on April 17, 2013. Migration to the new version should be extremely simple, since version 1.2 is a superset of both previous versions, with no breaking changes.

If you have any questions or comments, let us know in the forum!


We’re happy to announce the release of v4.1 of the AdSense Host API. Don’t let the numbering fool you, this is a major update that provides a ton of new functionality!

The new version is intended as a full replacement of AdSense Host API v3 for ContentAds hosts, with a few extra features. Changes from v4 include added support for:

With this new release, we're also announcing the sunset of version 3 of the Host API, to take place on January 1, 2013. Over the next few weeks, we will be getting in touch with existing hosts and helping them get started with the migration.

If you’re not an AdSense host yet and are interested in joining the program, take a look at our introduction page to find out more about the requirements and how it works.

Let us know if you have any questions!

If you've recently visited any of the Google Ads Developer documentation, you may have noticed a "Feedback on this document" link at the top right corner of a page. That's right—you can now use that link to report errors, comment on existing content, or request further clarification for any of the Google Ads Developer docs:

In addition to this new channel, you can continue to reach out to us through the developer forums or Google Developers Live events.

Quang Nguyen, Ads Developer Relations Team