The new Search Ads 360 Reporting API is now available. Join the searchads-api-announcements Google group to stay up to date on upcoming enhancements and releases.
Stay organized with collections
Save and categorize content based on your preferences.
Install the Python client library
To install the Python client library in your local environment:
Extract the Python client library tarball.
Run the following command in the same directory:
python-mpipinstall.
Follow the prompts in the terminal to complete the installation.
Configuration using YAML file
You can specify a YAML file to use when initializing the client that contains
the necessary authentication information needed to make requests. This file is
accessed when a client is initialized using the load_from_file method.
Follow the example provided below when creating the YAML file
to specify the refresh
token, client
ID, and client secret.
To specify the location where the search-ads-360.yaml file is located, you can
pass the path as a string to the method when calling it:
Supported keys for desktop and web application flows
If you are using the desktop or web
application flow, the supported keys are as follows:
# Credential for accessing Google's OAuth servers.# Provided by console.cloud.google.com.
client_id:INSERT_CLIENT_ID_HERE
# Credential for accessing Google's OAuth servers.# Provided by console.cloud.google.com.
client_secret:INSERT_CLIENT_SECRET_HERE
# Renewable OAuth credential associated with 1 or more Search Ads accounts.
refresh_token:INSERT_REFRESH_TOKEN_HERE
# Required for manager accounts only: Specify the login customer ID used to# authenticate API calls. This will be the customer ID of the authenticated# manager account. You can also specify this later in code if your application# uses multiple manager account + OAuth pairs.## login_customer_id: INSERT_LOGIN_CUSTOMER_ID_HERE
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-04-21 UTC."],[[["Install the Python client library using `python -m pip install .` after extracting the tarball, avoiding `python setup.py`."],["Configure authentication using a YAML file containing refresh token, client ID, client secret, and optionally, login customer ID."],["Initialize the client by specifying the YAML file path using `SearchAds360Client.load_from_file()`, which defaults to your `$HOME` directory if no path is provided."],["The configuration supports general fields like `refresh_token`, `client_id`, `client_secret`, and `login_customer_id` for authentication and account access."],["Desktop and web application flows use specific keys like `client_id`, `client_secret`, `refresh_token`, and optionally, `login_customer_id` within the YAML file."]]],["To install the Python client library, extract the tarball and run `python -m pip install .`. Avoid using `python setup.py`. Configure the client using a YAML file, specifying `refresh_token`, `client_id`, and `client_secret`. Load the configuration with `load_from_file`, providing a file path or letting the library check the `$HOME` directory. Additional fields like `login_customer_id` are supported. Web application flows need the `client_id`, `client_secret`, and `refresh_token` keys.\n"]]