# Google Ads search terms report

Returns the Google Ads search terms report. Works with Google Ads.

```http
GET https://api.pozy.ai/v1/ads/search-terms
```

- Area: Ads / Ad Insights
- Auth: Authorization: Bearer pz_live_...

## Query parameters

- `accountId` (string, required)
- `adAccountId` (string)
- `customerId` (string)
- `fromDate` (string (date))
- `toDate` (string (date))
- `campaignId` (string)
- `adSetId` (string)
- `adGroupId` (string)
- `pageToken` (string)

## Example request

```bash
curl -X GET "https://api.pozy.ai/v1/ads/search-terms?accountId=696e0b682d0a31188e7a2ba9" \
  -H "Authorization: Bearer $POZY_API_KEY"
```

```ts
const res = await fetch("https://api.pozy.ai/v1/ads/search-terms?accountId=696e0b682d0a31188e7a2ba9", {
  headers: { Authorization: `Bearer ${process.env.POZY_API_KEY}` },
});
const data = await res.json();
if (!res.ok) throw new Error(data?.error ?? `Request failed with status ${res.status}`);
console.log(data);
```

```python
import os
import requests

resp = requests.get(
    "https://api.pozy.ai/v1/ads/search-terms",
    headers={"Authorization": f"Bearer {os.environ['POZY_API_KEY']}"},
    params={
        "accountId": "696e0b682d0a31188e7a2ba9",
    },
    timeout=30,
)
resp.raise_for_status()
print(resp.json())
```

## Response 200

- `customerId`, string
- `data`, array of object
  - `searchTerm`, string: Can be null
  - `status`, string: Can be null
  - `matchType`, string: Can be null
  - `matchSource`, string: Can be null
  - `campaignId`, string: Can be null
  - `campaignName`, string: Can be null
  - `adGroupId`, string: Can be null
  - `adGroupName`, string: Can be null
  - `impressions`, integer
  - `clicks`, integer
  - `costMicros`, integer
  - `conversions`, number
  - `conversionsValue`, number
- `paging`, object
  - `nextPageToken`, string: Can be null
- `cachedAt`, string (date-time): Can be null
- `stale`, boolean

```json
{
  "customerId": "691909ff82eb5ed7c816716d",
  "data": [
    {
      "searchTerm": "string",
      "status": "active",
      "matchType": "string",
      "matchSource": "string",
      "campaignId": "65a3737dd8b11ea61f199e6e",
      "campaignName": "Acme",
      "adGroupId": "6ad180be375f36f2c328e52b",
      "adGroupName": "Acme",
      "impressions": 1,
      "clicks": 1,
      "costMicros": 1,
      "conversions": 12.5,
      "conversionsValue": 12.5
    }
  ],
  "paging": {
    "nextPageToken": "string"
  },
  "cachedAt": "2026-10-02T09:00:00.000Z",
  "stale": true
}
```
