cURL
curl --request GET \
--url https://api.surnex.io/v1/usage \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.surnex.io/v1/usage"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.surnex.io/v1/usage', 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.surnex.io/v1/usage",
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://api.surnex.io/v1/usage"
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://api.surnex.io/v1/usage")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.surnex.io/v1/usage")
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{
"account_id": "0f1ce1f3-d6fc-4f1e-9d31-2ed5b1f6ef34",
"range": {
"from": "2026-01-01T00:00:00Z",
"to": "2026-02-01T00:00:00Z"
},
"provider": "dataforseo",
"totals": {
"calls_total": 12,
"calls_by_operation": {
"llm_mentions_aggregated_metrics_live": 5,
"llm_mentions_top_domains_live": 4,
"llm_mentions_search_live": 3
},
"avg_latency_ms": 190.5,
"p95_latency_ms": 320,
"http_status_counts": {
"2xx": 11,
"4xx": 1,
"5xx": 0
},
"estimated_cost_usd": 0.19
},
"providers": {
"dataforseo": {
"calls_total": 12,
"calls_by_operation": {
"llm_mentions_aggregated_metrics_live": 5,
"llm_mentions_top_domains_live": 4,
"llm_mentions_search_live": 3
},
"avg_latency_ms": 190.5,
"p95_latency_ms": 320,
"http_status_counts": {
"2xx": 11,
"4xx": 1,
"5xx": 0
},
"estimated_cost_usd": 0.19
}
},
"snapshots": {
"snapshots_total": 4,
"snapshots_by_status": {
"queued": 0,
"running": 0,
"complete": 3,
"partial": 1,
"failed": 0
}
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid request",
"request_id": "req_123",
"details": {
"issues": [
{
"path": [
"from"
],
"message": "from must be before to",
"code": "custom"
}
]
}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Unauthorized",
"request_id": "req_123",
"details": {
"reason": "missing_or_invalid_api_key"
}
}
}v1
Get v1usage
GET
/
v1
/
usage
cURL
curl --request GET \
--url https://api.surnex.io/v1/usage \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.surnex.io/v1/usage"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.surnex.io/v1/usage', 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.surnex.io/v1/usage",
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://api.surnex.io/v1/usage"
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://api.surnex.io/v1/usage")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.surnex.io/v1/usage")
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{
"account_id": "0f1ce1f3-d6fc-4f1e-9d31-2ed5b1f6ef34",
"range": {
"from": "2026-01-01T00:00:00Z",
"to": "2026-02-01T00:00:00Z"
},
"provider": "dataforseo",
"totals": {
"calls_total": 12,
"calls_by_operation": {
"llm_mentions_aggregated_metrics_live": 5,
"llm_mentions_top_domains_live": 4,
"llm_mentions_search_live": 3
},
"avg_latency_ms": 190.5,
"p95_latency_ms": 320,
"http_status_counts": {
"2xx": 11,
"4xx": 1,
"5xx": 0
},
"estimated_cost_usd": 0.19
},
"providers": {
"dataforseo": {
"calls_total": 12,
"calls_by_operation": {
"llm_mentions_aggregated_metrics_live": 5,
"llm_mentions_top_domains_live": 4,
"llm_mentions_search_live": 3
},
"avg_latency_ms": 190.5,
"p95_latency_ms": 320,
"http_status_counts": {
"2xx": 11,
"4xx": 1,
"5xx": 0
},
"estimated_cost_usd": 0.19
}
},
"snapshots": {
"snapshots_total": 4,
"snapshots_by_status": {
"queued": 0,
"running": 0,
"complete": 3,
"partial": 1,
"failed": 0
}
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid request",
"request_id": "req_123",
"details": {
"issues": [
{
"path": [
"from"
],
"message": "from must be before to",
"code": "custom"
}
]
}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Unauthorized",
"request_id": "req_123",
"details": {
"reason": "missing_or_invalid_api_key"
}
}
}Authorizations
bearerAuthapiKeyAuth
Authorization: Bearer sk_...
Query Parameters
Minimum string length:
1Minimum string length:
1Minimum string length:
1⌘I