Get account usage
curl --request GET \
--url https://api.generect.com/api/v1/accounts/usage/ \
--header 'Authorization: <api-key>'import requests
url = "https://api.generect.com/api/v1/accounts/usage/"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.generect.com/api/v1/accounts/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.generect.com/api/v1/accounts/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: <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.generect.com/api/v1/accounts/usage/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<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.generect.com/api/v1/accounts/usage/")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.generect.com/api/v1/accounts/usage/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"period": "2026-05",
"total_credits": 1234,
"breakdown": {
"search_database": 500,
"search_realtime": 200,
"enrich_database": 300,
"enrich_realtime": 100,
"email_find": 134
}
}
}{
"status": "error",
"status_code": 401,
"detail": "Authentication credentials were not provided."
}{
"status": "error",
"status_code": 403,
"detail": "You do not have permission to perform this action."
}Account
Get account usage
Retrieve credit usage statistics and operation breakdown for an account.
GET
/
api
/
v1
/
accounts
/
usage
/
Get account usage
curl --request GET \
--url https://api.generect.com/api/v1/accounts/usage/ \
--header 'Authorization: <api-key>'import requests
url = "https://api.generect.com/api/v1/accounts/usage/"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.generect.com/api/v1/accounts/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.generect.com/api/v1/accounts/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: <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.generect.com/api/v1/accounts/usage/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<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.generect.com/api/v1/accounts/usage/")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.generect.com/api/v1/accounts/usage/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"period": "2026-05",
"total_credits": 1234,
"breakdown": {
"search_database": 500,
"search_realtime": 200,
"enrich_database": 300,
"enrich_realtime": 100,
"email_find": 134
}
}
}{
"status": "error",
"status_code": 401,
"detail": "Authentication credentials were not provided."
}{
"status": "error",
"status_code": 403,
"detail": "You do not have permission to perform this action."
}Use Case:
Review credit usage by operation type for the selected billing period.Authorizations
Use the required Token prefix. Example: Authorization: Token xxxxxxxxx
Query Parameters
IANA timezone for aggregation.
Truncation granularity for the usage series.
Available options:
day, week, month Month label for the response (YYYY-MM).
Response
Account usage statistics
Show child attributes
Show child attributes
Was this page helpful?
⌘I