Introduction to the AdWords API

Page content

Introduction to the AdWords API

If you manage multiple ad campaigns for yourself or multiple clients, things can quickly get complicated. If you already have an AdWords account, there’s not much left to do to access the AdWords API.

Register as a Developer

Visit and fill out the basic information requested to get your developer token. Once you’ve received it, you’re ready to go. The AdWords API supports development in Java, Python, PHP, Perl, .NET or Ruby.

Take a look at the developer’s guide. It guides you through the steps of making and structuring a request, retrieving information, and making dynamic changes to your campaigns. The AdWords API is a collection of services, each of which serves a specific purpose. Most applications will connect to more than one of these services. They are:











If you’ve already used the traditional AdWords interface, you’ll be familiar with most of these concepts. The above services are simply analogues of those you find by navigating the AdWords interface. The advantage to using these API services is that common tasks can be performed without your input.

You are billed $0.25 per 1000 API units. Keep in mind that one request can perform several unit operations. Changing a keyword bid or checking traffic for one keyword would each be considered single operations. Be careful to accurately forecast how many requests you expect to make so you don’t go over your budget.

To make a request in your language of choice, decide which service you would like to make a request to. For example, if you’re using version 12 of the AdWords API, the request address for KeywordToolService would look like this:

In each case, simply replace “v12” with whatever your version number is, and “KeywordToolService” with the proper name of the service you wish to access. Each language’s specific access methods will differ.

As an example of what you might like to do, imagine you want to estimate the traffic of a few keywords geared to Spanish speakers, each of which had been defined previously, possibly by a client. Then, using Ruby, you might type the following:

campaign =

campaign.languageTargeting = ‘sp’

campaign.geoTargeting = ‘sp’ #for Spain

You would then provide your preferred keywords, sort them, and perform operations on them — perhaps you want to bid on the lowest priced, or those which have historically been most profitable for you.

Dive into the API at

There, you’ll find code examples in several languages, an introduction to WSDL, REST, and SOAP, and information on the latest rates and fees.