Announcing the release of the Google Ads API Developer Assistant , a powerful extension for Gemini CLI designed to streamline your Google Ads API workflows. This tool allows you to interact with the Google Ads API using everyday language, making it easier than ever to get information, generate code, and even retrieve data directly in your terminal.
Whether you're new to the Google Ads API or a seasoned developer, this assistant can help you work more efficiently.
What Can It Do?
The Google Ads API Developer Assistant (v1.0) enhances the Gemini CLI with several key features:
Natural Language Q&A: Have questions about the Google Ads API? Just ask!
"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: Describe what data you need, and the assistant will generate the Google Ads Query Language (GAQL) and executable Python code using the google-ads-python client library as context so the code conforms to best practices.
"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 automatically saved to the saved_code/ directory.
Direct API Execution: Run the generated Python scripts directly from the command line. The assistant will execute the read-only API calls and display the results, often formatted neatly as tables within your terminal.
CSV Export: Need to save your data? You can easily export the tabular results from API calls to a CSV file. Just ask:
"Save the results to a CSV file"
Files are saved in the saved_csv/ directory.
How Does It Work?
This extension leverages the Gemini CLI's ability to use context from GEMINI.md files and settings within .gemini/settings.json . By configuring the assistant with paths to your local google-ads-python library clone and example directories, it provides relevant and accurate code generation.
Getting Started
Here's what you need to get up and running:
Prerequisites:
Familiarity with Google Ads API concepts and authentication.
A Google Ads API developer token.
A configured google-ads.yaml credentials file in your home directory.
Python >= 3.10.
The Gemini CLI installed.
A local copy of the google-ads-python client library. (The setup script can clone this for you.)
Please refer to the README file in the GitHub repository for detailed setup instructions and examples.
Where to Find It
The Google Ads API Developer Assistant is available on GitHub .
Community & Support
We encourage you to try it out! Your feedback is valuable and can be provided in this survey . Join the discussion in the #ads-api-ai-tools channel of our Discord .
Please use the GitHub Issues tab in the repository to report bugs, suggest features, or ask for support. Check out CONTRIBUTING.md for contribution guidelines.
Happy Coding!
Bob Hancock, Google Ads API Team