Read a Google campaign's device, location, and language targeting
Google Ads compliance requires geo, language, budget, and bidding targeting set at creation to stay editable afterwards; this reads the live campaign state so an integrator can build an editor around it. Google only; every other platform returns 501.
devices always lists all four device types with included reflecting
Google's negative device criteria (a device absent from any negative
criterion is included by default). This read has no bid-modifier source,
so bidModifier is always null even for a device with one configured.
API key authentication - use your Zernio API key as a Bearer token
In: header
Path Parameters
Google platform campaign ID
Query Parameters
Disambiguates when the same campaignId string exists on more than one connected platform.
"google"Response 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.getCampaignTargeting({ path: { campaignId: 'campaign_abc123', },});console.log(data);{
"devices": [
{
"device": "MOBILE",
"included": true,
"bidModifier": 0
}
],
"locations": [
{
"geoTargetId": "string",
"negative": true
}
],
"languages": [
{
"code": "string",
"id": "string",
"name": "string"
}
]
}{
"error": "string",
"type": "invalid_request_error",
"code": "string",
"param": "string",
"platform": "string",
"platformError": {},
"details": {}
}{
"error": "Unauthorized"
}Read a campaign's current bidding GET
Live read of the campaign's bidding strategy on Google, for pre-filling the bid strategy block before a PUT to /v1/ads/campaigns/{campaignId}. Google Ads only; `platform` is required and rejected when it is anything else, since a `campaignId` is not globally unique. Maps Google's bidding strategy onto the same triplet PUT accepts: `LOWEST_COST_WITHOUT_CAP` (Maximize Conversions, no target), `COST_CAP` + `bidAmount` (Target CPA), `LOWEST_COST_WITH_MIN_ROAS` + `roasAverageFloor` (Target ROAS), `LOWEST_COST_WITH_BID_CAP` + `bidAmount` (Maximize Clicks with a CPC ceiling). A campaign on a portfolio strategy returns `portfolio` (id + name) and `bidSpec.portfolioBidStrategyId` instead of the triplet. Anything else (Manual CPC, Target Impression Share, ...) returns `bidSpec: null`; show `biddingStrategyType` as-is.
List ad sets GET
Ad sets (Google ad groups) synced for the connection, optionally filtered by platform and campaignId. Reads the `ad_sets` table directly, independent of the `ads` rollup GET /v1/ads/tree uses, so a just-created standalone ad group with no ad yet (POST /v1/ads/ad-sets, Google only) is visible here even though it is invisible in the tree until an ad joins it via `existingAdGroupId`. Returns at most 500 rows, newest first.