Перейти к содержанию
Skillpedia
API и серверы (бэкенд)22k · #10187

google-ads-api-quickstart

Что он делает

Ведёт вас через учётные данные Google Ads API, выбор клиентской библиотеки или прямого 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

Скопируйте и вставьте её в ваш ИИ (Claude, ChatGPT или Cursor) с просьбой следовать инструкциям.

Как использовать

Самый простой способ: скопируйте сообщение и вставьте его в свой ИИ. Он прочитает скилл и выполнит инструкции.

Готовое сообщение для вставки

Используй этот скилл, чтобы помочь мне: https://github.com/google/skills/blob/main/skills/ads/google-ads-api-quickstart/SKILL.md Прочитай файл SKILL.md по этой ссылке и следуй его инструкциям в моей задаче.
Хотите, чтобы ваш ИИ сам находил такие скиллы?Установите бесплатный MCP Skillpedia: одна строка, и перед каждой задачей он ищет среди 15 000+ скиллов.Установить за 1 минуту →

Пример запроса к вашему ИИ

“Покажи, как настроить Google Ads API на Python и получить мои кампании одним скриптом.”

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:

  1. Official Client Libraries: Python, Java, .NET, PHP, Ruby, or Perl.
  2. 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:

  1. 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 as RESOLVED_LIBRARY_VERSION, e.g., 34.0.0).

  2. 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)]
    
  3. 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_VERSION Search & substitute the latest Maven release version of the library. 34.0.0
    Java (Imports) vXX Replace with lower-case API version. com.google.ads.googleads.v24
    .NET / C# (Namespaces) VXX Replace with title-case API version. Google.Ads.GoogleAds.V24
    PHP (Namespaces) VXX Replace with title-case API version. Google\Ads\GoogleAds\V24
    REST (Endpoint URL) vXX Replace 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:

  1. Fetch Live Requirements: Use your URL-reading tools to inspect the official Google Ads Client Libraries - Supported Versions page.

  2. 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+).

  3. 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-запросы.

Поможет ли он с ошибками доступа?

Да. Он разбирает ошибки вроде отказа в доступе и проблем с идентификатором клиента для входа.

Будет ли он использовать фиксированный номер версии?

Нет. Он устроен так, чтобы искать актуальную стабильную версию.

Подробности

Оригинальное описание автора

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
Обновлён
02.11.2026

Полезен ли этот скилл?

0

Войдите , чтобы голосовать.

Комментарии

  • …

Другие скиллы из этого репозитория

Похожие скиллы