Yuma 4×4

Media and Communications

AdWords API Intro

AdWords API Intro

PAUL MATTHEWS: Hello. I’m Paul Matthews. I’m a Developer Programs
Engineer on the AdWords API. MARK BOWYER: And I’m Mark
Bowyer, a Developer Advocate on the same team. PAUL MATTHEWS: We’re going
to talk to you about the AdWords API. And in particular, we’re going
to talk to you about how to start with the AdWords API. So this is really taking a fresh
look if you’re maybe new to the API or if there’s just
some aspects of the API that you don’t currently
understand. MARK BOWYER: Please keep in
mind that you can scroll backwards and forwards through
this as often as you want. We put title slides in here, so
you can easily find the bit that you want to find– loads of links over the top of
this that you can click on to go and see the reference
material we’re telling you about. And just come back to us when
you’ve read up on what you need to know and find out
about the next bit. PAUL MATTHEWS: So in this
session, we’re going to look at what the AdWords API is,
how you might go about interacting with it, how to
create a first request– so how to build up that
first request and make a call to our service. We’re going to look at the
reporting aspects of the AdWords API, tools that surround
the AdWords API, and then we’re going to look at
the manual, which is the really important part for
understanding the documentation that’s
available to you. And finally, we’re going to
look at how we support the AdWords API and how that can be
useful to you, and how to contact us. MARK BOWYER: So what is it? And what can you do with it? Well, AdWords is for managing
your adverts on either Google Search or Display Network. Optimizing your ads, getting
ad ideas to come up with an extension of what you’re already
doing in your ads. And then we give you a web
interface for users to go in, set up their ads, line up the
text for it, add anything that they want on to there,
and then set them up to go and serve. Then once you know what you’re
doing with your ads, you may want to automate or grow the way
that you’re managing it. And we provide an API, so you
have programmatic interaction with your ads. And also, you can integrate the
data within your ads to, say, your own software that
you already have managing other parts of your business. PAUL MATTHEWS: So that’s what
the AdWords API is. Now, what can you do with it? Well, for starting off, the main
use that you’re going to use the AdWords API
for is retrieval. So that means that you can get
all your information that’s currently stored in AdWords–
all those campaigns, all those accounts, all those ad groups
and criteria that you’ve set up with it. And you can get that information
back so that you can keep a local store of it
for whatever purposes. Then you can use the AdWords API
to manage those entities. So basically, you can interact
with your ads. You can interact with
your campaigns. You can interact with your
criteria and really affect how your ads are displayed. You can adjust your bidding so
that you can up your bids, or adjust it so that you’re getting
more effective bidding strategies. You can adjust your targeting. So you make sure that you’re
really finely tuning your ads to the right people. And finally, you can update
your ad text. With all of that, you can
also do bulk uploads. So if you’re considering putting
in a lot of new ads into the system or doing a lot
of mutations to your campaigns and things, then you can
do that using the API. And you can bulk upload that. And finally, you can do
keyword research. So that means if you know
roughly what sort of keywords you want to target, but you’re
not exactly sure of the entire landscape the other keywords
are maybe associated to it, then you can do some keyword
research, which can offer you some really good alternatives. So the main purpose of the
API is automation. This is for you to automatically
interact with our services without having to
have a user sit there and do anything with them. So for instance, you might use
some sort of script that would automatically adjust your bids
on your umbrellas if today was a wet day and you knew that
customers were more likely to buy on a wet day. You can also do updates
across your account. So if, for instance, you wanted
to update all of your bids globally to outbid your
competitors, then you would be able to just do an automatic
up-bid of 10% more, for instance. It also allows you to hook
in to your applications. So if you happen to have,
let’s say, an e-commerce platform, and you wanted to
hook your ads into your inventory management, then
perhaps you could set up a link between the two
applications so that when you run out of inventory of
something, you would turn off an advertisement. Or as you got more inventory,
you would up your ads to make more of a presence on that
to improve your return on investment. And then finally, you can do
a lot of reporting with the AdWords API. So what that means is it allows
you to collect reports for your account– so, for
instance, things like impressions. And you can really retrieve a
lot of information on how your ads are doing. It’ll also allow you to gather
all of your information in a structured way very
simply and easily. But more on that later. MARK BOWYER: So how
do you use it? PAUL MATTHEWS: So for starters,
the main concepts you want to understand are the
entities and the services. And more on services
in a second. But right now, we’re going
to look at the entities. So, entities are concepts that
should be pretty familiar with you at this point in time. So, for instance, Customer. That’s you. That’s how you log in. You’ve got your ad groups. So that’s the groups of ads. You’ve got your ads themselves, campaigns, and criteria. So these are entities that
live within our system. And then the services
allow you to interact with those entities. So, for instance, if we have a
look at the campaign service, then that will allow
you to interact with a campaign entity. So, for instance, if you wanted
to retrieve information about the current campaigns
that are already in your AdWords accounts, then you could
use a selector object sent to the get action on
the campaign service. And it’ll allow you to retrieve
information about your campaigns. Then you can do operations. So once you’ve got this
information, then perhaps you want to adjust this
information– for instance, adjusting your
ad text or adjusting your campaign targeting. And basically, you send an
operation object to the mutate action of the service
that allows you to affect a campaign. And finally, you
can do queries. So this is back to reporting. And we’ll talk more about
this later on. But essentially, you don’t need
to send an object to the query action. It’s more of just a string. So it’s a very simple interface
for you there. And that’s the main sort of
strategy you’re going to see with any service in
the AdWords API. MARK BOWYER: So then SOAP. SOAP stands for Simple Object
Access Protocol. And this is the text language
that is used to pass the information from your code back
to our back end and then from our back end back to you. It’s an XML-based form protocol
for exchanging structured information backwards
and forwards between our two sets of code. What does it look like? Well, you can do discovery. There is WSDL, which is Web
Service Definition Language. You do a request on to our
service– you will find this on the documentation pages– that tells you what each service
looks like and what you can do to it. The SOAP request itself
comes in an envelope. It has a header, which then has
your authentication and your authorization information,
and a body, which is the request that you’re
trying to make on our service. You will then get back a
response that’s formatted in a similar way. Finally, we give you logging
and debugging tools. So you can switch on inside
your code using the client library’s logging system that
stores in files each of the requests you make in the
original SOAP and the SOAP response you get back. And you can look through those
and try and figure out what’s just gone wrong for you. Also, because these are just
plain text files, you can just send the XML to our servers
using something as simple as cURL. So you can do it from
the command line. Or you can write a shell script
to try and test out these files. PAUL MATTHEWS: So that brings us
on to the client libraries. And this is really where we
try and help you integrate with our API. So these are libraries that have
been written by Googlers that really aid your integration
with our services. For starters, they’re available
in most of the common languages, such as
Java, Python, Ruby, .NET, PHP, and Perl. And they’re all written in a
very clear, defined way for those languages. So they should become very
familiar for you. They are auto-generated. As Mark was talking about
before, the WSDLs offer a description of the services. So these client libraries are in
a good proportion generated based on the WSDLs available. So that means that they offer
objects that closely map to the API as first world objects
within your application. They come with a load of
utilities that really help you to make the most out of the API
with writing the minimum possible code. So, for instance, we take
care of things, like OAuth2 for you. We try and make just the code
you have to write– just the logic you need to interact
with our services. They also come with utilities
such as safe logging, which means that when you do want to
log a request, if you’re trying to understand what’s
going on, or if you just happen to want to log every
request, then we try and smudge out the sensitive parts
so that there’s no worry about anything that’s being logged. And then, most importantly, the
client libraries come with some really helpful examples. Now, these examples will help
to teach you how to use the APIs in discreet ways to make
requests and get responses. And the examples come
in two parts. So there’s the simple examples,
which are really focusing on how to make a single
request to a service and back again. And they cover most
of the endpoints– certainly the most
popular ones. And they show you how to
construct a request and send it to the services and how
to process the response. And then there’s the advanced
examples, which cover slightly more in-depth. They sort of go over a bunch of
different services to help you achieve a bigger
objective. So, for instance, if you wanted
to interact with the feed services, there’s about
four different endpoints– four different services
you want to talk to. And this shows you how to
construct a request talking to each of those services to link
them all together and to interact and create a feed. And they’re very worthwhile. And there are examples in each
of the client libraries. And they’re definitely
worth a look. MARK BOWYER: So MCCs, developer tokens, and test accounts. Now, MCC stands for My Client
Center, which is a tool for larger advertisers so they can
manage multiple client customer accounts that would
normally be seen in AdWords. So with an MCC account, you
can see the many client advertiser accounts. But you can also have
sub-MCC accounts. And you can therefore have a
hierarchy of managers over account managers and each having
different levels of access over different numbers
of advertisers. Developer tokens are there to
grant your application access to the AdWords system. This is just for the
application. This isn’t how you access
as a log in specific areas of AdWords. You get one in your
AdWords account. And you use it with
every request that you send in to AdWords. It’s in the header. Whether you’re doing any SOAP
endpoint– any reporting– you need to have a developer
token in there to authenticate that this application is allowed
to make this request. The client libraries do some of
the leg work here for you. So you can just put your
developer token into your properties file, and it
will try and do the rest of that for you. You need to apply for the
developer token and have approval of it. As you go on through the process
of developing your application, you will need
to have a fully approved developer token for your
application to have full access to live data
in AdWords. And that process requires you
to go through a compliance test with our terms
and conditions. And it is, please remember, tied
to the application and not to you logging into the
system as an account. Say, it’s authorizing your
application, whereas you have other login information for
saying where you’re allowed to view with your application. PAUL MATTHEWS: I guess also
on that point, we strongly recommend that you do not give
your developer token to anybody else. Because if that does happen,
then it will appear to us as though you are making
these requests. So do not put it
in any forums. Do not put it in any
communications to any other users. And try not to send it to us
over emails or anything like that, either, just for
security’s sake. So that brings us neatly
on to test accounts. Test accounts are essentially
accounts there to help you develop your application. So they are safe accounts. They are not going to
cost you money. So you can test your
application. You can try out new API requests
to them with no fear of any financial implications
of that. So, for instance, they won’t
serve to the display networks or to the Google network. You will just be able to
interact with them, set up campaigns and everything the
way that you would in your application. But then they won’t serve. So this is really useful for
testing manipulation and requests and retrieval
requests. However, for things like
reporting, though you’ll get reports back, you won’t
necessarily get the useful information there. So, for instance, they’re not
going to tell you a lot of information about what you paid
cost per click, because essentially, they haven’t
been displayed. Test accounts, again, require
a developer token. You can’t just call
it a test account without a developer token. But during the approval process,
you’ll be granted a test account should
you be successful. And then you can interact with
a test account before you necessarily go ahead and create
requests that would otherwise cost you money. So, for instance, if you wanted
to up the bids or something like that. And there’s some more information about test accounts. We strongly recommend
you go to that link. MARK BOWYER: So, reporting. PAUL MATTHEWS: So, reporting. We talked about this briefly. So basically, what reporting
offers you is performance statistics. So, reporting allows you to get
information about how your ads have been displayed during
and also ads that have not yet displayed. So, obviously, they’re going
to be coming back with much less useful information. But they will still appear. So you’ll be able to get
information about what you paid cost per click and also how
you’re spending overall. They also come with resource
statistics, or more to the point, resource data. So, for instance, if you’ve got
text that you want to find out about, if you want to just
retrieve all the information about your keywords that are
there, then you get that information back. How you make requests on the
reporting services is two simple ways. So, firstly, there’s the SOAP
requests, as you do similar to the other services. And they’re very simple
to construct. You just construct a request,
and then you send it to our service. And we respond, in either
CSV or XML. Or you can use this tool called
AWQL, or AdWords Query Language, which Mark is going
to talk about in a second. And the main purpose for
reporting and the main benefit for reporting is it’s
very, very fast. It’s also very easy to use. So it’s a really good starting
point for anybody who’s trying to get information from
their campaigns or from their accounts. It’s a really good
way to understand the data that’s available. And below is a link to the
reports and the different kind of reports available to you and
what information you can get from them. MARK BOWYER: So, AdWords Query
Language, or AWQL. This is a very lightweight,
SQL-like interface that allows you to just send a string with
an SQL looking request to our report systems. And that will then feed you back
the same kind of output that you would get from the
report definition system. It can be CSV. It can be XML. You can request that the file
that comes back, is gzipped up to make it as small
as possible. We have a guide on
how to do this. And you can see that
at the link at the bottom of this page. PAUL MATTHEWS: So now that we
know how to talk to the reports, what are the different uses besides the obvious? So the obvious one is maybe
requesting performance statistics– so, getting
information about how your ads are displaying, what your CPC
is and that sort of thing. So the other main use for
reporting is to get structural information. So if you’re trying to build a
local representation of your ads, of your campaigns, of all
those different entities, then quite often, you can find
that the reports are there to help you. So they’re very quick. And they respond. And they’re very easy to
integrate with, so you can get a full account overview
very quickly. And you can store that perhaps
locally and do processing on it and use it for other means. Then as I said before, so
monitoring performance is the main use for reporting. MARK BOWYER: There is also a
link here to a guide on how to gather the structural
information from reports and build a local SQL database that
you can then run your own requests on. PAUL MATTHEWS: So, AdWords
API scripts. So AdWords Scripts is a
really useful tool to be used with AdWords. Essentially, it’s similar to
the app script interface in that it comes with a web IDE and
allows you to write your scripts online, hosted
on our service. So, for instance, if you don’t
currently have any infrastructure to host an
application to request to our service, then perhaps this is
the way forward for you. So essentially, it offers the
majority of the functionality in a simple JavaScript
interface. But obviously, it’s not
integrated with your applications– with your systems. So this is more for doing things
like, if there’s an API out there that gives you, for
instance, the weather information, and you’re a
umbrella salesman, then you would set up a script that
perhaps would query for weather information, find out
if it’s raining, and then up your bids because it’s
a simple sort of standalone script. And it’s a really useful tool. And I highly recommend
checking it out. It’s actually available inside
your accounts as they are now. You can just go to
Bulk Options. And then there’s scripts
for you. And you can start to
test it there. MARK BOWYER: So, the
reference manual. Inside there, you’ll initially
find information about the client libraries that we’ve just
been telling you about. This also includes the source
of the examples for each of those different languages to
show you how to use these client libraries. Full documentation is also
there for those. Then there are the guides. These have more information
on each of the topics. Talk you through how to use
the services that are available to do various
different use cases that you may have need for to
use with AdWords. For instance, we have stuff
in there on how to use reporting– the structured reporting
we discussed earlier. And the scripts situation that
Paul was talking about, about checking the weather and upping
and downing your bids for umbrellas or maybe sun oil
or whatever to get the right things appearing on pages
when you need them to. We’re frequently adding new
guides to these as well. As new features are added to
AdWords, we write guides to show you how to use
the new features. Then there’s the reference
section, which gives you all the information about the
services and the WSDL files for each of those services. So you can go in, and you can
read about the objects, the inheritance, or hierarchy, the
parameters in the return info that are available from each
of those services, possible error messages that you
can get from them. These work well with
the guides. Once you’ve got the general idea
of what you want to do, you can dig into the reference
manuals for the services you found out about and see
exactly what they make available to you. There are release notes for each
of the current versions of the API that we have out
there for you to use and also the sunset dates. As we continually replace them
with newer and better versions, we let you know how
long the current version is going to last and when you’re
going to need to update to a newer release. Finally, there’s a resources
section that gives you system specific information about
each of the areas. For instance, there’s migration
guides in there that tell you what’s changed from
when we released to the next– so, what changes you need to
make to your code so that it can run with the new
version of the API. There’s also type
information– report types– what you can request and which
fields are available in those reports for you to
make use of. And there are also system codes
in there– so, various bits of explanatory data about
how the API works. Again, there is a link at the
bottom of this page, which will take you in to show you
those documentation pages. PAUL MATTHEWS: So we’ve been
talking about the AdWords API. But what have we actually
covered? So we discussed what the AdWords
API is and what it can do for you. We discussed how you interact
with the AdWords API. And we’ve looked at making a
first request with the client libraries, for instance. Then there’s the reporting
aspects and what that offers for you, and the tools, such as
AdWords scripts, and then we’ve been looking at the manual
on how to make sense of the AdWords API user manual. And now we’re going to just talk
briefly about the support that we offer and how
you can contact us. MARK BOWYER: So, there is a blog
on Blogspot specifically about Google’s Ads developer
program. There’s also, of course, a
+ page that has similar information. We have more depth on the blog
page and more news-like information on the + page. And finally, there is a forum
where you can go meet other people who are also working in
this area and discuss your problems and hopefully get
fixes from the developer program engineers like Paul. And you can discuss
any problems you’re having with them. PAUL MATTHEWS: So we hope this
video has been useful for you. We hope you come back and scrub
through it and seek through it to find the
particular parts that are of most use to you. And there should be plenty of
links in here that will take you to the correct resources
within the AdWords API documentation. And they will help you get to
where you need to go, faster. Thank you. MARK BOWYER: Thank you.

1 thought on “AdWords API Intro

Leave comment

Your email address will not be published. Required fields are marked with *.