google-ads-api-quickstart
What it does
It guides you through Google Ads API credentials, choosing a client library or direct REST, and running a short script that lists campaigns. It is for developers starting with the Google Ads API.
When to use it
- ✓When you are new to the Google Ads API and want a first working request.
- ✓When you need to pick a client library such as Python, Java, or .NET.
- ✓When a setup error such as permission denied or an unapproved developer token stops you.
Skill link
https://github.com/google/skills/blob/main/skills/ads/google-ads-api-quickstart/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Show me how to set up the Google Ads API in Python and get my campaigns with one script.”
5 new skills a week. 1 minute to read.
How it works
It looks up the current stable API and runtime versions first, walks through the credentials, configures your environment, and runs a script that retrieves your campaigns.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Google Ads API Quickstart
This skill guides you from absolute zero to running your first successful request to retrieve campaigns.
Supported Tracks
You can choose to use this skill with:
- Official Client Libraries: Python, Java, .NET, PHP, Ruby, or Perl.
- Direct REST: Raw HTTP REST requests.
Crucial Requirement: Dynamic Version Resolution & Runtime Resolution
[!IMPORTANT] To ensure the integration is secure, stable, and up-to-date, you must resolve all API and runtime versions dynamically. Do not rely on hardcoded defaults.
Strict Constraints:
- DO NOT Hardcode: Never use hardcoded Google Ads API versions (e.g.,
v24) or language runtime versions (e.g.,Python 3.8+,Java 11+) in generated code or environment setup instructions, unless the user explicitly requests a specific version. - MANDATORY Dynamic Resolution: You must dynamically resolve the latest stable versions at the start of execution before generating any code or configuration, using the procedures detailed below.
A. Dynamic API Version Resolution
To ensure the integration is secure, stable, and up-to-date, you MUST resolve the absolute newest stable major version of the Google Ads API dynamically.
Execution Steps:
Pre-Flight Version Resolution: Use your web search or URL-reading tools to inspect the latest entry in the Google Ads API Release Notes or the highest versioned directory in the Googleapis Github Repository to resolve
RESOLVED_API_VERSION(e.g.,v24). If using Java, you MUST also resolve the latest stable release version of the Google Ads Java Client Library (referred to asRESOLVED_LIBRARY_VERSION, e.g.,34.0.0).Mandatory Response Anchor: You MUST output the following confirmation block as the very first line of your response to the user. Do not output any greeting, pleasantries, or introductory text before this block.
[SYSTEM: Using Google Ads API version: RESOLVED_API_VERSION (Resolved from release notes)]Strict Placeholder Mapping Table: You MUST perform on-the-fly search-and-replace on all code templates and reference files using the mapping table below. Do not leave raw placeholders in the final output.
Target Language / Tech Placeholder in Template Replacement Pattern Example (Assuming API v24)Java (Maven/Gradle) LATEST_LIBRARY_VERSIONSearch & substitute the latest Maven release version of the library. 34.0.0Java (Imports) vXXReplace with lower-case API version. com.google.ads.googleads.v24.NET / C# (Namespaces) VXXReplace with title-case API version. Google.Ads.GoogleAds.V24PHP (Namespaces) VXXReplace with title-case API version. Google\Ads\GoogleAds\V24REST (Endpoint URL) vXXReplace with lower-case API version. https://googleads.googleapis.com/v24/...
[!TIP] Offline Fallback: If the URLs are unreachable or the scrape fails, do not halt execution. Fall back to these last-known stable versions:
- Google Ads API Major Version (
RESOLVED_API_VERSION):v24- Java Client Library Version (
RESOLVED_LIBRARY_VERSION):34.0.0
B. Dynamic Language Runtime Version Resolution
To prevent the generated setup guides from becoming obsolete due to language deprecation cycles, you MUST resolve language requirements dynamically.
Execution Steps:
Fetch Live Requirements: Use your URL-reading tools to inspect the official Google Ads Client Libraries - Supported Versions page.
Extract Minimums: Identify the minimum supported runtime version for the user's chosen language by scanning the Overview page or compatibility tables (e.g., looking for explicit requirements like Python 3.8+, Java 11+, .NET 6.0+, PHP 8.1+, Ruby 3.0+).
Apply On-The-Fly: Substitute all runtime placeholders (e.g.,
<PYTHON_MIN_VERSION>) in your generated setup guides with these resolved versions.
[!TIP] Offline Fallback: If the URL is unreachable or the scrape fails, do not halt execution. Fall back to these last-known safe minimum
FAQ
Does it cover languages other than Python?
Yes. It covers Java, .NET, PHP, Ruby, Perl, and direct REST requests.
Can it help with permission errors?
Yes. It troubleshoots errors such as permission denied and login customer ID problems.
Will it use a fixed version number?
No. It is designed to look up the current stable version instead.
Details
Original description by the author
Guides developers through Google Ads API quickstart: credential setup, choosing from 6 client libraries/REST, configuring environments, and running a "retrieve campaigns" script. Troubleshoots common setup errors: USER_PERMISSION_DENIED, login_customer_id issues, and DEVELOPER_TOKEN_NOT_APPROVED. Use this skill when: - The user asks how to get started with the Google Ads API. - The user needs to set up Google Ads credentials or developer tokens. - The user wants to write a quickstart/example script for Google Ads. - The user encounters errors like USER_PERMISSION_DENIED or DEVELOPER_TOKEN_NOT_
repo: google/skills
Popularity
- GitHub stars
- 22k
- Ranking position
- #10187
- License
- Apache-2.0
- Updated
- 11/2/2026
Comments
- …
More skills from this repository
finding-google-skills
22kHelps your agent find the right Google guides for a setup task, such as hosting, databases, storage, sign-in or AI model serving.
gcloud
22kHelps your agent write and check Google Cloud gcloud commands, looking up exact syntax before it runs anything so it does not guess flags.
google-cloud-recipe-auth
22kGuides your agent through Google Cloud identity and access, including how people and services sign in and which permissions they get.
google-cloud-recipe-onboarding
22kWalks a new developer through first steps on Google Cloud, including choosing a project, linking billing, and deploying a first resource.
Similar skills
api-connector-builder
280kHas your agent build new API connections following the existing pattern. Use when you need to add one more integration without creating a new way of doing things.
api-design
280kHelps your agent design REST APIs following best practices. It's useful for defining how APIs communicate, how errors are shown, and how to organize data.
backend-patterns
280kHelps your agent with server-side architecture patterns and database optimization. It's useful for building or reviewing code that runs on the server.