curl --request GET \
--url https://panel.metricanic.com/api/v1/reports \
--header 'Authorization: Bearer <token>'import requests
url = "https://panel.metricanic.com/api/v1/reports"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://panel.metricanic.com/api/v1/reports', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://panel.metricanic.com/api/v1/reports",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://panel.metricanic.com/api/v1/reports"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://panel.metricanic.com/api/v1/reports")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://panel.metricanic.com/api/v1/reports")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"ok": true,
"data": {
"meta": {
"limit": 100,
"offset": 0,
"totalRows": 1,
"timezone": "UTC",
"totals": {
"visits": 1520,
"conversions": 12,
"cost": 18.24,
"revenue": 54
}
},
"rows": [
{
"campaign": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"visits": 1520,
"conversions": 12,
"cost": 18.24,
"revenue": 54
}
]
}
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"requestId": "<string>"
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"requestId": "<string>"
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"requestId": "<string>"
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"requestId": "<string>"
}Query reports
Returns aggregate performance grouped by your chosen dimensions. Use it to compare campaigns, destinations, and traffic segments. Filter and sort the results to investigate a specific question.
Dimensions (dimensions, comma-separated):
- Time:
day,hour,month,dayOfWeek. - Entities:
campaign,traffic,landing,offer,affiliateNetwork,rotator,rotatorPath. - Device:
deviceType,deviceBrand,deviceModel,osFamily,osVersion,browserName,browserVersion. - Location and network:
country,continent,region,city,timezone,language,ipType,asn,asnOrg,isp,colo,connType,connSpeed. - Traffic quality:
threat,isBot. - Referrer:
refDomain. - Custom source parameters:
token1..token15. - Tags:
tag, which requires a single campaign filter and a base dimension.
Metrics (metrics, comma-separated): visits, uniqueVisits, lpclicks, uniqueClicks, ctr, uctr, conversions, cr, cv, ucr, ucv, revenue, cost, profit, roi, profitMargin, epv, epc, epa, epuc, cpv, cpc, cpa, cpuc, ppuc, suspicious, suspiciousPct, and per-goal breakdowns event1..event10, revenue1..revenue10, cost1..cost10, value1..value10.
Raw event dimensions like id, external, ip, refUrl and other non-rollup fields are not supported here. Use /api/v1/events for raw inspection. Row keys in the response match the requested dimension and metric IDs.
curl --request GET \
--url https://panel.metricanic.com/api/v1/reports \
--header 'Authorization: Bearer <token>'import requests
url = "https://panel.metricanic.com/api/v1/reports"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://panel.metricanic.com/api/v1/reports', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://panel.metricanic.com/api/v1/reports",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://panel.metricanic.com/api/v1/reports"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://panel.metricanic.com/api/v1/reports")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://panel.metricanic.com/api/v1/reports")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"ok": true,
"data": {
"meta": {
"limit": 100,
"offset": 0,
"totalRows": 1,
"timezone": "UTC",
"totals": {
"visits": 1520,
"conversions": 12,
"cost": 18.24,
"revenue": 54
}
},
"rows": [
{
"campaign": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"visits": 1520,
"conversions": 12,
"cost": 18.24,
"revenue": 54
}
]
}
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"requestId": "<string>"
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"requestId": "<string>"
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"requestId": "<string>"
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"requestId": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
IANA timezone for date bucketing and range boundaries. Defaults to the account timezone when omitted. Supply it explicitly for reproducible reports.
Comma-separated filter expressions, each URL-encoded as field<op>value[|value2...] where <op> is one of =, !=, >, <. Example: filter=country=US|CA,ctr>0.05. Field is any report dimension or metric. Max 6 filters, 1000 values per filter.
Comma-separated aggregate report dimensions. Raw event dimensions are rejected. tag is a synthetic report column and requires a single campaign plus a base dimension.
all, active, archived 1 <= x <= 1000x >= 0asc, desc Canonical dimension id used for tagging.