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](https://developers.google.com/google-ads/scripts/docs/concepts/mutate) and
[search](https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp#search_query-optArgs)
calls. You can use scripts to:

- [Manage campaigns](https://developers.google.com/google-ads/scripts/docs/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)](https://developers.google.com/google-ads/api/docs/query/overview) 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](https://developers.google.com/google-ads/scripts/docs/concepts/manager-scripts).
- Connect to Google Workspace services (such as Sheets and Drive), Google Cloud services (such as BigQuery), and [third-party APIs](https://developers.google.com/google-ads/scripts/docs/integrations/third-party-apis).

Scripts also includes built-in
[entity selectors](https://developers.google.com/google-ads/scripts/docs/elements/selectors) and
[reports](https://developers.google.com/google-ads/scripts/docs/concepts/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](https://developers.google.com/google-ads/scripts/docs/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](https://developers.google.com/google-ads/api/docs). | 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](https://developers.google.com/google-ads/scripts/docs/campaigns/video-campaigns). | Direct video campaign management using `AdsApp.videoCampaigns()`. |
| I want to schedule tasks to run without needing an [active user session](https://developers.google.com/google-ads/scripts/docs/authorization#why_authorization_is_necessary). | 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](https://developers.google.com/google-ads/scripts/docs/concepts/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](https://developers.google.com/google-ads/scripts/docs/integrations/advanced-apis) or [third-party APIs](https://developers.google.com/google-ads/scripts/docs/integrations/third-party-apis) with Google Ads scripts. | Built-in Google Workspace services (Sheets, Drive, Mail), Advanced Google APIs (BigQuery, Merchant API, 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](https://cloud.google.com/bigquery/docs/google-ads-transfer). | 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](https://developers.google.com/google-ads/scripts/docs/concepts/bulk-upload) 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](https://support.google.com/google-ads/answer/2472779), [bulk uploads](https://support.google.com/google-ads/answer/10702932), or [Google Ads Editor](https://support.google.com/google-ads/editor/answer/2484521). | 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](https://ads.google.com) account to
[start writing your first script](https://developers.google.com/google-ads/scripts/docs/getting-started).

## 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](https://developers.google.com/google-ads/api/docs) 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](https://developers.google.com/google-ads/scripts/docs/preview), 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](https://developers.google.com/google-ads/scripts/docs/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](https://developers.google.com/google-ads/scripts/docs/integrations/third-party-apis)
and [Advanced Google APIs](https://developers.google.com/google-ads/scripts/docs/integrations/advanced-apis).

## Feedback

If you have any feedback on Google Ads scripts, we would love to hear it! Reach
out to us on [Discord](https://goo.gle/google-ads-discord).

If you need support,
[contact scripts technical support](https://developers.google.com/google-ads/scripts/docs/support/contact).