Target data model

Targeting search result (for ads_target list endpoint)

View field support, webhooks, and list parameters for each integration on the Supported Integrations page.

FieldTypeRequiredDescription
idstringYes
namestringNo
typeenumNoTargeting search types for ads_target list endpoint (Meta: adinterest, adbehavior, adlocale, adgeolocation; Google: geoTargetConstants, user_interest, topic_constant, language_constant) Values: INTEREST, BEHAVIOR, LOCALE, COUNTRY, REGION, CITY, ZIP, US_DMA, TOPIC, USER_LIST, CARRIER, DEVICE_MODEL, OS_VERSION
is_activebooleanNo
parent_idstringNo
audience_count_minnumberNo
audience_count_maxnumberNo

TypeScript

TypeScript
export type AdsTarget = {
	id: string;
	name?: string;
	type?: 'INTEREST' | 'BEHAVIOR' | 'LOCALE' | 'COUNTRY' | 'REGION' | 'CITY' | 'ZIP' | 'US_DMA' | 'TOPIC' | 'USER_LIST' | 'CARRIER' | 'DEVICE_MODEL' | 'OS_VERSION'; // Targeting search types for ads_target list endpoint (Meta: adinterest, adbehavior, adlocale, adgeolocation; Google: geoTargetConstants, user_interest, topic_constant, language_constant)
	is_active?: boolean;
	parent_id?: string;
	audience_count_min?: number;
	audience_count_max?: number;
	raw?: any;
} 

Zod

Zod
import { z } from 'zod';

export const ZodAdsTarget = z.object({
	id: z.string(),
	name: z.string().optional(),
	type: z.enum("INTEREST", "BEHAVIOR", "LOCALE", "COUNTRY", "REGION", "CITY", "ZIP", "US_DMA", "TOPIC", "USER_LIST", "CARRIER", "DEVICE_MODEL", "OS_VERSION").optional().describe("Targeting search types for ads_target list endpoint (Meta: adinterest, adbehavior, adlocale, adgeolocation; Google: geoTargetConstants, user_interest, topic_constant, language_constant)"),
	is_active: z.boolean().optional(),
	parent_id: z.string().optional(),
	audience_count_min: z.number().optional(),
	audience_count_max: z.number().optional(),

});

Python

Python
import dataclasses

@dataclasses.dataclass
class AdsTargetType(str, Enum):
	INTEREST = 'INTEREST'
	BEHAVIOR = 'BEHAVIOR'
	LOCALE = 'LOCALE'
	COUNTRY = 'COUNTRY'
	REGION = 'REGION'
	CITY = 'CITY'
	ZIP = 'ZIP'
	US_DMA = 'US_DMA'
	TOPIC = 'TOPIC'
	USER_LIST = 'USER_LIST'
	CARRIER = 'CARRIER'
	DEVICE_MODEL = 'DEVICE_MODEL'
	OS_VERSION = 'OS_VERSION'

@dataclasses.dataclass
class AdsTarget:
	id: str
	name: Optional[str]
	"""Targeting search types for ads_target list endpoint (Meta: adinterest, adbehavior, adlocale, adgeolocation; Google: geoTargetConstants, user_interest, topic_constant, language_constant)"""
	type: Optional[AdsTargetType]
	is_active: Optional[bool]
	parent_id: Optional[str]
	audience_count_min: Optional[int]
	audience_count_max: Optional[int]
Are we missing anything? Let us know
Was this page helpful?