Statistics
curl --request GET \
--url https://api.adgreg.com/statistics \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.adgreg.com/statistics"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.adgreg.com/statistics', 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://api.adgreg.com/statistics",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$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://api.adgreg.com/statistics"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.adgreg.com/statistics")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.adgreg.com/statistics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"response": [
{
"impressions": 123,
"clicks": 123,
"revenue": 123,
"adnetwork": "exoclick",
"user_website_id": 123,
"stat_date": "2023-12-25",
"api_spot_id": "<string>",
"api_website_id": "<string>",
"user_spot_type": "<string>"
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Dashboard configuration
Statistics
GET
/
statistics
Statistics
curl --request GET \
--url https://api.adgreg.com/statistics \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.adgreg.com/statistics"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.adgreg.com/statistics', 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://api.adgreg.com/statistics",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$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://api.adgreg.com/statistics"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.adgreg.com/statistics")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.adgreg.com/statistics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"response": [
{
"impressions": 123,
"clicks": 123,
"revenue": 123,
"adnetwork": "exoclick",
"user_website_id": 123,
"stat_date": "2023-12-25",
"api_spot_id": "<string>",
"api_website_id": "<string>",
"user_spot_type": "<string>"
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Returns normalized performance data for a given adnetwork and Adgreg website.
-
website_id— the Adgreg website ID from Get user sites, not an adnetwork site ID. - Date range — defaults to the beginning of the current month through yesterday. Maximum range is 30 days.
-
dimensions— controls how results are grouped. Omit it to receive a single row of fully accumulated totals. Pass a comma-separated list of any combination ofdate,spot,spot_type,siteto break results down by those fields. Order does not matter.spotandsitedimensions refer to the adnetwork’s own spot and site IDs — not your Adgreg-configured spots or websites.
dimensions=date,spot_type
Authorizations
Query Parameters
Available options:
exoclick, trafficstars, kadam, clickadilla, onclicka, twinred, trafficshop, hilltop Default: Beginning of month. Format: YYYY-MM-DD. Max range: 30 days.
Default: Yesterday. Format: YYYY-MM-DD.
Available values: date, spot, spot_type, site. Example: date,spot_type
Response
Successful Response
Show child attributes
Show child attributes