> [!IMPORTANT]
> **Important:** Before going through this setup guide for the Python client library, be sure to review the [Google Ads API getting started](https://developers.google.com/google-ads/api/docs/get-started/introduction) guide.

The Python client library is hosted [on GitHub](https://github.com/googleads/google-ads-python), and the package is
available on [PyPI](https://pypi.org/project/google-ads/).

## Requirements

The library supports Python 3.9 through 3.14 (`>=3.9, <3.15`; Python 3.14
support was added in `v28.2.0`). Because Python 3.9 and 3.10 emit a deprecation
warning on import in `google-ads` `v32.0.0` and later, using Python 3.11 or
later is recommended.

## Prerequisites

Before proceeding with this guide, you need the 10-digit
[client customer ID](https://support.google.com/google-ads/answer/1704344) of your Google Ads account.

## Runtime and dependency compatibility

The Python client library maintains compatibility with the Python runtimes in
the [Supported Versions](https://devguide.python.org/versions/#supported-versions) section published by the
[Python Software Foundation](https://www.python.org/psf-landing/), except for versions with a status of
"feature" or "prerelease".

The Google Ads API team aims to adopt new versions of the Python runtime as soon
as they are released and officially supported by the Python Software Foundation.

Python runtimes that have reached end of life (EOL) are not supported past the
EOL date in the [Unsupported Versions](https://www.python.org/psf-landing/) section of [python.org](https://www.python.org/).
Compatibility with EOL runtimes cannot be guaranteed, as releases of the library
following an EOL date may break compatibility.

For dependencies (specifically, any Google-maintained packages that are
[listed as required](https://github.com/googleads/google-ads-python/blob/HEAD/pyproject.toml) by the Python client library), compatibility
is maintained with packages that are Google-maintained and considered
"supported" according to Google's [OSS Breaking Change Policy](https://opensource.google/documentation/policies/library-breaking-change).

For a complete list of supported Python runtimes and dependencies, see the
[Dependencies](https://developers.google.com/google-ads/api/docs/client-libs/python/dependencies) page.

## Installation

The [installation](https://developers.google.com/google-ads/api/docs/client-libs/python/installation#install-from-pypi) guide outlines all of the different ways to
install the library. The simplest (and recommended) way to install the library
into your application is with `pip`:

    python -m pip install google-ads

## Configuration

After installing the library, you need to set up a configuration for it. There
are multiple ways to configure the library, which are described in the
[configuration](https://developers.google.com/google-ads/api/docs/client-libs/python/configuration) guide.

## Authentication

Once you've chosen a configuration approach, set up your authentication
configuration. For step-by-step instructions, see the
[Python client library authentication guide](https://developers.google.com/google-ads/api/docs/client-libs/python/authentication). For more general
background, see the [OAuth overview](https://developers.google.com/google-ads/api/docs/oauth/overview).

## Make an API request

Once you've set up your authentication configuration, you're ready to make an
API request. Refer to the [get campaigns](https://developers.google.com/google-ads/api/samples/get-campaigns) example for a quick way
to test that the library is properly configured to make API requests.

To run the `get_campaigns.py` sample, first clone the
[`google-ads-python` repository](https://github.com/googleads/google-ads-python). Then, from the root directory of the
cloned repository, run the following command:

    python examples/basic_operations/get_campaigns.py -c INSERT_CUSTOMER_ID_HERE

## Additional resources

After you're able to make an API request, proceed to these uses of the client
library:

- [Logging](https://developers.google.com/google-ads/api/docs/client-libs/python/logging)
- [Protobuf Messages](https://developers.google.com/google-ads/api/docs/client-libs/python/protobuf-messages)
- [Field Masks](https://developers.google.com/google-ads/api/docs/client-libs/python/field-masks)
- [Resource Names](https://developers.google.com/google-ads/api/docs/client-libs/python/resource-names)
- [Proto Getters](https://developers.google.com/google-ads/api/docs/client-libs/python/proto-getters)