# Google Ads

Create Search, Display, Performance Max and Demand Gen campaigns, mine keywords, upload Customer Match lists, send conversions, manage goals, labels and MCC links, apply recommendations and query GAQL.

import { PlatformCapabilities } from '@/components/platform-capabilities';

On a `googleads` account you can:

- create Google Search, Display, Performance Max and Demand Gen campaigns with `POST /v1/ads/create`
- read keywords and run Keyword Planner
- choose what Google bids on with conversion goals
- organize accounts with labels and manager (MCC) links
- apply or dismiss Google's optimization recommendations
- query anything Google's reporting can answer with the Insights endpoints

## Quick reference

<PlatformCapabilities rows={[
  { property: 'Hierarchy', value: 'Campaign > Ad Group > Ad (created in one call)' },
  { property: 'Campaign types (create)', value: 'Search (Responsive Search Ads), Display (Responsive Display Ads), Performance Max (asset groups), Demand Gen (image, video and carousel ads)' },
  { property: 'Goals (`goal`)', value: 'engagement, traffic, awareness. video_views and conversion goals are rejected at create with a 422' },
  { property: 'Keyword targeting', value: 'Broad, phrase, exact; synced keyword list plus Keyword Planner' },
  { property: 'Insights', value: <>Rolled-up metrics on <code>/ads/tree</code> plus raw GAQL passthrough (see <a href="/platforms/google-ads/analytics">Insights and GAQL</a>)</> },
  { property: 'Discovered campaigns', value: 'All types sync into /ads/tree with metrics, including Performance Max' },
  { property: 'Audiences', value: 'Customer Match (create plus member upload)' },
  { property: 'Conversions API', value: 'Data Manager API (click ids plus Enhanced Conversions for Leads), EEA/UK consent' },
  { property: 'Conversion goals', value: 'Account, campaign and custom goals; primary or secondary actions' },
  { property: 'Recommendations', value: 'List with estimated impact, apply (suggested or custom values) and dismiss, up to 100 per call' },
  { property: 'Account management', value: 'Manager (MCC) hierarchy, manager-link invitations, labels on campaigns, ad groups, ads and keywords' },
  { property: 'URL tracking tags', value: 'Campaign-level trackingUrlTemplate plus finalUrlSuffix (read and update)' },
  { property: 'Search ad text', value: '15 headlines (30 characters) and 4 descriptions (90 characters)' },
  { property: 'Display images', value: 'Landscape 1.91:1 and square 1:1 both required, JPEG or PNG, 5120 KB' },
]} />

## Before you start

Google Ads uses a dedicated OAuth connection, separate from YouTube and Google Business Profile.

You need a Google Ads account (the customer id, from [List ad accounts](/ad-accounts/list-ad-accounts)). Accounts under an MCC manager work too.

There is no MCC or Standard Access application on your side. Zernio operates under its own approved developer token.

To see how the accounts behind a connection nest under managers, read the [manager hierarchy](/platforms/google-ads/account-management#manager-hierarchy).

<Callout type="warn">
Display campaigns need 2 images. Google's Responsive Display Ads require both a landscape (1.91:1) and a square (1:1) marketing image.

Sending only one is rejected upstream with `NOT_ENOUGH_SQUARE_MARKETING_IMAGE_ASSET`.
</Callout>

Zernio's developer token holds Standard access, so there is no daily operations cap.

User-driven live calls (GAQL, search terms, Keyword Planner, keyword and other writes) pass a per-user burst limit of 15 requests a minute. See [Quotas and the ops budget](/platforms/google-ads/reference#quotas-and-the-ops-budget).

## Connect

Call `GET /v1/connect/googleads/ads` with `profileId` ([Connect ads](/connect/connect-ads)).

Google Ads is a standalone connection with no parent posting account. The first time, the response always carries an `authUrl`. Send the user there, as in the [connecting accounts guide](/guides/connecting-accounts).

Once connected, the same call returns `alreadyConnected: true` with the `accountId`.

```bash
curl "https://zernio.com/api/v1/connect/googleads/ads?profileId=66a1f0c2a4b9d3e8f1a2b3c4&redirect_url=https://myapp.com/callback" \
  -H "Authorization: Bearer $ZERNIO_API_KEY"
```

Response (`200`), the first time:

```json
{
  "authUrl": "https://accounts.google.com/o/oauth2/v2/auth?client_id=...",
  "state": "..."
}
```

Response (`200`), once the profile already has a `googleads` account:

```json
{
  "alreadyConnected": true,
  "accountId": "66b2e19d8c3f5a7e9d0b1c2d",
  "platform": "googleads",
  "username": "Acme Search",
  "displayName": "Google Ads (Acme Search)"
}
```

Branch on `alreadyConnected`: when it is there, skip the redirect and use `accountId`. The two shapes never arrive together.

The connection requests 2 scopes ([scopes](/guides/connecting-accounts#scopes)):

| Scope | What it enables |
|-------|-----------------|
| `https://www.googleapis.com/auth/adwords` | Full Google Ads API access: campaigns, ad groups, ads, reporting, conversions |
| `https://www.googleapis.com/auth/datamanager` | Data Manager API: Customer Match audience uploads |

Zernio's `adSetId` is the Google ad group id. On Meta the same field is an ad set, on LinkedIn a campaign.

`adAccountId` is the customer id without dashes.

## Common errors

Connecting is where this page's own errors live. The per-job pages carry the rest, and [Limits and errors](/platforms/google-ads/reference#common-errors) collects the recurring ones.

| Error | Cause | Fix |
|-------|-------|-----|
| Redirect with `error=google_ads_auth_failed` | The user declined the Google consent screen, or the token exchange failed | Restart the connect flow. Google's own string arrives in `error_message`. |
| Redirect with `error=google_ads_quota_exhausted` | Google's shared API quota ran out during the flow | Retry the connect flow later. |
| `429` on [List ad accounts](/ad-accounts/list-ad-accounts) | Google throttled the shared token or your account, so the call fails rather than returning an empty list | Retry after `details.resetsAt` ([Quotas and the ops budget](/platforms/google-ads/reference#quotas-and-the-ops-budget)). |
| `403` with code `ads_addon_required` | The team is on a legacy plan that does not include ads access | Move the team to usage-based billing, where every account includes ads ([Pricing](/pricing)). |

[Error handling](/guides/error-handling) covers the envelope and the stable codes.

## In this section

<PlatformPages platform="google-ads" />

## Related

- [Create standalone ad](/ad-campaigns/create-standalone-ad): campaign, ad group and ad in one call.
- [List Search keywords](/ad-campaigns/list-ad-keywords): synced keyword criteria.
- [Keyword ideas](/ad-insights/generate-keyword-ideas) and [Historical metrics](/ad-insights/generate-keyword-historical-metrics).
- [Query ad insights](/ad-insights/query-ad-insights): raw GAQL passthrough.
- [Send events](/conversions/send-events): Data Manager events.
- [List Google Ads recommendations](/ad-campaigns/list-google-recommendations) and [Apply Google Ads recommendations](/ad-campaigns/apply-google-recommendations).
- [Get manager account hierarchy](/ad-accounts/get-ad-account-hierarchy) and [Create a Google Ads label](/ad-accounts/create-ad-label).