get_media_buys
[AdCP Media Buy] List media buys with status, budget, flight and optional delivery snapshots.
Status, budget and flight are read from the advertisements + placements spine the buy actually books on — not from a stored display string. A buy that its flight ended, or that the pacing cron completed on goal, reports the truth here even though nothing rewrote it.
WHEN TO USE:
Polling the buys you have open on this account
Confirming a buy left pending_creatives after sync_creatives
Getting a near-real-time delivery snapshot without a full delivery report
RETURNS:
media_buys: each with media_buy_id, status, currency, total_budget, confirmed_at, revision and packages[]. status is the AdCP media-buy-status enum; the accepted values are listed on the status_filter parameter below.
pagination: cursor-based
EXAMPLE: get_media_buys({ status_filter: ["active", "pending_creatives"], include_snapshot: true }) get_media_buys({ media_buy_ids: ["mbuy_1750000000000_ab12cd34"] })
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| context | No | ||
| pagination | No | ||
| media_buy_ids | No | Specific media buy IDs. When omitted, returns a paginated set matching status_filter. | |
| status_filter | No | Single status or array of statuses. Defaults to ['active'] when media_buy_ids is omitted; no implicit filter when ids are given. | |
| include_snapshot | No | Include a delivery snapshot per package (impressions, spend, pacing_index). Read live off placements, so staleness_seconds is 0. |