The AdWords API will sunset on April 27, 2022.
Upgrade to the Google Ads API.
Google's AdWords API service lets developers design computer programs that interact directly with the AdWords platform. With these applications, advertisers and third parties can more efficiently -- and creatively -- manage their large or complex AdWords accounts and campaigns.
AdWords API Perl Client Library makes it easier to write Perl clients to programmatically access AdWords accounts.
NOTE: If you are using Windows, go through the instructions under What if I'm using Windows? first before continuing here.
Download the newest version from releases or from CPAN Google::Ads::AdWords::Client.
Install dependencies.
$ perl Build.PL
$ perl Build installdeps
Copy the sample adwords.properties for your product to your home directory and fill out the required properties.
Setup your OAuth2 credentials.
The AdWords API uses OAuth2 as the authentication mechanism. Follow the appropriate guide below based on your use case.
If you're accessing an API using your own credentials...
If you're accessing an API on behalf of clients...
There are code examples for most of the common use cases in the repository. These code examples are also available as part of the release distributions. You can also refer to the wiki articles for additional documentation.
Examples can be run by executing the following on the command line
from a sub-directory of the examples/
directory,
$ perl Example.pl
Some examples require you replace object IDs in where you see placeholder
like INSERT_***_HERE
The client library uses a custom class for all logging. Check out our logging guide on GitHub for more details.
The library is only supported on Windows for ActivePerl 5.14+ x86 (32bit version).
Before following the Getting started steps:
ppm install MinGW
in the command prompt.installdeps
errors on Crypt::OpenSSL::RSA
stating that it cannot find .h files:
<openssl_dir>
e.g. C:\openssl
. Note the root location or your Perl
installation e.g. C:\Perl
. This will be referred to as <perl_dir>
.<openssl_dir>\include directory
to <perl_dir>\lib\CORE
.<openssl_dir>\bin
to <perl_dir>\lib\CORE
.<openssl_dir>\lib
to <perl_dir>\lib\CORE
.See the guidelines for contributing for details.
Please report issues at https://github.com/googleads/googleads-perl-lib/issues
If you have questions about the client library or AdWords API, you can ask them at the AdWords API Forum.