原文:
https://developers.google.com/google-ads/api/docs/concepts/api-structure
API Structure
The Google Ads API consists of resources and services. A resource represents a Google Ads entity, while services retrieve and manipulate Google Ads entities.
Object hierarchy
A Google Ads account can be viewed as a hierarchy of objects.
Object hierarchy
A Google Ads account can be viewed as a hierarchy of objects.
Each account contains one or more active campaigns.
Each Campaign
contains one or more ad groups, used to group your ads into logical collections.
Each AdGroup
contains one or more ad group ads. An AdGroupAd
represents an ad that you're running.
You can attach one or more AdGroupCriterion
or CampaignCriterion
to an ad group or campaign. These represent criteria that define how ads get triggered.
There are many criterion types, such as keywords, age ranges, and locations. Criteria defined at the campaign level affect all other resources within the campaign. You can also specify campaign-wide budgets and dates.
Finally, you can attach extensions at the account, campaign, or ad group level. Extensions allow you to provide extra information to your ads, like phone number, street address, or promotions.
Object IDs
Every object in Google Ads is identified by its own ID. Some of these IDs are globally unique across all Google Ads accounts, while others are unique only within a confined scope.
Object ID | Scope of Uniqueness | Globally Unique? |
---|---|---|
Budget ID | Global | Yes |
Campaign ID | Global | Yes |
AdGroup ID | Global | Yes |
Ad ID | Ad Group | No, but (AdGroupId , AdId ) pair is globally unique |
AdGroupCriterion ID | Ad Group | No, but (AdGroupId , CriterionId ) pair is globally unique |
CampaignCriterion ID | Campaign | No, but (CampaignId , CriterionId ) pair is globally unique |
Ad Extensions | Campaign | No, but (CampaignId , AdExtensionId ) pair is globally unique |
Feed ID | Global | Yes |
Feed Item ID | Global | Yes |
Feed Attribute ID | Feed | No |
Feed Mapping ID | Global | Yes |
Label ID | Global | Yes |
UserList ID | Global | Yes |
These ID rules can be useful when designing local storage for your Google Ads objects.
Some objects can be used for multiple entity types. In such cases, the object contains a type
field that describes its contents. For example, AdGroupAd
can refer to a text ad, hotel ad, local ad, etc. This value can be accessed through the AdGroupAd.ad.type
field, and returns a value in the AdType
enum.
Resource names
Each resource is uniquely identified by a resource_name
string, that concatenates the resource and its parents into a path. For instance, campaign resource names have the form:
customers/customer_id/campaigns/campaign_id
So for a campaign with ID 987654
in the Google Ads account with customer ID 1234567
, the resource_name
would be:
customers/1234567/campaigns/987654
The GoogleAdsService
is the unified object retrieval and reporting service of the Google Ads API. The service has methods that:
- Retrieve specific attributes of objects.
- Retrieve performance metrics for objects based on a date range.
- Order objects based on their attributes.
- Use conditions to indicate which objects you want returned in the response.
- Limit the number of objects returned.
The GoogleAdsService
can return results in two ways:
GoogleAdsService.SearchStream
returns all rows in a single streaming response which is more efficient for large (greater than 10,000 rows) result sets. This may be more appropriate if your batch application wants to download as much data as fast as possible.GoogleAdsService.Search
will break up large responses into manageable pages of results. This may be more appropriate if your interactive application displays a page of results at a time.
Learn more about paging versus streaming.
Key Point: If you are migrating from the AdWords API, you can think of GoogleAdsService
as a combination of the object management services and the reporting service.
Making a request
The search method requires a SearchGoogleAdsRequest
, which consists of the following attributes:
- A
customer_id
. - A Google Ads Query Language
query
that indicates which resource to query, the attributes, segments, and metrics to retrieve, and the conditions to use to restrict which objects are returned. - (
GoogleAdsService.Search
only) Apage_size
to indicate how many objects to return in a single response when using paging. - (
GoogleAdsService.Search
only) An optionalpage_token
to retrieve the next batch of results when using paging.
For more information on the Google Ads Query Language, check out the Google Ads Query Language guide.
Processing a response
The GoogleAdsService
returns a list of GoogleAdsRow
objects.
Each GoogleAdsRow
represents an object returned by a query, and consists of a set of attributes that are populated based on the fields requested in the SELECT
clause. Attributes not included in the SELECT
clause are not populated on the GoogleAdsRow
objects in the response.
For example, although an ad_group_criterion
has a status
attribute, the status
field of the row's ad_group_criterion
attribute is not populated in a response for a query where the SELECT
clause does not include ad_group_criterion.status
. Similarly, the campaign
attribute of the row is not populated if the SELECT
clause does not include any fields from the campaign
resource.
Each GoogleAdsRow
can have different attributes and metrics from another row in the same result set; so the rows should be viewed as objects rather than fixed rows of a table.
Segmentation
The response will contain one GoogleAdsRow
for each combination of the following:
- instance of the main resource specified in the
FROM
clause - value of each selected
segment
field
For example, the response for a query that selects FROM campaign
and has segments.ad_network_type
and segments.date
in the SELECT
clause will contain one row for each combination of the following:
campaign
segments.ad_network_type
segments.date
Note: Results are implicitly segmented by each instance of the main resource, not by the values of the individual fields selected. For example,
SELECT campaign.status, metrics.impressions FROM campaign WHERE segments.date DURING LAST_14_DAYS
will result in one row per campaign, not one row per distinct value of the campaign.status field.
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 and SearchStream methods. 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
Note: The example shows the underlying HTTP/JSON request as a guide, but you are strongly encouraged to use one of the client libraries based on gRPC to submit your requests.The request consists of an HTTP GET
to the Google Ads API server at the following URL:
https://googleads.googleapis.com/v7/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/v7/googleAdsFields/ad_group
Response
{
"resourceName": "googleAdsFields/ad_group",
"name": "ad_group",
"category": "RESOURCE",
"selectable": false,
"filterable": false,
"sortable": false,
"selectableWith": [
"campaign",
"customer",
"metrics.average_cpc",
"segments.device",
...
],
"attributeResources": [
"customer",
"campaign"
],
"metrics": [
"metrics.conversions",
"metrics.search_budget_lost_impression_share",
"metrics.average_cost",
"metrics.clicks",
...
],
"segments": [
"segments.date",
"segments.ad_network_type",
"segments.device",
...
]
}
For this example, the important arrays are:
attributeResources
- Resources that can be implicitly joined to the resource in the
FROM
clause. metrics
- Metrics that are available to be selected with the resource in the
FROM
clause. Only populated for fields where thecategory
isRESOURCE
. segments
- Segment keys that can be selected with the resource in the
FROM
clause. These segment the metrics specified in the query. Only populated for fields where thecategory
isRESOURCE
. selectableWith
- Fields that can be selected alongside a given field, when not in the
FROM
clause. This attribute is only relevant when identifying resources or segments that are able to be selected in a query where they are not included by the resource in theFROM
clause. As an example, if we are selectingad_group.id
andsegments.date
fromad_group
, and we want to include attributes fromcampaign
, we would need to check thatsegments.date
is in theselectableWith
attribute for campaign, since it's being selected alongside the existingsegments.date
field.
Metadata details
You can request the catalog using the GoogleAdsFieldService
at these levels:
- Resource
- For example,
googleAdsFields/campaign
. - Resource's field
- For example,
googleAdsFields/campaign.name
. - Segmentation field
- For example,
googleAdsFields/segments.ad_network_type
. - Metric
- For example,
googleAdsFields/metrics.clicks
.
https://developers.google.com/google-ads/api/docs/migration
Migrating from the AdWords API to the Google Ads APIbookmark_border
If you have already used the AdWords API, the credentials you were using will still be valid for the Google Ads API: you don't need to request a new developer token or to create new OAuth2 clientId and clientSecret pairs.
Note: If you have never used the AdWords API, consider reading Get Started to understand how to obtain access credentials.Using a client library
If you were using one of the AdWords API client libraries, you can download one of our Google Ads API client libraries and begin working straight away. Refer to the client library's README for instructions on how to set up the configuration file.
In most cases, your existing configuration can be reused when migrating from the AdWords API client libraries to Google Ads API client libraries.
Java configuration example
For the Java client library, you can just copy the lines in your ads.properties
file that specify the credentials and change the api.adwords
prefix in each key to api.googleads
:
api.adwords.clientId --> api.googleads.clientId
api.adwords.clientSecret --> api.googleads.clientSecret
api.adwords.refreshToken --> api.googleads.refreshToken
api.adwords.developerToken --> api.googleads.developerToken
Once you've updated the configuration file, you can proceed to make your first call:
- In your IDE, open GetCampaigns.cs and execute it.
- The console should print a listing of the campaigns in your account.
Code examples
The client libraries also provide step-by-step code examples showing how to migrate from the AdWords API to the Google Ads API.
Not using a client library
If you were using the AdWords API without a client library and want to keep doing so with the Google Ads API, you can still use your credentials.
Head to the call structure guide to see how to use them to perform requests against the Google Ads API using REST over HTTP.
Note: although you can technically send requests directly to the Google Ads API using REST over HTTP, the suggested way to connect with the Google Ads API is through one of the supplied client libraries.
https://developers.google.com/adwords/api/docs/guides/start
Get Startedbookmark_border
The AdWords API allows apps to interact directly with the Google Ads platform, vastly increasing the efficiency of managing large or complex Google Ads accounts and campaigns. Some typical use cases include:
- Automated account management
- Custom reporting
- Ad management based on inventory
- Manage Smart Bidding strategies
With the AdWords API you can build software that manages accounts from the customer level down to the keyword level. The API can do almost everything the Google Ads UI does, but programmatically.
Types of companies that have benefited from the AdWords API include:
- Ad agencies
- Search Engine Marketing (SEM) companies
- Big brands managing a large number of accounts, with needs beyond what's possible within the Google Ads UI.
The AdWords API relies on SOAP and WSDL technologies to offer its services. To help you get started, we offer client libraries in Java, .NET, Python, PHP, Perl, and Ruby.
Is the AdWords API right for you?
The AdWords API is very powerful, but it's a serious commitment. Several versions are released, deprecated, and sunset each year. Make sure you have the engineering resources to deal with this, and that you have a business need that's not met by other Google Ads tools. Here are some general guidelines:
Tool: | AdWords API | Google Ads scripts | AdWords Editor | Google Ads manager account |
---|---|---|---|---|
Requires: | Dedicated engineering resources | Few or occasional engineering resources | No engineering resources | No engineering resources |
Provides: |
Customized reporting Integration with your enterprise's software/platform Automated account management |
Automation of common procedures with simple scripts Account alerts External, feed-based triggers |
Bulk editing tools for quick multiple changes Easy access to statistics for multiple campaigns Ability to copy or move items between ad groups and campaigns. |
Account-level or campaign-level reporting Cross-account campaign data monitoring Efficient management of large Google Ads accounts |
Next steps
-
Try making an API call.
-
Brush up on AdWords API concepts. You can also see diagrams of entity relationships.
-
Browse Best Practices and other performance guides to establish a solid foundation for your app.
-
Check out our success stories to learn how digital marketing leaders are using the AdWords API.
-
If you have questions, check out the FAQ or visit the AdWords API forum.
https://developers.google.com/adwords/api/docs/guides/first-api-call
Make Your First API Callbookmark_border
In this guide we're going to get you to your first API call, breaking it down step by step. This will open the door to take full advantage of the AdWords API.
The video uses Java and Eclipse, but you can use the language and client library of your choice. The concepts are similar, and instructions are provided below for all supported languages.
Overview of the process
You set up API access by obtaining a few required authentication credentials, creating some test accounts, and adding the authentication and account details to a configuration file for your client library.
Once the config file is set up, you're ready to make calls against the API. Here are the steps to get going:
- Request a developer token.
- Create test accounts.
- Get a client library.
- Set up authentication via OAuth2.
- Get an OAuth2 refresh token and configure your client.
- Make your first API call.
Request a developer token
A developer token from Google allows your app to connect to the AdWords API. If you haven't already, perform the steps in the Sign Up guide to obtain a developer token. After signing up, you'll receive a developer token that is pending approval.
While you're waiting for your developer token to be approved, you can start developing immediately with the pending token you received during sign up, using a test manager account (see below).
Your pending developer token must be approved before using it with production Google Ads accounts.
Create test accounts
Perform the following steps to create a test manager account, a test client account, and a few campaigns to populate the test client account.
Key Point: Calls to test accounts won't serve ads, nor do they count against any limits.
- Go to the Google Ads manager accounts page and create a test manager account.
- Use the Google Ads UI to create a test client account under the test manager account you created above. While logged in to Google Ads as your test manager account, any client accounts you create will automatically be test accounts.
- Create a few test campaigns under the test client account in the Google Ads UI.
- Take note of the client customer ID for the new test client account, and save it. You'll add this to your config file later.
Note that "client" here refers to a Google Ads client account and not the client app you're building.
Use the developer token of your production manager account when making requests against the test manager account. Even if it's not approved yet, the token will still work on test accounts, including the ones you just created.
Get a client library
The client libraries handle all the backend API calls for you, and expose friendly objects to work with, including code samples for practically every common API task.
If you're an experienced developer, you probably already have your development environment set up the way you want it. If not, we'll walk through the recommended setup for the client libraries now.
Click the tab below for the language you're using, and follow the instructions.
- Refer to the Getting Started section of the Java client library README file in GitHub to download and install the AdWords API client library for Java.
- Return to this page prior to performing the OAuth2 steps: We'll set up the OAuth2 credentials in the next step below.
Set up OAuth2 authentication
Your app will need to access user data and contact other Google services on your behalf. Authentication via OAuth2 allows your app to operate on behalf of your account.
To enable your app to access the API, you need an OAuth2 client ID and client secret.
Key Point: "Client" in this case refers to your client app and not to a Google Ads client account.
- While logged in with your manager account credentials, open the Google API Console Credentials page.
- Click Select a project, then NEW PROJECT, and enter a name for the project, and click Create.
- Select Create credentials and choose OAuth client ID.
- You may be prompted to set a product name on the Consent screen; if so, click Configure Consent Screen, supply the requested information, and click Save to return to the Credentials screen.
- Under Application type, select Desktop app for this tutorial. Enter a name in the space provided. For the AdWords API, Desktop app is the option to choose for an installed application flow. Before you build your app, you'll want to read up on the difference between installed and web applications, and choose the appropriate type for the app you're building.
- Click Create. The OAuth2 client ID and client secret appear. Copy and save these items. You will add them to your configuration file in the next step.
Get an OAuth2 refresh token and configure your client
Because OAuth2 access expires after a limited time, an OAuth2 refresh token is used to automatically renew OAuth2 access.
Click the tab for the programming language you're using, and follow the instructions to generate an OAuth2 refresh token, and set up the configuration file for your client.
- Follow these instructions in GitHub to get an OAuth2 refresh token and configure the client library.
- Return to this page when you're done. After completing the steps, your ads.properties file should have all you need to make test API calls, and should contain values similar to the following:
-
[...]
api.adwords.developerToken=123axxxxxxxxxxxxxxxxxx
api.adwords.clientId=xxxxxxxxxx.apps.googleusercontent.com
api.adwords.clientSecret=zZxxxxxTxxxxxxxxxxx
api.adwords.clientCustomerId=123-456-7890
api.adwords.refreshToken=1/dyOIp7ki-xxxxxxxxxxxxxxxxxxxxxxxx
api.adwords.userAgent=Company_Name
[...]
Make your first API call
Now that your environment and config file are all set up, it's time to make your first API call:
- In your IDE, open GetCampaigns.java and execute it.
- The console should print a listing of the test campaigns you added to your test account above.
Congratulations, you've now made your first AdWords API call.
We've covered a lot of ground in this section. In the next section, we'll review and look in more detail at some of the configuration elements we worked with in this part.
Reviewing the configuration elements
In the previous section, we got you all set up to make your first API call. In this section, we'll recap and look in more detail at the app configuration elements we used to make a call against the AdWords API.
Test vs. production accounts
In the previous section you created a test manager account, and a test client account. Test accounts are a useful way to experiment with the API, because they won't affect your live ads, or charge your account. They're also great for playing with the Google Ads UI without consequences.
When signed in to the Google Ads UI, the bright red test account label reminds you that you're in a test account:
If you don't see the red Test account label on your Google Ads account page, then the account is a production account.
Because test accounts don't serve any actual ads, impressions or cost data will often be zeroed out in reports or API calls. For more information on test accounts, production accounts, and setting up an account hierarchy, see Managing Accounts.
Configuration elements
Because we're using a client library, we won't go into the back-end details about how API calls are made. But if you want to know more about SOAP, OAuth2, and the other plumbing that makes these calls work, see API Call Structure.
Even when using the client libraries, there are some elements you'll always need; we've already set them up above, but let's review and explain them a bit more here.
Note that all the elements in this section are found in the configuration file of the client library for the language you're using.
Developer token
The developer token identifies your app to the AdWords API. Only approved tokens can connect to the API for production Google Ads accounts; pending tokens can connect only to test accounts. Once your token is approved, you can use the same token for requests against all your Google Ads accounts, even if they're not linked to the manager account associated with the developer token.
You can retrieve your developer token by signing in to your manager account then going to the AdWords API Center page (Tool icon > SETUP > API Center).
See Managing Accounts for more details.
OAuth2 client ID and client secret
These map your client application to a project in the Google Developers Console, and are used for OAuth2 authentication, which allows your app to operate on behalf of your account.
Key Point: "Client" here refers to the client app you're building and not to a Google Ads client account.
See OAuth2 Authentication for more details.
OAuth2 access and refresh tokens
Before your app can access private data using the API, it must obtain an OAuth2 access token that grants access to the API.
If you're using the client libraries, the OAuth2 access token is automatically taken care of for you. Otherwise, see the API call example in the API Call Structure guide for details on how to generate an access token.
OAuth2 access tokens expire after a limited time. For this reason, the client libraries use the OAuth2 refresh token to automatically regenerate the OAuth2 access token.
You created the refresh token in the steps above by means of a utility in the client library.
For more information on using OAuth2 with Google APIs see OAuth2 Authentication and the OAuth2 Identity Platform documentation.
Client customer ID
The client customer ID is the account number of the Google Ads client account you want to manage via the API, usually in the form 123-456-7890
.
Key Point: "Client" here refers to the Google Ads client account and not to your client app.
Optionally, the client customer ID can be left out of the config file and set programmatically. Once your developer token is approved, you can use a client customer ID from a production account, instead of a test account.
Next steps
Now you understand all the ingredients needed for your first API app. In the next guide, Code Structure, we'll look at how the client libraries and code samples can get you started with custom reporting and automation.
Sign Upbookmark_border
To use the AdWords API, you must request and be granted access as described below.
Step 1: Choose or create a Google Ads Manager account
You must have a Google Ads Manager Account to apply for access to the API.
Manager Accounts cannot be created using the same email address as an existing Google Ads account. You must therefore use an email address that hasn't already been associated with a Google Ads account to create your Manager Account.
Note that the Manager Account you select has no effect on the set of Google Ads accounts that your API token can access. However, linking this Manager Account to your company's active Google Ads accounts will streamline the app review process, and reduce the number of times you need to go through the authentication process to manage your accounts via the API. For details, see the Help Center article about linking accounts.
Step 2: Apply for access to the AdWords API
Sign up for AdWords API access through your Manager Account. Sign in, then navigate to TOOLS & SETTINGS > SETUP > API Center. The API Center option will appear only for Google Ads Manager Accounts.
All fields on the API Access form must be completed, and the Terms and Conditions accepted. Make sure your information is correct and your company's website URL is functioning: If the website is not a live page, we won't be able to process your application.
Make sure the API contact email you provide leads to a regularly-monitored inbox. If we cannot contact you via this email address, we won't be able to process your application, and it will be rejected.
You can edit your API contact email in the API Center.
We strongly encourage you to keep this information up to date, even after the application process, so we can send you important service announcements.
Step 3: Continue your application
To ensure the tool or software app you propose to use with the AdWords API is in compliance with our Terms and Conditions and Policies, including Required Minimum Functionality (RMF) (if applicable), click the Apply for Basic Access link in the API Center, and complete the AdWords API Token Application form.
Note: If your company manages Google Ads accounts for clients, you must be in compliance with our Third Party Policy to gain access to the AdWords API.
We typically contact you within two business days of the date you submitted your application, at the email address you provided in Step 2: If you no longer have access to this inbox, or if you're not planning to actively monitor this email address, edit your email address in the API Center by following the instructions above in Step 2, so we can contact you.
Note: Your application will need to be approved (see below). However, you can start developing and experimenting with the API immediately, using test accounts. See Make Your First API Call for details.
Token review team has approved my developer token
Your assigned developer token will be activated once your application for API access is approved. Your token will be available through your API Center—accessible through the Account settings menu for the Manager Account from which you applied. You'll be able to access the API by including it in your request headers when interacting with our system.
It's very important that you keep your contact email current, as we send important information regarding changes or disruptions to service to the email address you specify.
If you make any changes to your tool in the future, you must report these changes to Google, per the AdWords API Terms and Conditions, section II-5. You may report these changes by filling out this form.
Token review team has rejected my application
The Token Review team examines the information you provide when you apply for access to the AdWords API, to make sure your software adheres to the AdWords API Terms and Conditions (T&C) as well as the Required Minimum Functionality (RMF) (if applicable).
Common reasons for rejecting an application include:
- We're unable to reach you at the contact email address you provided.
- You have applied because a tool you use from a third party requires a developer token.
- Your application violates other provisions in the Terms and Conditions.
- Your application does not implement required elements of the Required Minimum Functionality (if applicable).
If you have altered your API tool to adhere to AdWords API policy, or if you believe your application was incorrectly rejected, you can reapply by clicking the Reapply link in the API Center page of your Manager Account.
If you haven't received an email from us about your application within the expected time, fill out this form.
Billing
There is no charge for AdWords API usage. The AdWords API provides two access levels: Basic and Standard.
- Basic
- This is the default access level for all approved developer tokens. This access level allows developers to execute up to 10,000 operations and 1,000 report downloads per day.
- Standard
- This access level is for those needing more than 10,000 operations or 1,000 report downloads per day. To qualify for this access level, developers must provide additional details and keep these details current with Google.
For more details about the access levels, see the rate sheet.
Next steps
Once you've received a developer token, you can start developing and experimenting with the API immediately, even if your token is still pending approval. See Making Your First API Call to get started.
Create a Google Ads manager account
A manager account is a Google Ads account that lets you easily view and manage multiple Google Ads accounts -- including other manager accounts -- from a single location.
This article explains how to create manager accounts. You may want to begin by first reading About manager accounts.
Instructions
Here’s how to create a manager account:
- Visit the Google Ads manager account homepage and click Create a manager account.
- If you’re not signed in already, sign in using the email you’d like to use to manage your new manager account.
- You can use the same email address for up to 20 Google Ads accounts (including manager accounts). Learn more about associating multiple accounts.
- Give your manager account a name. This is the name that your clients will see in their client account.
- Choose how you plan to use the account, either as an account to manage your own multiple Google Ads accounts, or to manage other people’s accounts.
- Select your country and time zone. This time zone will be used for your account reporting and billing and can’t be changed. You might want to choose the time zone you work in.
- Select a permanent currency for your account. You might want to choose the currency in which you do business. Your client accounts will be billed in their individual chosen currencies. Keep in mind that when you’re checking performance or budget information across accounts in your manager account, you’ll have the option to see any cost-related information converted to the currency used by your manager account. Learn more about converting currencies in your manager account.
- Click Explore Your Account to get started.
ntity Relationshipsbookmark_border
This page presents relationship diagrams of Google Ads entities, with clickable images that take you to the most appropriate documentation.
Notation legend
- Entity: links to the most relevant guide.
- Cardinality: Allowable number of instances. For example,
1..*
means that one or more are allowed. However, this does not imply that there are no limits. - Object/Class: links to the latest reference page.
- A solid-line box denotes mandatory groupings. For example, Campaign Groups belong to Account.
- A dotted-line box denotes optional groupings. For example, a Campaign can belong to a Campaign Group or just exists under an account without any associated Campaign Group.
- A solid line between two boxes establishes a relationship. Cardinality for the relationship is noted beneath the line. For example, zero to many Ad extensions can be associated with an Account.
- Composition: Denoted by a solid rhombus, represents a relationship where an entity is composed of some other entities. For example,
ExtensionSetting
is composed ofExtensionFeedItem
objects. - Inheritance: Denoted by a hollow triangle, represents an "IS-A" relationship where an entity is a sub-type of another. For example,
AppFeedItem
is a type ofExtensionFeedItem
.
Entity diagrams
Top Level
Labels
Ad extensions
Bidding strategy configuration and bidding
Ads
https://developers.google.com/adwords/api/docs/guides/bestpractices
https://developers.google.com/adwords/api/docs/guides/first-api-call
https://developers.google.com/google-ads/api/docs/query/overview
https://developers.google.com/google-ads/api/docs/reporting/paging
https://developers.google.com/google-ads/api/docs/reporting/streaming
https://developers.google.com/google-ads/api/docs/reporting/example
https://github.com/googleads/google-ads-dotnet
Reportingbookmark_border
Reporting of performance data is an integral part of Google Ads API applications. With the API's flexible reporting options, you can obtain performance data for all resources. This includes everything from an entire campaign to a set of keywords that triggered your ad.
This guide describes the steps necessary to create and submit a query to the Google Ads API to get back data. To get started, jump to the section that best fits your use case:
- Try a quick example
- Retrieve criteria performance metrics
- Learn about segmentation
- Find out how to handle zero impressions
- Learn about using labels to report on your data
- Learn about streaming your reporting data
- Learn about paging your data
- Learn about mapping UI reports to API usage
- Learn the syntax of the Google Ads Query Language
Getting started
-
Apply for a developer token if you don't already have one.
-
Try making an API call.
-
Read up on API concepts.
-
Review the entity relationship diagrams.
-
Browse the Migrating to Google Ads API guide.
-
Visit our support forum if you encounter problems.