googleads-php-lib is the Ad Manager SOAP client, and it is not the Google Ads API library
Google Ad Manager SOAP API Client Library for PHP
At a glance
- What is it?
- googleads-php-lib is the PHP client for the Google Ad Manager SOAP API, versioned to match Ad Manager API releases and requiring PHP 8.0 or higher. It suits publisher side reporting and inventory work, not Google Ads campaign management.
- Who is it for?
- Adopt googleads-php-lib if you build publisher side tooling against the Google Ad Manager SOAP API and you can live with a client that is versioned to the Ad Manager API release cycle. Do not adopt it for Google Ads campaigns, because the README states the AdWords API is sunset and points those users to google-ads-php.
- Can I use it commercially?
- Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 59 days ago.
- What is it written in?
- Mainly PHP, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on October 22, 2026, and from our analysis. They are not legal advice.
Editorial analysis
Publisher side inventory, not advertiser campaigns
The name of this repository invites a wrong assumption, so start by clearing it up. googleads-php-lib is the PHP client library for the Google Ad Manager SOAP API. It speaks to the ad serving and delivery side of a publisher's business: networks, inventory, orders and reporting.
The README says this directly. It opens with the note that the AdWords API is sunset and that you should use the new client library google-ads-php to access the new Google Ads API instead. So the split is: this library for Ad Manager, a different library for Google Ads.
That distinction matters for anyone arriving with an advertiser mental model. An Ad Manager network is a publisher property with inventory sold against it, and the SOAP surface here reflects that. The example tree in the repository makes the shape visible: examples/AdManager/ holds service level examples such as GetAllNetworks.php, and examples/Auth/ holds the OAuth2 helper scripts.
The primary language is PHP, the licence is Apache-2.0, and the top level of the repository is conventional for a Packagist package: composer.json, src/, tests/, phpunit.xml.dist, phpcs_ruleset.xml, a CHANGELOG.md, a LICENSE file, and check_conditions.php for validating the environment.
The client version tracks the Ad Manager API version
The release numbers tell you the important thing about this project. The recent releases are 74.0.0 on 2026-08-24, 73.0.0 on 2026-05-20 and 72.0.0 on 2026-02-25. The repository is not archived and the last push was on 2026-08-24.
Those major versions correspond to Ad Manager API releases, and the code base carries a directory per API version. The example path in the README, examples/AdManager/v202211/NetworkService/GetAllNetworks.php, shows the pattern: a version folder, then a service folder, then a script. When a new Ad Manager API version ships, a new versioned layer appears alongside the old ones, because the SOAP contract changes between API versions and generated code cannot simply be reused.
The practical consequence is that upgrading this library is not a routine composer update. A new major version means new service methods and possibly changed field behaviour, and your code has to be pointed at the version your Ad Manager network actually exposes. The CHANGELOG.md in the repository is where those changes are recorded, since the release notes attached to the tag are not a substitute for it.
One piece of history in the README is worth knowing because it explains the version floor. The final version supporting PHP 7 is v61.0.0, and it covers the Google Ad Manager API versions v202208, v202211, v202302 and v202305.
PHP 8.0 became the floor at version 62.0.0
The library was updated to require PHP version 8.0 as the minimum, as announced in issue 777 in the repository. From version 62.0.0 onward, that requirement applies, and the README explains the practical effect: if you are on an older PHP, the composer command downloads an older version of the googleads/googleads-php-lib library.
That is a friendly failure mode. Composer resolves a compatible version for you instead of erroring out, which means an old PHP runtime silently puts you on an old client, and the old client is v61.0.0 at best. The README also notes that Google Ad Manager API v202305 was scheduled to be sunset in May 2024 and gave PHP 7 users roughly a year to migrate.
The badge in the README states the same requirement, PHP 8.0 or higher. If your deployment target cannot move to PHP 8, this library is a dead end for new work, because the older line stops receiving the newer API versions you need for reporting features.
composer require gives you the library without the examples
Composer is the supported way to install this package, and the README assumes a global Composer installation available as composer on the command line. Requirements and dependencies live in composer.json, and the library is stored under the vendor/ directory once installed.
$ composer require googleads/googleads-php-libAfter that the README asks you to follow the getting started section for the ini file, and to set up OAuth2 credentials if you have not already.
The catch, stated in bold in the README, is that examples are not downloaded by this method. That is by design rather than an oversight. The three acquisition methods in the README table are aimed at different readers, and the composer require row is for people who want to use this library as a third party dependency in their own projects, where the example files are not needed.
The same note explains the OAuth2 consequence. If you do not yet have OAuth2 credentials and need the installed application flow, you need examples/Auth/GetRefreshToken.php, and since that file is not present after a composer require, this method is not an option. Plan the order of operations: clone or download the tarball first if you need the auth examples at all.
Cloning the repository is how you get the runnable examples
The git clone path is for people who want to alter or contribute to the library, or who want to run the example files. The README notes that all files in the repository are downloaded this way. The sequence is to run git clone on the googleads-php-lib repository, navigate into the resulting directory with cd googleads-php-lib, and run composer install, which installs all dependencies needed for using the library and running the examples.
Once the dependencies are in place, the README points at a concrete script, GetAllNetworks.php, in the v202211 NetworkService example directory.
$ php examples/AdManager/v202211/NetworkService/GetAllNetworks.phpThe script prints the networks available to your account, which is a good first request because it exercises authentication and the service layer without touching any real inventory.
One warning from the README deserves repeating. The examples are meant to be run from the command line and not as a webpage, and if you run them as a webpage results may not be shown properly. The scripts also read configuration from the home directory, which is the subject of the next step.
adsapi_php.ini lives in your home directory, and it is required
Before downloading or using the library, the getting started steps ask you to copy the sample Ad Manager adsapi_php.ini into your home directory and fill out the required properties. The README links the sample file in the examples/AdManager folder.
The home directory matters because that is how the library finds the file. The README says the library determines the home directory of your computer using EnvironmentalVariables::getHome(), a helper at src/Google/AdsApi/Common/Util/EnvironmentalVariables.php. So there is no application config file to point at, and no environment variable override documented for the ini path. The location is fixed by convention.
That convention is also a deployment wrinkle. A container that does not set a home directory, or a process running under a user with an unexpected home, will not find the configuration, and the failure will look like a missing settings error rather than a missing file in your project. The example path is the only one documented, so it is the path to configure.
Authentication itself is OAuth2, and the README points at a wiki page describing API access using own credentials with the installed application flow.
Three download methods, and a tarball for trying the API only
The README tabulates the three ways to obtain the library and who each is for, and the table is more informative than it looks.
Using composer require is for teams treating this as a third party library in their projects, where the example files are unnecessary. Using git clone is for people who intend to alter or contribute to the library, for instance by submitting a pull request, or who want to run the example files. Downloading a compressed tarball is the lightest option and is described as suitable for those who only want to try out the Ad Manager API with this client library, with the extracted directory containing only the examples/ folder.
That last description is a warning to the uninitiated. A tarball is not a library. It is a way to run the samples against the API once, without wiring anything into an application. If you read the tarball row as a normal installation route, you will find no autoloader and no vendor tree, and you will end up writing the dependency wiring yourself.
The choice, then, is between a dependency in composer.json and a working copy of the repository, with the tarball reserved for evaluation.
Apache-2.0 licensing and a release history you must read per version
The package is licensed under Apache-2.0, with the licence text in the LICENSE file. Apache-2.0 is permissive and comes with an express patent grant, which matters for a library that talks to a commercial API, though it is a licensing summary rather than advice.
The upgrade story is where the effort is. Releases land roughly quarterly based on the recent tags, 72.0.0 in February 2026, 73.0.0 in May 2026 and 74.0.0 in August 2026, and each one adds an Ad Manager API version layer. The repository carries CHANGELOG.md, and that file plus the API version directory structure is the map of what changed.
For a team running this in production, the real cost of the library is not the install but the maintenance of the versioned calls. The repository also makes the engineering conventions visible: phpunit.xml.dist for the test suite, phpcs_ruleset.xml for coding standards, and check_conditions.php for verifying that the environment meets the requirements before you start. Those three files tell you what the project expects of a change you submit back, which matters if you intend to contribute.
Editorial conclusion
Adopt googleads-php-lib if you build publisher side tooling against the Google Ad Manager SOAP API and you can live with a client that is versioned to the Ad Manager API release cycle. Do not adopt it for Google Ads campaigns, because the README states the AdWords API is sunset and points those users to google-ads-php. Before you start, check the API version directories under examples/AdManager against the version your Ad Manager network exposes, confirm your PHP runtime is 8.0 or higher since v62.0.0, and set the adsapi_php.ini properties in your home directory before the first request.
Frequently asked questions
Which Google API does googleads-php-lib target?
It targets the Google Ad Manager SOAP API. The README notes that the AdWords API is sunset and directs Google Ads API users to the google-ads-php client library instead.
What PHP version does googleads-php-lib require?
PHP 8.0 or higher is the minimum from version 62.0.0. The final version supporting PHP 7 is v61.0.0, which covers Google Ad Manager API versions v202208, v202211, v202302 and v202305.
How do I install googleads-php-lib with Composer?
Run composer require googleads/googleads-php-lib, which stores the library under the vendor directory. Note that this method does not download the example files, so it is not usable if you need the OAuth2 helper examples.
Where does the library read its configuration from?
You copy the sample adsapi_php.ini into your home directory and fill in the required properties. The library finds the home directory with EnvironmentalVariables::getHome() from its common utilities.
Can I run the googleads-php-lib example scripts in a browser?
The README says the examples are meant to be run from the command line and not as a webpage, and that results may not be shown properly if you run them as a webpage.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/googleads-googleads-php-lib)Was this useful?