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.

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.

The Google Ads API v4 and v5 will sunset on June 23, 2021. After this date, all v4 and v5 API requests will begin to fail. Please migrate to a ...
The Google Ads API v4 and v5 will sunset on June 23, 2021. After this date, all v4 and v5 API requests will begin to fail. Please migrate to a newer version prior to June 23, 2021 to ensure your API access is unaffected.

We've prepared various resources to help you with the migration: If you have questions while you’re upgrading, please reach out to us on the forum or at googleadsapi-support@google.com.

Today we’re releasing an update to the Display & Video 360 API which includes the following features:
Today we’re releasing an update to the Display & Video 360 API which includes the following features:

More detailed information about this update can be found in the Display & Video 360 API release notes.

Before using these new features, make sure to update your client library to the latest version.

If you run into issues or need help with these new features, please contact us using our support contact form.

If you are a developer currently using the AdWords API, you need to upgrade to the Google Ads API by April 27, 2022. On that date, the AdWords API will sunset and requests to the AdWords API will fail. With Google Ads API ...
If you are a developer currently using the AdWords API, you need to upgrade to the Google Ads API by April 27, 2022. On that date, the AdWords API will sunset and requests to the AdWords API will fail. With Google Ads API v7, we reached feature parity with the AdWords API making it possible for all developers to upgrade with a few exceptions listed at the top of the Migrating Features guide.

With the Google Ads API, you’ll see faster rollouts of new features and updates for tools like recommendations, asset management, and new ad types. We’ve also made improvements to existing features like Keyword Planner, change history, and billing. This provides more features to manage your campaigns and increases overall productivity.

Where do I start?
Any developers applying for a new developer token after today will only be given access to the Google Ads API. The following are useful resources for new API users: Existing AdWords API developers should start upgrading. Here are some resources to get started: Where can I get support?
If you have questions while you’re upgrading, please reach out to us on the forum or at googleadsapi-support@google.com.

Today, we’re announcing the v7 release of the Google Ads API. To use the v7 features, you will need to upgrade your client libraries and client code. The updated client libraries and code examples will be published next week. For more information on breaking changes, see the ...
Today, we’re announcing the v7 release of the Google Ads API. To use the v7 features, you will need to upgrade your client libraries and client code. The updated client libraries and code examples will be published next week. For more information on breaking changes, see the migration guide.

Here are the highlights:
  • We now have new assets that are available in test accounts:
    • Callout assets
    • Structured snippet assets
    • Sitelinks assets
  • The promotion assets we’ve added are available in production and test accounts.
  • The Google Ads API now supports reporting for Apple’s SKAdNetwork. This feature allows advertisers to query how many SKAdNetwork conversions they receive from their iOS apps as well as the SKAdNetwork conversion value of those conversions.
  • Keyword Planning now supports:
    • Refining keywords using annotation data
    • Selecting a custom date range for search volume
    • Requesting aggregate metrics for generated keyword ideas and for keywords in a keyword plan
  • We’ve added ad_group_ad_label and ad_group_criterion_label labels for easier filtering and selection.
  • You can now manage bidding strategy and campaign simulations.
  • We updated our resource exceeded errors to include more detail such as what type of limit was exceeded and how many resources are allowed by that limit.
  • You can now use marginal ROI campaign budget recommendations. This recommendation suggests adjusting a campaign's budget if we predict that its ROI will go up.
See the release notes for details and for more features.

Where can I learn more?
The following resources can help you get started: If you have any questions or need additional help, contact us via the forum.

This blog series follows the journey of building the new and improved Interactive Google Ads Query Builder tool. Part 3 of this series described how we used the GoogleAdsFieldService to create a detailed JSON resource schema to serve as the canonical data set for the angular application. In Part 4, we will discuss how to create a resource service that determines which fields are displayed to users in various parts of the application.
This blog series follows the journey of building the new and improved Interactive Google Ads Query Builder tool. Part 3 of this series described how we used the GoogleAdsFieldService to create a detailed JSON resource schema to serve as the canonical data set for the angular application. In Part 4, we will discuss how to create a resource service that determines which fields are displayed to users in various parts of the application.

Background

One of the benefits of the new Interactive Google Ads Query Builder is that fields are dynamically updated based on user selections to display whether a field is selectable or not, and if not, users are provided with feedback to understand why a given field is not selectable. However, we must first present lists of fields that are available to select in each clause of a Google Ads Query Language (GAQL) string based on the main resource in the FROM clause of that GAQL string. We will create a service called the ResourceService that will contain this logic. Then, we can use Angular’s services and dependency injection model to pull the appropriate fields and their related information into any component.

Objective

The app is designed such that the FROM resource is determined by the user’s current URL. Therefore, the resource in the FROM clause and list of all available fields is constant based on that URL. For the sake of this post, we are only concerned with three GAQL clauses, SELECT, WHERE, and ORDER BY, because these are the only clauses that can be dynamically populated with fields. LIMIT accepts an integer, and PARAMETERS only has a single option.


Within each clause, we will organize each of the available fields into four categories: attribute fields, metrics, segments, and attributed resource fields for a better user experience. Our objective is to create a ResourceService that provides the relevant fields for a given clause and category.

Implementation

We can leverage the resource schema we generated earlier to select the entry for the main resource in the FROM clause as determined by the URL and filter its fields sub-entry to provide only fields that match specific criteria.


Let’s begin by categorizing our fields by clause.
  • Fields in the SELECT clause have the selectable property equal to true.
  • Fields in the WHERE clause have the filterable property equal to true.
  • Fields in the ORDER BY clause have the sortable property equal to true.
We can further break these field lists into attribute fields, metrics, segments, and attributed resource fields. Retrieving the metrics and segments in a given clause is trivial because our resource schema provides a list of metrics and segments (including segmenting resources). For each clause, we’ll include all of the segments and metrics that meet the clause-related criteria listed above.

Similarly, we can retrieve each clause’s main attribute fields by looking at the attributes of the resource in our FROM clause, filtering for those which begin with the resource name followed by a dot, and applying the clause-related filtering criteria above.

All of the other fields in our attributes entry are attributed resource fields. We can generate a list of attributed resources by creating a set of the unique prefixes (i.e., the text that precedes the dot) of the resource’s attributes excluding our main resource. Finally, we can create a list of fields by clause for each attributed resource by selecting the fields that are prefixed with each respective attributed resource’s name.

With all of this logic in place, we can create an interface that exposes methods for returning a list of fields in a given category and clause. Then, any component that is injected with the ResourceService can simply call the corresponding method to retrieve the appropriate list of fields.

Conclusion

We now have created a ResourceService that we can use to display relevant fields to a user constructing a GAQL query based on the clause and category they are viewing in the app. In this post, we’ve covered:
  • GAQL query structure.
  • The various types of fields that can appear in GAQL clauses.
  • Field properties and how they correspond to different GAQL clauses.

Hopefully this has deepened your understanding of constructing GAQL queries with the Google Ads API. If you have any questions or need additional help, contact us via the forum or at googleadsapi-support@google.com.

We're hard at work in bringing some new resource types to the change_status report. Some planned future improvements include changes to shared sets and assets. While these types will be fully supported in future versions of the Google Ads API, the infrastructure changes we're making to support them will have some effects on existing versions as well.
We're hard at work in bringing some new resource types to the change_status report. Some planned future improvements include changes to shared sets and assets. While these types will be fully supported in future versions of the Google Ads API, the infrastructure changes we're making to support them will have some effects on existing versions as well.

When we add support for new resource types, you will be able to fetch the new rows in all versions of the API, with the resource_type returning as UNKNOWN in already released versions. In some specific instances, rows that previously had a known resource_type, such as CAMPAIGN, may start returning a resource type of UNKNOWN. This will occur if, for example, a change that was previously reported as a CAMPAIGN change was actually a CAMPAIGN_ASSET change all along. The future version of the API will know about the CAMPAIGN_ASSET resource type, but existing versions do not, so we must use UNKNOWN. This row will also have a new resource_name associated with it, which now includes the asset's ID as well.

The new resource name for the row will include an identifier that tells what kind of change it is. We will keep an updated list of these identifiers on the change status guide. This lookup will only be necessary for rows with an UNKNOWN resource type, and corresponds to the resource type that would be returned from the future API version when that resource type is fully supported.

We are planning multiple new resource types for this report, so please expect UNKNOWN types to appear for various new resource types. Rest assured that when you see this, it's because an upcoming release will have a newly supported resource type for the change_status report. We won't make any changes until at least May 24, 2021, so you have time to ensure that your code can handle UNKNOWN resource type rows.

If you have any questions, please leave a post on our forum so that we can help.

In March, we announced that beginning April 30, 2021 we will no longer allow new merchant accounts onto v2.0 of the Content API for Shopping as part of the sunset process. With less than two weeks to go until the April deadline, here is a quick reminder of the details.
In March, we announced that beginning April 30, 2021 we will no longer allow new merchant accounts onto v2.0 of the Content API for Shopping as part of the sunset process. With less than two weeks to go until the April deadline, here is a quick reminder of the details.

What do I need to know?
  • This account restriction will not impact users accessing new sub-accounts via an existing multi-client account (MCA), provided that MCA has been actively making v2.0 requests.
  • New accounts using v2.1 of the Content API for Shopping will not be affected.
  • The sunset date for existing merchant accounts actively using v2.0 is September 30, 2021.
What do I need to do?
  • Migrate to v2.1 of the Content API for Shopping in order to continue interacting with new merchant accounts after April 30, 2021.
  • If you are concerned you won’t be able to meet the April deadline, please fill out this form to request an exemption.
If you have any questions or issues during migration, contact your Google representative for Merchant Center programs, or ask questions in the Content API for Shopping forum.

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 ...
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.

This blog series follows the journey of building the new and improved Interactive Google Ads Query Builder. Part 2 of this series described the design of the detailed JSON resource schema that will serve as the canonical data set for the Interactive Query Builder ...
This blog series follows the journey of building the new and improved Interactive Google Ads Query Builder. Part 2 of this series described the design of the detailed JSON resource schema that will serve as the canonical data set for the Interactive Query Builder Angular application. Part 3 will focus on how we can use the GoogleAdsFieldService to create that schema.

Retrieving the data

We can retrieve most of the data for the schema described in Part 2 by making an API call to the GoogleAdsFieldService with the following query:

SELECT name, category, data_type, selectable, filterable, sortable, selectable_with, metrics, segments, is_repeated, type_url, enum_values, attribute_resources

The result contains an array of JSON objects for every field available in the Google Ads API. Each object in the array will contain the fields in the SELECT clause above. For example, the ad_group list item would look like this:

{
"resourceName": "googleAdsFields/ad_group",
"name": "ad_group",
"category": "RESOURCE",
"dataType": "MESSAGE",
"selectable": false,
"filterable": false,
"sortable": false,
"selectableWith": [...],
"metrics": [...],
"segments": [...],
"isRepeated": false,
"typeUrl": "com.google.ads.googleads.v6.resources.AdGroup",
"enumValues": [],
"attributeResources": [...]
}


We’ll restructure this into key-value pairs, where the keys are the entity names and the values are the metadata for each entity, making it easier to lookup the metadata for a given entity. For example, the ad_group entry would look like this:

{
"ad_group": {
"resourceName": "googleAdsFields/ad_group",
"name": "ad_group",
"category": "RESOURCE",
"dataType": "MESSAGE",
"selectable": false,
"filterable": false,
"sortable": false,
"selectableWith": [...],
"metrics": [...],
"segments": [...],
"isRepeated": false,
"typeUrl": "com.google.ads.googleads.v6.resources.AdGroup",
"enumValues": [],
"attributeResources": [...]
}


As compared with the schema we designed in Part 2, this restructured object is missing several fields, which we’ll add in the following sections: attributes, fields, description, and display name.

Attributes

If you recall from the schema design, each resource should contain an array named attributes which contains the names of all fields present on the resource itself and any attributed resources. We can create this array by iterating through the results of our GoogleAdsFieldService query and adding the name of entries beginning with either our resource or one of its attributed resources, followed by a dot.

Fields

The fields entry in our schema is an object with an entry for each (a) item in the attributes array we just created, (b) metric on the resource, and (c) segment on the resource. The value of each entry will be each respective field’s value in the object we created earlier. However, we still need to add an incompatible_fields array to each field.

To construct the incompatible_fields array for each entry in our fields object, we’ll check to see if each of the fields, metrics, and segments present on the top level object is selectable_with the given field being evaluated. If not, we’ll add that field, metric, or segment to the incompatible_fields array.

Descriptions

Next, we need to add descriptions to each top level resource and item in its fields entry. It is important to note that a field may have a different description depending on the top level resource. For example, the description of ad_group.id is “Output only. The ID of the ad group.” but the description of campaign.id is “Output only. The ID of the campaign.” The REST discovery docs contain nested descriptions that we can use to create a canonical descriptions object, which we’ll use to populate our schema. This step entails parsing and formatting, the details of which we will not discuss here. We just want you to know that the REST discovery docs exist in case you ever need them. This is currently the best solution available, although it would be easier if the descriptions were returned from the GoogleAdsFieldService.

Display names

All that is left to do is populate the display names field in our resource schema. We can do this by simply replacing underscores with spaces and capitalizing the first letter of each word in the name.

Filtering for resources

Our resource schema is now fully populated. However, it contains every resource, field, segment, and metric returned from our GoogleAdsFieldService query. We can filter this schema to include only items with a category of RESOURCE.

Conclusion

We have now created an expanded resource schema containing detailed field information and a list of incompatible fields for each field, which we can use in our Angular application. In this post, we’ve covered:
  • How to use the GoogleAdsFieldService to retrieve field metadata.
  • Field compatibility in GAQL.
  • The REST discovery API.
Hopefully this has deepened your understanding of what is possible with the Google Ads API. If you have any questions or need additional help, contact us via the forum or at googleadsapi-support@google.com.

This blog series follows the journey of building the recently released Interactive Google Ads Query Builder tool. Part 1 of this series outlined what we’ll be covering in the series as well as the rationale behind publishing this content. Part 2 will focus on designing a detailed JSON resource schema that will serve as the canonical data set for the Interactive Query Builder ...
This blog series follows the journey of building the recently released Interactive Google Ads Query Builder tool. Part 1 of this series outlined what we’ll be covering in the series as well as the rationale behind publishing this content. Part 2 will focus on designing a detailed JSON resource schema that will serve as the canonical data set for the Interactive Query Builder Angular application.

Background

As mentioned in Part 1, one of the major benefits of the new Interactive Query Builder is that it provides real-time feedback detailing why fields may or may not be selectable in a given clause of a Google Ads Query Language (GAQL) query.

For example, let’s say you are constructing a GAQL query with ad_group as the main resource in the FROM clause. Both segments.conversion_action and metrics.absolute_top_impression_percentage are selectable on the ad_group resource. However, taking a look at the detailed reference documentation for segments.conversion_action, we can see that there is a list of “Selectable With” fields, and that list does not include metrics.absolute_top_impression_percentage. Therefore, those two fields are incompatible. Regardless of what resource is in the FROM clause, if one of those two fields is present in the query, we know that the other cannot be. That is why metrics.absolute_top_impression_percentage is no longer selectable in the Interactive Query Builder once segments.conversion_action is selected.

Rather than trying to piece together all of this logic at runtime with various back-and-forth server calls, we thought it would be beneficial to feed that data into the application with static JSON files containing the resource schema. What might that optimal schema look like?

Schema Design (definition at the end of the blog post)

A GAQL string requires a single resource in the FROM clause. Given that constraint, the top level JSON schema will be a map from resources to detailed schemas for each resource. For example, the ad_group entry in our schema will look like this:


{

"ad_group": {
"name": "ad_group",
"display_name": "Ad Group",
"description": "An ad group.",
// Array of all attribute and attributed resource fields.
"attributes": [
"ad_group.ad_rotation_mode",
"ad_group.base_ad_group",
"ad_group.campaign",
...
"campaign.ad_serving_optimization_status",
"campaign.advertising_channel_sub_type",
"campaign.advertising_channel_type",
...
"customer.auto_tagging_enabled",
"customer.call_reporting_setting.call_conversion_action",
"customer.call_reporting_setting.call_conversion_reporting_enabled",
...
],
// Array of all metrics selectable with ad_group.
"metrics": [...],
// Array of all segments selectable with ad_group.
"segments": [...],
// Expanded info for all items listed in attributes, metrics, and segments arrays.
"fields": {...}
}




The crux of this enhanced schema is the fields entry. The keys of this object will be all of the attributes, metrics, and segments of the top level resource (e.g. ad_group). The value of each item in this object will be objects containing detailed information about that given field, as well as an additional field called incompatible_fields, an array of the fields that are incompatible with the given field. For example, the metrics.phone_impressions entry of the fields object would look like this:




"metrics.phone_impressions": {
"field_details": {
"name": "metrics.phone_impressions",
"category": "METRIC",
"selectable": true,
"filterable": true,
"sortable": true,
"data_type": "INT64",
"is_repeated": false,
"type_url": "",
"description": "Number of offline phone impressions.",
"enum_values": [],
"selectable_with": [
"ad_group",
"ad_group_ad",
"campaign",
"customer",
"extension_feed_item",
"segments.ad_network_type",
"segments.click_type",
"segments.date",
"segments.day_of_week",
"segments.interaction_on_this_extension",
"segments.keyword.ad_group_criterion",
"segments.keyword.info.match_type",
"segments.keyword.info.text",
"segments.month",
"segments.month_of_year",
"segments.quarter",
"segments.week",
"segments.year"
]
},
"incompatible_fields": [
"segments.slot",
"segments.device",
"segments.external_conversion_source",
"segments.conversion_action_category",
"segments.conversion_lag_bucket",
"segments.hour",
"segments.conversion_action_name",
"segments.conversion_action",
"segments.conversion_adjustment",
"segments.conversion_or_adjustment_lag_bucket"
]
},




The recursive nature of the schema may seem somewhat redundant, as some fields will appear in multiple resources. However, we will ultimately divide this main schema into individual JSON files for each resource to decrease load times, and we will only retrieve a single resource-specific schema depending on the resource in the FROM clause.


Schema Definition

For reference, the full schema definition is below:


interface ResourceSchema {
name: string; // the name of the resource
display_name: string; // the display name of the resource
description: string; // the description of the resource
attributes: string[]; // the resource's fields (including attributed resource fields)
metrics: string[]; // available metrics when the resource is in the FROM clause
segments: string[]; // available segments when the resource is in the FROM clause
fields: { // detailed info about all fields, metrics, and segments
[key: string]: {
field_details: FieldDetails; // details about the field (defined below)
incompatible_fields: string[]; // fields that are incompatible with the current field
}
};
}

interface FieldDetails {
name: string; // the name of the field
category: string; // the field's category (e.g. ATTRIBUTE, METRIC, SEGMENT)
selectable: boolean; // whether or not the field is allowed to be placed in the SELECT clause
filterable: boolean; // whether or not the field is allowed to be placed in the WHERE clause
sortable: boolean; // whether or not the field is allowed to be placed in the ORDER BY clause
data_type: string; // the field's data type
is_repeated: boolean; // whether or not the field is a repeated field
type_url: string; // the field's type_url
description: string; // the field's description
enum_values: string[]; // possible enum values if the field is of type ENUM
selectable_with: string[]; // the list of field the current field is selectable with
}


Conclusion

With that, we now have designed an expanded resource schema containing detailed field information and a list of incompatible fields for each field, which we can use in our Angular application. In part 3, we’ll discuss how to create this schema using the GoogleAdsFieldService.
Hopefully this has deepened your understanding of and shown you what is possible with the Google Ads API. If you have any questions or need additional help, contact us via the forum or at googleadsapi-support@google.com.

An important part of our role in Developer Relations is gathering your feedback, as developers using our APIs, so that we can improve products and create tools that will make for a better developer experience. This is particularly important now because the Google Ads API is now out of Beta. We have received several important pieces of feedback as it relates to the Google Ads Query Language (GAQL) and constructing GAQL queries. Specifically, we’ve learned that

  • GAQL is a powerful and flexible mechanism for retrieving data from the Google Ads API. In order to get the most out of it and construct queries efficiently, it is important to understand the details and nuances of this query language.
  • The previous version of the Interactive Google Ads Query Builder tool was useful for constructing GAQL query strings. However, there were opportunities to make the query building process faster while exposing some of the logic behind the tool to better understand how GAQL query string validation works.
As a result, we have released a new version of the Interactive Google Ads Query Builder tool that has several benefits, which you can view in the release blog post.

In developing this new tool, we approached the Google Ads API from a user's perspective to better understand developer use cases. Throughout the process, we documented our experience to share how we approach using the Google Ads API. This is the first in a series of blog posts following that journey. The Query Builder Blog Series will include the following topics.

  • Designing a resource schema: designing a detailed JSON resource schema that will serve as the canonical data set for the Interactive Query Builder Angular application.
  • Creating a resource schema: how we can use the GoogleAdsFieldService to create an enhanced resource schema that includes incompatible fields to make building this application easier.
  • Creating a resource service: how to create a resource service that determines which fields are displayed to users in various parts of the application.
  • Determining Field Selectability: how to create a selection service that determines whether a field is selectable or not in a given clause of a Google Ads Query Language (GAQL) query string.
  • Field Selection & Query Validation: how to update the selection service to select fields and validate the GAQL string.
  • Summary: a summary of key lessons learned from this process.

We hope you enjoy and learn from this blog series. Stay tuned for more interesting content.

If you have any questions or need additional help, contact us via the forum or at googleadsapi-support@google.com.