Spend by audience and placement
get_audience_breakdownOne ad platform's spend and results split by who saw the ads or where: Meta by age, gender, device, placement or platform; Google by device, age, gender or platform (network). Per row: spend, share (of the split's spend, 0..1), impressions, clicks, conversions, conversionValue, roas and cpa — all as the PLATFORM reports them, so say so. byCampaign repeats the split per campaign; campaigns lists the campaigns with breakdown data (id + name): pass campaignId to read one. coverage = the share of the platform's campaign spend these rows explain (below 1 mostly because Google gives age and gender for Search and Shopping only, never Performance Max). unconverted true = some rows are in a currency with no rate yet and are left out. Null conversions = the platform reported none for that segment, not zero. Optional from and to (inclusive YYYY-MM-DD, both or neither, never after today) read another span instead of the default period. A named month, a week or two dates the operator gave MUST be sent here: without them this reads the last 30 days, which is not that month.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Last day of the span, inclusive, as YYYY-MM-DD; not after today. Send together with `from`, or omit both to read the default 30-day period. | |
| from | No | First day of the span, inclusive, as YYYY-MM-DD. Send together with `to`, or omit both to read the default 30-day period. | |
| source | Yes | The ad platform: meta or google. | |
| dimension | Yes | How to split the spend. Meta: age, gender, device, placement or platform (Facebook, Instagram, Audience Network, Messenger). Google: device, age, gender or platform (network). none = one row per campaign, no split. | |
| campaignId | No | One campaign's id, from a first call's campaigns list; omit for every campaign. |