# Marketing Spend Unit Economics Calculator

> Marketing Spend Unit Economics Calculator is a paid API for AI agents from payai.agentstools.dev, paid per call via x402, $0.02/call, status unknown (last checked 2026-09-15).

Computes per-channel marketing unit economics (CPC, CPM, CPA, CAC, ROAS, ROI, conversion rate, LTV:CAC) from raw spend/conversion/revenue data, ranks channels, and suggests budget reallocation.

## Facts

- Endpoint: POST https://payai.agentstools.dev/marketing/spend
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/marketing-spend-unit-economics-calculator-aac0c0bc
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_FNSjjnaAQzzC8U7kN5Xtx

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability marketing-spend-unit-economics-calculator-aac0c0bc -d '<json body>'
```

Example prompt: I have three marketing channels — Google Ads spent $12,000 with 400 conversions and $60,000 revenue, Facebook spent $8,000 with 200 conversions and $30,000 revenue, and TikTok spent $5,000 with 80 conversions and $10,000 revenue. Can you calculate CPA, ROAS, and ROI for each, rank them by efficiency, and tell me where to shift budget?

## When to prefer this

Use this endpoint when you need pure mathematical computation of marketing unit economics across multiple channels without connecting to any ad platform APIs. Ideal for batch analysis of exported campaign data, quick sanity checks on channel efficiency, or when you already have spend/conversion/revenue numbers and need standardized KPIs and a budget recommendation in one call. Prefer this over manual spreadsheet work or ad-platform dashboards when you want a single ranked view across heterogeneous channels.

## Known failure modes

- Missing required spend data causes computation errors or null metrics for affected channels
- CSV with malformed headers or mismatched columns may fail to parse
- Channels missing impressions/clicks cannot produce CPM/CPC metrics
- Zero conversions on a channel causes division-by-zero for CPA/CAC metrics
- Providing neither `csv` nor `rows` field returns a validation error

## How this service works

Per-channel unit economics from spend, conversions and revenue: CPC, CPM, CPA, CAC, ROAS, ROI, conversion rate, and LTV to CAC. Ranks channels and suggests a budget shift. Pure computation over your inputs.

## Output

Returns per-channel computed metrics including CPC, CPM, CPA, CAC, ROAS, ROI, conversion rate, and LTV:CAC ratio; a ranked list of channels by efficiency; and a suggested budget reallocation across channels. All outputs are derived purely from the provided input data.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "csv": {
   "type": "string",
   "description": "Raw CSV or TSV text with a header row, as an alternative to rows"
  },
  "rows": {
   "type": "array",
   "items": {
    "type": "object"
   },
   "description": "Per-channel rows with spend and any of impressions/clicks/conversions/revenue/ltv/customers"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/marketing-spend-unit-economics-calculator-aac0c0bc/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from payai.agentstools.dev](https://www.zero.xyz/host/payai.agentstools.dev/llms.txt)
