Usage API
Traffic, requests and success rate by hour or by day, for the last 30 days.
These are the figures behind the dashboard's charts, counted by the gateway itself: bytes in both directions, connections, and how many of them got through to the target. Use them to bill your own projects, to spot a scraper that suddenly burns traffic, or to watch the success rate after a change of targeting.
Hours and days are in UTC. Hourly figures are kept for 30 days. A connection refused for a wrong login or password is not counted; one to a target the gateway blocks counts as a failed request.
Get usage
/api/v1/usageA series of points, one per hour (24h) or per day (7d, 30d), with totals. Points without traffic are included with zeros, so the series has no gaps. success_rate is a percentage, or null without requests.
Query parameters
| Name | Type | Description |
|---|---|---|
productrequired | residential | mobile | Which pool: residential or mobile. |
period | 24h | 7d | 30d | 24h: the last 24 hours, by hour. 7d / 30d: the last 7 or 30 days, by day, today included. Default 7d. |
sub_user_id | integer | Only this sub-user. |
include_sub_users | boolean | Without sub_user_id: true counts the whole account, false only the main login. Default true. |
Request
curl "https://aeonproxy.com/api/v1/usage?product=residential&period=7d" \
-H "Authorization: Bearer $AEONPROXY_API_KEY"import os
import requests
r = requests.get(
"https://aeonproxy.com/api/v1/usage?product=residential&period=7d",
headers={"Authorization": f"Bearer {os.environ['AEONPROXY_API_KEY']}"},
timeout=30,
)
data = r.json()
if not r.ok:
raise SystemExit(data["error"]["message"])
print(data)// Node.js 18+, as an ES module (.mjs)
const res = await fetch("https://aeonproxy.com/api/v1/usage?product=residential&period=7d", {
headers: {
Authorization: `Bearer ${process.env.AEONPROXY_API_KEY}`,
},
});
const data = await res.json();
if (!res.ok) throw new Error(data.error.message);
console.log(data);<?php
$ch = curl_init('https://aeonproxy.com/api/v1/usage?product=residential&period=7d');
curl_setopt_array($ch, [
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('AEONPROXY_API_KEY'),
],
CURLOPT_RETURNTRANSFER => true,
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$data = json_decode($body, true);
if ($status >= 400) {
fwrite(STDERR, $data['error']['message'] . PHP_EOL);
exit(1);
}
print_r($data);package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
req, err := http.NewRequest("GET", "https://aeonproxy.com/api/v1/usage?product=residential&period=7d", nil)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("AEONPROXY_API_KEY"))
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
out, _ := io.ReadAll(res.Body)
fmt.Println(res.Status)
fmt.Println(string(out))
}Response 200
{
"product": "residential",
"period": "7d",
"granularity": "day",
"from": "2026-10-22T00:00:00.000Z",
"to": "2026-10-28T09:30:00.000Z",
"totals": {
"gb": 6.204,
"requests": 18342,
"success_rate": 98.7
},
"series": [
{
"start": "2026-10-22T00:00:00.000Z",
"gb": 0,
"requests": 0,
"success_rate": null
},
{
"start": "2026-10-23T00:00:00.000Z",
"gb": 1.12,
"requests": 3410,
"success_rate": 98.9
},
{
"start": "2026-10-24T00:00:00.000Z",
"gb": 0.874,
"requests": 2602,
"success_rate": 99.1
},
{
"start": "2026-10-25T00:00:00.000Z",
"gb": 1.031,
"requests": 2950,
"success_rate": 98.2
},
{
"start": "2026-10-26T00:00:00.000Z",
"gb": 1.402,
"requests": 4118,
"success_rate": 98.6
},
{
"start": "2026-10-27T00:00:00.000Z",
"gb": 1.288,
"requests": 3820,
"success_rate": 98.9
},
{
"start": "2026-10-28T00:00:00.000Z",
"gb": 0.489,
"requests": 1442,
"success_rate": 98.5
}
]
}Errors
| Status | Code | When |
|---|---|---|
| 400 | invalid_parameter | product is missing or not residential / mobile |
| 404 | not_found | sub_user_id is not one of your sub-users of that product |