Resource Metadata

You can use GoogleAdsFieldService to dynamically request the catalog for resources, resource's fields, segmentation keys and metrics available in the GoogleAdsService.Search interface. The catalog provides metadata that can be used by Google Ads API clients for validation and construction of Google Ads Query Language statements.

Sample HTTP request and response

The request consists of an HTTP GET to the Google Ads API server at the following URL:

https://googleads.googleapis.com/v0/googleAdsFields/{resource_or_field}

The following is an example of a request followed by the response returned from GoogleAdsFieldService for ad_group resource:

Request

https://googleads.googleapis.com/v0/googleAdsFields/ad_group

Response

{
  "resourceName": "googleAdsFields/ad_group",
  "name": "ad_group",
  "category": "RESOURCE",
  "selectable": false,
  "filterable": false,
  "sortable": false,
  "selectableWith": [
    "campaign",
    "customer",
    "average_cpc",
    "device",
    ...
  ],
  "attributeResources": [
    "customer",
    "campaign"
  ],

  "metrics": [
    "conversions",
    "search_budget_lost_impression_share",
    "average_cost",
    "clicks",
    ...
  ],
  "segments": [
    "date",
    "ad_network_type",
    "device",
    ...
  ]
}

For this example, the important arrays are:

selectableWith
Fields and resources that can be selected with the resource.
attributeResources
Resources that can be selected together (implicitly joined to the resource).
metrics
Metrics that can be selected with the resource.
segments
Segment keys that segment the metrics specified in the query.

Metadata details

You can request the catalog via GoogleAdsFieldService at these levels:

Resource
For example, googleAdsFields/campaign.
Resource's field
For example, googleAdsFields/campaign.name.
Segmentation field
For example, googleAdsFields/ad_network_type.
Metric
For example, googleAdsFields/metrics.clicks.

Next steps

Send feedback about...

Google Ads API Beta
Google Ads API Beta
Need help? Visit our support page.