Some of the general workflows from the AdWords API are changed in the Google Ads API. For example, searching for entities now uses a separate service from mutating.
In the AdWords API, there were separate fields for similar concepts on different
entities, such as
AdGroupId. In the Google Ads API, nested field names
are now used, for example
ad_group.id. You can nest further
as well, for example
Service use cases
In the AdWords API, all operations for a given entity type used the same service.
CampaignService was used to get (which included searching and filtering) and
In the Google Ads API, searching uses its own service, the
If you need a list of entities matching some criteria, always use this service
to find a list of results. As in the AdWords API, calls to this service populate
only the specifically requested fields in the response.
Get requests still exist in Google Ads API, on each entity's specific service. You can
get campaign information from the
CampaignService. However, this call serves a
different purpose from the same call in the AdWords API. You cannot filter as
part of a get request, but instead get all the details for a specified entity.
You pass the entity's resource name as an identifier, and the response includes
every field filled out without needing to list them all.
Mutate requests in the Google Ads API are also on the entity-specific service. You can affect one entity per operation, and can pass multiple operations in a single request, just like in the AdWords API.
In the AdWords API, reporting was kept entirely separate from other services. In
the Google Ads API, this is no longer the case. Use the
GoogleAdsService (the same
as is used for searching for entities) and simply include stats fields in your
request to generate reports.
Other key differences between AdWords API and Google Ads API reporting are:
- Instead of report types in the AdWords API, you have resources such as
campaignand resource views such as
keyword_viewin the Google Ads API.
- Reports in the Google Ads API do not return plain text or XML. Instead, the
GoogleAdsRows that contain objects. For example, when you retrieve
metrics.clicks, you'll get back a GoogleAdsRow containing a campaign object with its
namefields set, as well as a
metricsobject with its
- Rows for zero impressions are returned by default in the Google Ads API. There is no
includeZeroImpressionsparameter. If you want to exclude zero impression rows, use a predicate such as
metrics.impressions > 0in your Google Ads Query Language.
- The GoogleAdsFieldService is similar to the AdWords API ReportDefinitionService, but instead of returning metadata for report types, it returns metadata for resources and resource views.
- If the denominator value is zero for a ratio field, such as cost per conversion, the AdWords API returns a value of 0. The Google Ads API will return a value of null in this scenario to match the behavior in the Google Ads UI.