Page Summary
-
Google Ads scripts allow programmatic management and querying of Google Ads data using JavaScript in a browser-based IDE.
-
Most Google Ads features are accessible through scripts using mutate and search calls.
-
Scripts are suitable for automating common procedures and interacting with external data across multiple Google Ads accounts.
-
Google Ads scripts are a good fit for developers who prefer not to manage their own software infrastructure or non-developers willing to learn programming.
-
Only entry-level JavaScript familiarity and a Google Ads account are needed to start using Google Ads scripts.
Google Ads scripts provide a serverless automation platform that lets you programmatically manage and query your Google Ads data using modern JavaScript (ES6+) in a browser-based IDE. With Google Ads scripts, you can automate routine account management workflows, generate custom reports, and integrate Google Ads with external data sources—across one account or thousands of accounts—without provisioning servers or managing developer credentials.
Most features of Google Ads are available in Google Ads scripts through mutate and search calls. You can use scripts to:
- Manage campaigns, ad groups, keywords, and ads.
- Adjust bids, budgets, and status based on real-time performance or external data.
- Run queries using Google Ads Query Language (GAQL) to generate custom reports and dashboards.
- Schedule automated executions to run hourly, daily, weekly, monthly, or on demand.
- Coordinate multi-account operations across child accounts using manager scripts.
- Connect to Google Workspace services (such as Sheets and Drive), Google Cloud services (such as BigQuery), and third-party APIs.
Scripts also includes built-in entity selectors and reports.
Key technical specifications
The following technical specifications define the execution environment and operational boundaries of Google Ads scripts:
| Specification | Single account script | Manager account script |
|---|---|---|
| Execution timeout | Maximum 30 minutes |
Up to 60 minutes with executeInParallel and a callback
(30 minutes standard)
|
| Runtime engine | V8 JavaScript runtime (ECMAScript 6+) | V8 JavaScript runtime (ECMAScript 6+) |
| Entity iterator limit | 50,000 entities default per iterator (reports and search queries are exempt) | 50,000 entities per child account (reports and search queries are exempt) |
| Parallel accounts | N/A (1 account) | Up to 50 accounts in parallel |
| Bulk upload limit | 50 MB file size, 1,000,000 rows | 50 MB file size, 1,000,000 rows |
| Authorized scripts | Up to 250 authorized scripts per user | Up to 250 authorized scripts per user |
| Hosting and infrastructure | Fully managed by Google (serverless) | Fully managed by Google (serverless) |
For more information, see Limits.
Are Google Ads scripts the right product for me?
Google provides multiple products to help automate Google Ads accounts. The following table outlines common scenarios and recommendations to help you choose the right product for your needs:
| Scenario | Recommendation | Key characteristics |
|---|---|---|
| I am a developer who wishes to build my own software product, or integrate with the Google Ads API. I am comfortable writing code, managing software infrastructure including servers and databases. | Use the Google Ads API. | Full API control, higher throughput, dedicated hosting, and OAuth management. |
| I am a developer who is comfortable writing code, but prefer not to manage my own software infrastructure. | Use Google Ads scripts. | Serverless execution inside Google Ads, automated scheduling, browser-based IDE. |
| I am not a developer, but am willing to invest some time learning programming to automate Google Ads. | Use Google Ads scripts. | Simple JavaScript syntax, prebuilt script templates, IDE autocomplete and syntax highlighting. |
| I want to manage video campaigns programmatically. | Use Google Ads scripts. |
Direct video campaign management using
AdsApp.videoCampaigns().
|
| I want to schedule tasks to run without needing an active user session. | Use Google Ads scripts. | OAuth2 background authorization with automated hourly, daily, weekly, or monthly scheduling. |
| I want to access my nested Google Ads accounts programmatically. | Use manager scripts to access serving child accounts from a single script. |
Sequential iteration across child accounts, or parallel execution across
up to 50 child accounts using executeInParallel.
|
| I want to integrate Google-owned or third-party APIs into my Google Ads management. | Use Google APIs or third-party APIs with Google Ads scripts. |
Built-in Google Workspace services (Sheets, Drive, Mail), Advanced Google
APIs (BigQuery, Analytics, YouTube), and UrlFetchApp for
external REST APIs.
|
| I am a data analyst (or similar role) who wants to download Google Ads reports for further analysis. | Use the BigQuery Data Transfer Service for Google Ads. | Scheduled automated pipeline for Google Ads data into BigQuery without code. |
| I want to manage Google Ads in bulk, and don't mind writing code. | Use bulk uploads with Google Ads scripts. | Programmatic CSV or spreadsheet upload supporting up to 1,000,000 rows. |
| I want to manage Google Ads in bulk, but don't want to write any code. | Use automated rules, bulk uploads, or Google Ads Editor. | No-code desktop or UI tools for bulk updates and scheduled rules. |
Prerequisites
Only entry-level familiarity with JavaScript is needed—the IDE helps with syntax highlighting, autocomplete, and previewing. All you need is a Google Ads account to start writing your first script.
Frequently asked questions
Find answers to common questions about Google Ads scripts architecture, execution limits, and integrations.
What are Google Ads scripts?
Google Ads scripts provide a serverless automation environment within Google Ads. They allow advertisers and developers to write JavaScript code to query performance metrics, create and modify campaigns, update bids and budgets, and connect with external APIs without configuring servers, managing OAuth tokens, or paying for infrastructure.
How do Google Ads scripts differ from the Google Ads API?
Google Ads scripts run directly in your Google Ads account using JavaScript, require zero server infrastructure, and handle authorization automatically in the browser. The Google Ads API is a REST and gRPC API designed for larger-scale enterprise applications, third-party tools, and high-volume data pipelines that run on your own servers and require dedicated developer tokens and OAuth credentials.
Do I need a server to run Google Ads scripts?
No. Google Ads scripts run entirely on Google's cloud infrastructure at no additional cost. You can author scripts, test them with preview mode, and schedule them directly in the Google Ads web interface.
What are the execution limits for Google Ads scripts?
Standard scripts in individual accounts can run for up to 30 minutes per
execution. Manager account scripts that use executeInParallel can execute
for up to 60 minutes across up to 50 child accounts (when a callback function is
specified). If a script times out, Google Ads still applies any changes made
before cancellation. See Limits
for complete details on timeouts, quotas, and bulk upload limits.
Can Google Ads scripts connect to external APIs?
Yes. Google Ads scripts include built-in services such as SpreadsheetApp for
reading and writing Google Sheets, UrlFetchApp for sending HTTP requests to
external REST APIs, and Advanced Google APIs for integrating with services such
as BigQuery and YouTube. For more details, see
Third-party APIs
and Advanced Google APIs.
Feedback
If you have any feedback on Google Ads scripts, we would love to hear it! Reach out to us on Discord.
If you need support, contact scripts technical support.