Add Search keywords to an ad group
Adds one or more keyword criteria to an existing Google Search ad group,
without touching the keywords already there (unlike the whole-set diff on
PUT /v1/ads/{adId}, keywords/negativeKeywords in platformSpecificData,
which replaces the set). Set negative: true to add ad-group-level negatives
instead of positive keywords.
API key authentication - use your Zernio API key as a Bearer token
In: header
Social account ID (Google Ads)
Google ad group ID to add the keywords to
1 <= items <= 1000Add as ad-group-level negatives instead of positive keywords
falseResponse Body
application/json
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.adcampaigns.addAdKeywords({ body: { accountId: 'account_abc123', adSetId: 'adset_abc123', keywords: [ 'string', ], },});console.log(data);{
"keywords": [
{
"id": "string",
"accountId": "string",
"profileId": "string",
"platform": "google",
"adAccountId": "string",
"campaignId": "string",
"campaignName": "string",
"campaignStatus": "string",
"adSetId": "string",
"adSetName": "string",
"adSetStatus": "string",
"keyword": "string",
"matchType": "exact",
"status": "active",
"negative": true,
"qualityScore": 0,
"syncedAt": "2019-08-24T14:15:22Z",
"metrics": {
"windowDays": 0,
"clicks": 0,
"impressions": 0,
"cost": 0,
"conversions": 0,
"firstPageCpc": 0,
"firstPositionCpc": 0
}
}
]
}{
"error": "string",
"type": "invalid_request_error",
"code": "string",
"param": "string",
"platform": "string",
"platformError": {},
"details": {}
}{
"error": "Unauthorized"
}Pause or resume a single ad PUT
Ad-scoped pause/resume — touches ONLY this ad, never its parent ad set or campaign (so sibling ads keep running). Thin wrapper over the `status` field of PUT /v1/ads/{adId}, for callers that want a URL symmetric to /v1/ads/campaigns/{campaignId}/status and /v1/ads/ad-sets/{adSetId}/status. `{adId}` accepts the same identifier dialects as GET/PUT /v1/ads/{adId} (Zernio hex `_id`, Meta numeric `platformAdId`, or the creative's effective story/media IDs). `platform` is inferred from the ad, so it's not required in the body. Ads in terminal statuses (rejected, completed, cancelled) and no-op flips (already in the target state) are skipped.
List campaign-level negative keywords GET
Returns the campaign-level negative keywords (`campaign_criterion.negative`), distinct from the ad-group-level negatives under `GET /v1/ads/keywords`. Read live from Google on every call (not synced to Postgres), and gated by the shared Google Ads operations budget like every other on-demand Google surface. The platform is always discovered from the campaign itself; a non-Google campaign returns 501 rather than 404, whether or not `platform` was passed.