google-ads-api-quickstart
できること
Google Adsの認証情報、クライアントライブラリかダイレクトのRESTの選択を案内し、キャンペーンを一覧にする短いスクリプトを実行します。Google Ads APIを始める開発者向けです。
使う場面
- ✓Google Ads APIに不慣れで、最初の動くリクエストがほしいとき。
- ✓Python、Java、.NETなどのクライアントライブラリを選ぶ必要があるとき。
- ✓権限の拒否や未承認のデベロッパートークンなどのセットアップのエラーで、先に進めないとき。
スキルのリンク
https://github.com/google/skills/blob/main/skills/ads/google-ads-api-quickstart/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“PythonでGoogle Ads APIを設定して、1つのスクリプトでキャンペーンを取得する方法を見せてください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは、まず現在の安定版のAPIとランタイムのバージョンを確認し、認証情報を案内して、環境を設定し、キャンペーンを取得するスクリプトを実行します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)を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
よくある質問
Python以外の言語にも対応していますか?
はい。Java、.NET、PHP、Ruby、Perl、そして直接のRESTリクエストに対応しています。
権限のエラーを手伝えますか?
はい。権限の拒否やログインのカスタマーIDの問題などのエラーを解決します。
固定のバージョン番号を使いますか?
いいえ。代わりに現在の安定版を確認するよう作られています。
詳細
作者による元の説明
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
人気
- GitHubのスター
- 22k
- ランキング
- #10187
- ライセンス
- Apache-2.0
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
finding-google-skills
22kセットアップ作業に合うGoogleの公式ガイドを探すようエージェントを支援します。ホスティング、データベース、ストレージ、サインイン、AIモデルの提供などが対象です。
gcloud
22kエージェントが、Google CloudのgcloudコマンドについてWeb検索に頼らず、正確な構文を確かめてから書いたり確認したりできるよう支援します。
google-cloud-recipe-auth
22kエージェントが、Google Cloudのアイデンティティとアクセス(人やサービスがどうサインインし、どの権限を得るか)について、手順を案内できるよう支援します。
google-cloud-recipe-onboarding
22k新しい開発者が、プロジェクトの選択、請求の設定、最初のリソースのデプロイなど、Google Cloudの最初の手順を進められるよう案内します。
似ているスキル
api-connector-builder
280kエージェントが既存のパターンに従って、新しいAPI連携を構築します。新しい方式を作らずに、もう一つ連携を追加したいときに使います。
api-design
280kエージェントがベストプラクティスに沿ってREST APIを設計できるようにします。APIの通信方法、エラーの表示方法、データの整理方法を決めるのに役立ちます。
backend-patterns
280kエージェントのサーバーサイドのアーキテクチャパターンとデータベースの最適化を支援します。サーバー上で動くコードを作成またはレビューするときに役立ちます。