{"openapi":"3.1.0","info":{"title":"Ad Metrics API","version":"1.0.0","description":"Marketing and advertising metrics as an API — the everyday campaign maths, computed locally and deterministically and entirely currency-agnostic. The funnel endpoint takes any of impressions, clicks, conversions, spend and revenue and computes every metric the inputs allow: click-through rate (CTR), cost per click (CPC), cost per mille (CPM), conversion rate, cost per acquisition (CPA), average order value, return on ad spend (ROAS), return on investment (ROI) and profit — anything not derivable is returned as null rather than guessed. The roas endpoint focuses on profitability: ROAS, ROI and profit, and — given a gross margin — the break-even ROAS and gross profit, with a profitable flag. The target endpoint reverse-plans a campaign: from a conversion or revenue goal and your known rates it works out the required clicks, impressions and budget and the expected revenue and ROAS. Everything is computed locally and deterministically, so it is instant and private. Rates such as conversion_rate and ctr are given as fractions (0.05 = 5%). Ideal for marketing dashboards and reporting, media-buying and bid tools, agency and campaign planners, and e-commerce analytics. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is advertising-metric maths; for loan and investment maths use a finance-calculator API.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/admetrics-api","description":"oanor gateway"}],"tags":[{"name":"Metrics"},{"name":"Meta"}],"components":{"securitySchemes":{"oanorKey":{"type":"apiKey","in":"header","name":"x-oanor-key","description":"Get your key at https://www.oanor.com/developer/keys"}}},"security":[{"oanorKey":[]}],"paths":{"/v1/funnel":{"get":{"operationId":"get_v1_funnel","tags":["Metrics"],"summary":"Funnel metrics (CTR/CPC/CPM/CVR/CPA/ROAS/ROI)","description":"","parameters":[{"name":"impressions","in":"query","required":false,"description":"Impressions","schema":{"type":"string"},"example":"100000"},{"name":"clicks","in":"query","required":false,"description":"Clicks","schema":{"type":"string"},"example":"2000"},{"name":"conversions","in":"query","required":false,"description":"Conversions","schema":{"type":"string"},"example":"100"},{"name":"spend","in":"query","required":false,"description":"Spend","schema":{"type":"string"},"example":"1000"},{"name":"revenue","in":"query","required":false,"description":"Revenue","schema":{"type":"string"},"example":"5000"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"cpc":0.5,"cpm":10,"note":"Metrics are computed only where the required inputs are present; others are null. CTR/conversion rate/ROI are percentages.","roas":5,"input":{"spend":1000,"clicks":2000,"revenue":5000,"conversions":100,"impressions":100000},"profit":4000,"ctr_percent":2,"roi_percent":400,"cost_per_conversion":10,"revenue_per_conversion":50,"conversion_rate_percent":5},"meta":{"timestamp":"2026-06-03T17:41:57.779Z","request_id":"312fdd69-0662-4a59-b60d-8716052c33af"},"status":"ok","message":"Funnel metrics","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/roas":{"get":{"operationId":"get_v1_roas","tags":["Metrics"],"summary":"ROAS, ROI, profit & break-even","description":"","parameters":[{"name":"spend","in":"query","required":true,"description":"Ad spend","schema":{"type":"string"},"example":"1000"},{"name":"revenue","in":"query","required":true,"description":"Revenue","schema":{"type":"string"},"example":"5000"},{"name":"margin","in":"query","required":false,"description":"Gross margin fraction (0-1)","schema":{"type":"string"},"example":"0.5"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"ROAS = revenue ÷ spend. Break-even ROAS = 1 ÷ gross margin. Gross profit = revenue × margin − spend.","roas":5,"input":{"spend":1000,"margin":0.5,"revenue":5000},"profit":4000,"profitable":true,"roi_percent":400,"gross_profit":1500,"break_even_roas":2},"meta":{"timestamp":"2026-06-03T17:41:57.883Z","request_id":"978ac6e5-149c-40f9-b7bc-194b197a759c"},"status":"ok","message":"ROAS & profitability","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/target":{"get":{"operationId":"get_v1_target","tags":["Metrics"],"summary":"Reverse-plan a campaign","description":"","parameters":[{"name":"target_conversions","in":"query","required":false,"description":"Goal: conversions","schema":{"type":"string"},"example":"200"},{"name":"target_revenue","in":"query","required":false,"description":"Or goal: revenue","schema":{"type":"string"}},{"name":"conversion_rate","in":"query","required":true,"description":"Fraction e.g. 0.05","schema":{"type":"string"},"example":"0.05"},{"name":"ctr","in":"query","required":false,"description":"Fraction e.g. 0.02","schema":{"type":"string"},"example":"0.02"},{"name":"cpc","in":"query","required":false,"description":"Cost per click","schema":{"type":"string"},"example":"0.5"},{"name":"aov","in":"query","required":false,"description":"Avg order value","schema":{"type":"string"},"example":"50"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Reverse-plans the funnel: conversions ÷ conversion rate = clicks; ÷ CTR = impressions; × CPC = budget.","input":{"aov":50,"cpc":0.5,"ctr":0.02,"conversion_rate":0.05,"target_conversions":200},"expected_roas":5,"required_budget":2000,"required_clicks":4000,"expected_revenue":10000,"required_impressions":200000},"meta":{"timestamp":"2026-06-03T17:41:58.009Z","request_id":"d6b390ce-e2ff-40b0-b55a-a4800b70dc1c"},"status":"ok","message":"Campaign planning","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/meta":{"get":{"operationId":"get_v1_meta","tags":["Meta"],"summary":"Spec","description":"","parameters":[],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Currency-agnostic. Rates such as conversion_rate and ctr are fractions (0.05 = 5%).","service":"admetrics","endpoints":{"/v1/roas":"ROAS, ROI, profit and (with a margin) break-even ROAS and gross profit.","/v1/funnel":"Compute CTR, CPC, CPM, conversion rate, CPA, ROAS and ROI from impressions/clicks/conversions/spend/revenue.","/v1/target":"Reverse-plan required clicks, impressions and budget from a conversion or revenue goal."},"description":"Marketing/advertising metrics: funnel rates (CTR/CPC/CPM/CVR/CPA/ROAS/ROI), profitability and campaign planning."},"meta":{"timestamp":"2026-06-03T17:41:58.121Z","request_id":"2ad3b41f-8854-4d45-8ee0-17683335ef1e"},"status":"ok","message":"Meta","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}}},"x-oanor-pricing":[{"slug":"free","name":"Free","price_cents_month":0,"monthly_call_quota":9735,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":1125,"monthly_call_quota":19350,"rps_limit":8,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":3115,"monthly_call_quota":243500,"rps_limit":20,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":6915,"monthly_call_quota":1260000,"rps_limit":50,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/admetrics-api"}