Revenue by campaign
revenue_reportWhat the ads actually earned: spend from the ad account against the payments the business sent in, per campaign, ad set, ad or creative. Spend of the window against the payments this account sent to POST /v1/revenue, matched by the tags in the ad link, precise first: ad, then ad set, then campaign — by id or by name alike; when no tag names one object alone, the tags together (ad name and ad set name) may — and matched_by says which route carried how many. A name several objects share is never guessed: that money stays in unattributed with the tags it carried. level "creative" puts together the ads that share a name — one creative reused across ad sets — so money tagged with that name lands on it: the way to compare creatives by money. by "payment_date" (default) counts money that arrived; by "lead_date" what the leads of the window have paid. Ratios only in the ad account currency. Each row carries a verdict against target_roas (default 1.0) and against how long THIS account's leads take to pay, measured from its own payments: a cohort that has not had time to pay is never called a loss. If no payments of its own have ever been sent in (not only none in this window) and Meta counted purchases, the money is what Meta counted — purchases within 7 days of a click, with their value — and money_source says so: a shop whose pixel records every purchase gets its revenue and ROAS without sending anything. Without connection, when several ad accounts are connected, each is read and summarised — totals and the campaigns that spent most; call with connection for the full report of one. Read-only and free: changes nothing and does not count toward the monthly change limit. An identical read within 30 seconds may return the same data (see data_age_seconds).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| by | No | payment_date (default): money that arrived in the window. lead_date: money earned by the leads of this window, whenever it was paid — needs lead_at on the events. | |
| level | No | Rows per campaign (default), ad set, ad, or creative — the ads that share one name, as one creative reused across ad sets. | |
| end_date | No | Last day of an explicit window, YYYY-MM-DD, in the ad account time zone. Needs start_date. | |
| raw_data | No | true returns the measured numbers only: no severity, scores, recommendations or quick_actions. | |
| connection | No | Which connected ad account to use: the connection id from start_here or the ad account number (act_123 or 123). Needed only when several ad accounts are connected. | |
| date_range | No | Window as a named range. Ignored when start_date and end_date are given. | |
| start_date | No | First day of an explicit window, YYYY-MM-DD, in the ad account time zone. Needs end_date. | |
| target_roas | No | What this account expects back per unit of spend. Default 1.0. | |
| lookback_days | No | Window in days: 7, 14, 30, 60 or 90. Default 30. |