Here's a checklist to get you started on your migration:
Review the mappings from the AdWords API to the Google Ads API:
Check out these tools:
Accept the updated Terms and Conditions and update your contact information in the API center.
- Sign in to the API Center of the manager account where you have your
developer token:
ads.google.com/aw/apicenter
. - Scroll down to API contact email and update it.
- Scroll down to Principal place of business, accept the new conditions, and click Save.
- Sign in to the API Center of the manager account where you have your
developer token:
Enable the Google Ads API in your Google Cloud project.
- Open the API library in the Google API console. If prompted, select your project or create a new one. The API library lists all available APIs, grouped by product family and popularity.
- Use search to find the Google Ads API if it isn't visible in the list.
- Select the Google Ads API, then click the Enable button.
If you have already used the AdWords API, the credentials you were using will still be valid for the Google Ads API. Do not request a new developer token or create new OAuth2
clientId
andclientSecret
pairs.Select a client library.
Go through the Quickstart guide to make your first call.
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 immediately. 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. One key difference is
the new login-customer-id
. Our guide
has information on when you need to add this to your configuration.
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:
Java
- In your IDE, open GetCampaigns.java and execute it.
- The console should print a listing of the campaigns in your account.
C#
- In your IDE, open GetCampaigns.cs and execute it.
- The console should print a listing of the campaigns in your account.
PHP
- Execute GetCampaigns.php.
- The console should print a listing of the campaigns in your account.
Python
- In your IDE, open get_campaigns.py and execute it.
- The console should print a listing of the campaigns in your account.
Ruby
- On the command line, execute get_campaigns.rb
by typing:
ruby get_campaigns.rb
- The console should print a listing of the campaigns in your account.
Perl
- Execute get_campaigns.pl.
- 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.
Java
C#
PHP
Python
Ruby
Perl
Alternatives to 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 REST guide to see how to use credentials to perform requests against the Google Ads API using REST over HTTP.