# Google Ads Campaign Performance by Day (`google-ads.campaign_performance`)

Returns one row per campaign per day for a Google Ads account: impressions, clicks, spend, conversions and conversion value, with money in micros of the account currency.

Docs: https://primaryapi.com/docs/api-reference/google-ads/campaign_performance

- Endpoint: `POST https://api.primaryapi.com/v1/run/google-ads.campaign_performance`
- Category: Search & SEO · Platform: `google-ads` · Kind: list · Status: live
- Price: 1 credit per call. Every call costs the same, including calls that were retried automatically.
- Billing unit: per successful call
- Reliability: routed to a healthy upstream and retried automatically when an attempt fails; live 30-day status: `GET https://api.primaryapi.com/v1/status/apis?sku=google-ads.campaign_performance`
- Execution: synchronous (answers 202 only if it outlives the wait window)

## Input

| Field | Type | Required | Default | Constraints | Description |
|---|---|---|---|---|---|
| `customerId` | string | yes |  | pattern: ^(\d{3})-?(\d{3})-?(\d{4})$ | Google Ads customer (account) id, 10 digits with or without hyphens, e.g. "123-456-7890". List yours with google-ads.accounts. |
| `dateRange` | enum | no | "LAST_30_DAYS" | one of: TODAY, YESTERDAY, LAST_7_DAYS, LAST_14_DAYS, LAST_30_DAYS, LAST_BUSINESS_WEEK, THIS_MONTH, LAST_MONTH, THIS_WEEK_SUN_TODAY, THIS_WEEK_MON_TODAY, LAST_WEEK_SUN_SAT, LAST_WEEK_MON_SUN | Period of the metrics, in the account’s time zone (default LAST_30_DAYS). Ignored when startDate/endDate are set. |
| `startDate` | string | no |  | pattern: ^\d{4}-\d{2}-\d{2}$ | Custom period start (YYYY-MM-DD), with endDate. |
| `endDate` | string | no |  | pattern: ^\d{4}-\d{2}-\d{2}$ | Custom period end (YYYY-MM-DD), inclusive, with startDate. |
| `limit` | integer | no | 200 | 1–1000 | Maximum number of results to return (1-1000, default 200). |
| `statuses` | enum[] | no | ["ENABLED","PAUSED","REMOVED"] | min 1 items; max 3 items | Campaign statuses to include (default all three, so the days add up to the account’s total spend). |
| `campaignId` | string | no |  | pattern: ^\d{1,20}$ | Only this campaign (numeric id, from google-ads.campaigns). |
| `cursor` | string | no |  |  | Opaque pagination cursor: pass the previous response's nextCursor. |
| `loginCustomerId` | string | no |  | pattern: ^(\d{3})-?(\d{3})-?(\d{4})$ | Only when the connected Google account reaches `customerId` THROUGH a manager (MCC) account: that manager account’s id (10 digits). Sent as the login-customer-id header. Omit for accounts the Google account can open directly. |
| `connection` | string | no |  | max 200 chars | Which connected account to use when the workspace has several for this provider: the customId you gave it (exact), its connection id ("con_…"), its handle (login, email or @handle) or its name. Optional; prefer the customId or id, which never match two accounts. |

Unknown fields are rejected with `400 invalid_input`. The routing controls `preferLatencyUnderMs` and `maxCredits` may be sent in the same JSON body.

## Output

When `output.found` is `true`, `output.data` has this shape:

| Field | Type | Description |
|---|---|---|
| `customerId` | string |  |
| `currencyCode` | string \| null |  |
| `timeZone` | string \| null | The account’s time zone; every date is a day in it |
| `period` | string | The GAQL date condition used, e.g. "DURING LAST_30_DAYS" |
| `rows` | object[] | One campaign on one day (the shared ads model): spendMicros and conversionValueMicros are integer micros of currency |
| `rows[].platform` | enum |  |
| `rows[].accountId` | string |  |
| `rows[].campaignId` | string |  |
| `rows[].campaignName` | string \| null |  |
| `rows[].status` | enum |  |
| `rows[].platformStatus` | string \| null |  |
| `rows[].date` | string |  |
| `rows[].impressions` | integer |  |
| `rows[].clicks` | integer |  |
| `rows[].spendMicros` | integer |  |
| `rows[].currency` | string |  |
| `rows[].conversions` | number |  |
| `rows[].conversionValueMicros` | integer |  |
| `nextCursor` | string \| null |  |

When the thing you asked about does not exist (or a search matches nothing) the call still succeeds: `output.found` is `false`, `output.data` is `null` and `output.reason` says why (`not_found`, `private`, `no_results`, …). Misses are free unless the notes below say misses are billed.

Pagination: pass the previous response’s `nextCursor` as `cursor` to get the next page; `nextCursor: null` means there are no more results.

## Example request

```bash
curl -sS -X POST "https://api.primaryapi.com/v1/run/google-ads.campaign_performance" \
  -H "Authorization: Bearer $PRIMARYAPI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"customerId":"1234567890","startDate":"2026-11-15","endDate":"2026-11-16"}'
```

## Example response

_Values are placeholders that follow the output schema; `credits` is what this call would cost at the usual price._

```json
{
  "output": {
    "found": true,
    "data": {
      "customerId": "1234567890",
      "currencyCode": "USD",
      "timeZone": "America/New_York",
      "period": "BETWEEN '2026-11-15' AND '2026-11-16'",
      "rows": [
        {
          "platform": "google-ads",
          "accountId": "1234567890",
          "campaignId": "111",
          "campaignName": "Brand - Search",
          "status": "enabled",
          "platformStatus": "ENABLED",
          "date": "2026-11-15",
          "impressions": 430,
          "clicks": 28,
          "spendMicros": 13750000,
          "currency": "USD",
          "conversions": 1.5,
          "conversionValueMicros": 160250000
        },
        {
          "platform": "google-ads",
          "accountId": "1234567890",
          "campaignId": "111",
          "campaignName": "Brand - Search",
          "status": "enabled",
          "platformStatus": "ENABLED",
          "date": "2026-11-16",
          "impressions": 512,
          "clicks": 35,
          "spendMicros": 17200000,
          "currency": "USD",
          "conversions": 2,
          "conversionValueMicros": 123457
        }
      ],
      "nextCursor": null
    }
  },
  "provider": "PrimaryAPI",
  "credits": 1,
  "items": 2,
  "requestId": "req_01JBXK6Y2N9V8T4R3Q2P1M0A7Z",
  "nextCursor": null
}
```

## Pricing and reliability

- Usual price: 1 credit per call
- Price ceiling: the usual price, even when a call is retried. A quote’s `maxCredits` is the most a given call can cost; the `maxCredits` routing control caps it per call
- Live 30-day status, success rate, uptime and latency: `GET https://api.primaryapi.com/v1/status/apis?sku=google-ads.campaign_performance`

## Errors to handle

`invalid_input`, `unauthorized`, `insufficient_balance`, `key_limit_reached`, `trial_cap_reached`, `forbidden`, `not_found`, `idempotency_conflict`, `rate_limited`, `all_sources_failed`, `service_unavailable`, `timeout`. See https://primaryapi.com/docs/errors.

## Notes

Runs as your connected Google account and needs the Google Ads capability (ads). The same row shape every ad platform uses here: raw counters only (work out CTR, CPC, CPA or ROAS from them), money as integer micros (1,000,000 per unit) of the account currency, days in the account’s time zone. Days with no activity have no row. Sorted by day, then cost, highest first. Includes removed campaigns by default so totals match the account.

