API Playground
Get usage statistics
Aggregate usage for the current period. Free.
This is a summary and takes no parameters — it does not paginate. For the individual calls, use GET /account/history.
GET
/
account
/
usage
Get usage statistics
curl --request GET \
--url https://api.bouncewatch.com/api/v1/account/usage \
--header 'X-API-Key: <api-key>'const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.bouncewatch.com/api/v1/account/usage', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.bouncewatch.com/api/v1/account/usage"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.bouncewatch.com/api/v1/account/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 => [
"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;
}{
"success": true,
"data": {
"current_limits": {
"requests_today": 45,
"requests_this_minute": 2,
"last_request": "2023-11-07T05:31:56Z"
},
"monthly_usage": {
"requests": 1250,
"credits_consumed": 3200,
"period": {
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z"
}
},
"top_endpoints": [
{
"endpoint": "/api/v1/company/stripe.com",
"requests": 42,
"credits_used": 520,
"avg_credits_per_request": 12.38
}
],
"recent_requests": [
{
"id": 90211,
"endpoint": "/api/v1/company/stripe.com",
"method": "GET",
"credits_consumed": 26,
"response_status": 202,
"response_time": 0.184,
"requested_at": "2023-11-07T05:31:56Z"
}
]
}
}{
"success": false,
"error": "missing_api_key",
"message": "Please provide your API key in X-API-Key header or api_key parameter"
}{
"success": false,
"error": "rate_limit_exceeded",
"message": "Rate limit exceeded. Please retry after 45 seconds.",
"retry_after": 45,
"limits": {
"per_minute": 150,
"per_day": 5000,
"current_minute": 150,
"current_day": 3204
}
}⌘I
Get usage statistics
curl --request GET \
--url https://api.bouncewatch.com/api/v1/account/usage \
--header 'X-API-Key: <api-key>'const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.bouncewatch.com/api/v1/account/usage', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.bouncewatch.com/api/v1/account/usage"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.bouncewatch.com/api/v1/account/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 => [
"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;
}{
"success": true,
"data": {
"current_limits": {
"requests_today": 45,
"requests_this_minute": 2,
"last_request": "2023-11-07T05:31:56Z"
},
"monthly_usage": {
"requests": 1250,
"credits_consumed": 3200,
"period": {
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z"
}
},
"top_endpoints": [
{
"endpoint": "/api/v1/company/stripe.com",
"requests": 42,
"credits_used": 520,
"avg_credits_per_request": 12.38
}
],
"recent_requests": [
{
"id": 90211,
"endpoint": "/api/v1/company/stripe.com",
"method": "GET",
"credits_consumed": 26,
"response_status": 202,
"response_time": 0.184,
"requested_at": "2023-11-07T05:31:56Z"
}
]
}
}{
"success": false,
"error": "missing_api_key",
"message": "Please provide your API key in X-API-Key header or api_key parameter"
}{
"success": false,
"error": "rate_limit_exceeded",
"message": "Rate limit exceeded. Please retry after 45 seconds.",
"retry_after": 45,
"limits": {
"per_minute": 150,
"per_day": 5000,
"current_minute": 150,
"current_day": 3204
}
}
