The Google Ads API Developer Assistant has been released as an extension for Gemini CLI, aimed at simplifying Google Ads API workflows. This tool allows users to interact with the API using natural language, facilitating information retrieval, code generation, and data access directly from the terminal, catering to both beginners and experienced developers.
Key Features
Natural Language Q&A: Users can ask questions about the Google Ads API, such as:
- "What are the available campaign types?"
- "Tell me about reporting for Performance Max campaigns."
- "How do I filter by date in GAQL?"
Natural Language to Code Generation: The assistant generates Google Ads Query Language (GAQL) and Python code based on user descriptions, ensuring adherence to best practices. Examples include:
- "Show me campaigns with the most conversions in the last 30 days."
- "Get all ad groups for customer '123-456-7890'."
- "Find disapproved ads across all campaigns."
Generated code is saved in the
saved_code/directory.
Direct API Execution: Users can run generated Python scripts from the command line, with results displayed in a formatted manner.
CSV Export: Results from API calls can be exported to a CSV file by simply asking, with files saved in the
saved_csv/directory.
Functionality
The extension utilizes the Gemini CLI's context capabilities from GEMINI.md files and settings in .gemini/settings.json. By configuring paths to the local google-ads-python library and example directories, it ensures accurate code generation.
Getting Started
To use the assistant, users need:
- Familiarity with Google Ads API concepts and authentication.
- A Google Ads API developer token.
- A configured
google-ads.yamlcredentials file. - Python version 3.10 or higher.
- The Gemini CLI installed.
- A local copy of the
google-ads-pythonclient library.
Detailed setup instructions and examples can be found in the README file on GitHub.
The Google Ads API Developer Assistant is available on GitHub. Feedback can be provided through a survey, and users can join discussions in the #ads-api-ai-tools Discord channel. For bugs, feature suggestions, or support, users are encouraged to use the GitHub Issues tab. Contribution guidelines are outlined in CONTRIBUTING.md.










