GET /usage
curl --request GET \
--url https://api.trackyard.com/api/external/v1/usageimport requests
url = "https://api.trackyard.com/api/external/v1/usage"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.trackyard.com/api/external/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.trackyard.com/api/external/v1/usage",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.trackyard.com/api/external/v1/usage"
req, _ := http.NewRequest("GET", url, nil)
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.trackyard.com/api/external/v1/usage")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trackyard.com/api/external/v1/usage")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"usage": [
{
"timestamp": "<string>",
"endpoint": "<string>",
"status_code": 123,
"credits_consumed": 123,
"response_time_ms": 123
}
],
"total_count": 123,
"offset": 123,
"limit": 123
}API Reference
GET /usage
View paginated usage history with timestamps, endpoints, and credit consumption
GET
/
api
/
external
/
v1
/
usage
GET /usage
curl --request GET \
--url https://api.trackyard.com/api/external/v1/usageimport requests
url = "https://api.trackyard.com/api/external/v1/usage"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.trackyard.com/api/external/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.trackyard.com/api/external/v1/usage",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.trackyard.com/api/external/v1/usage"
req, _ := http.NewRequest("GET", url, nil)
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.trackyard.com/api/external/v1/usage")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trackyard.com/api/external/v1/usage")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"usage": [
{
"timestamp": "<string>",
"endpoint": "<string>",
"status_code": 123,
"credits_consumed": 123,
"response_time_ms": 123
}
],
"total_count": 123,
"offset": 123,
"limit": 123
}Returns a paginated list of your API calls with timestamps, endpoints, status codes, credits consumed, and response times.
Cost: Free (does not consume credits)
Authentication
Authorization: Bearer your_api_key_here
Query Parameters
number
default:50
Number of records to return per page.Range: 1-100
number
default:0
Pagination offset.
Example Request
curl "https://api.trackyard.com/api/external/v1/usage?limit=50&offset=0" \
-H "Authorization: Bearer $TRACKYARD_API_KEY"
Response
array
required
Array of usage records.
number
required
Total number of usage records available.
number
required
Current pagination offset.
number
required
Number of records returned in this response.
Example Response
{
"usage": [
{
"timestamp": "2026-02-20T14:22:15Z",
"endpoint": "/search",
"status_code": 200,
"credits_consumed": 1,
"response_time_ms": 142
},
{
"timestamp": "2026-02-20T14:20:08Z",
"endpoint": "/download-track",
"status_code": 200,
"credits_consumed": 1,
"response_time_ms": 387
},
{
"timestamp": "2026-02-20T14:18:32Z",
"endpoint": "/me",
"status_code": 200,
"credits_consumed": 0,
"response_time_ms": 28
}
],
"total_count": 127,
"offset": 0,
"limit": 50
}
Use Cases
Audit API usage
Audit API usage
Track which endpoints are being called and when.
Debug issues
Debug issues
Check status codes and response times to identify failures.
Monitor credit consumption
Monitor credit consumption
See which operations are consuming the most credits.
Build usage dashboards
Build usage dashboards
Integrate usage data into your internal analytics.
Pagination Example
import requests
API_KEY = "your_api_key_here"
BASE = "https://api.trackyard.com/api/external/v1"
headers = {"Authorization": f"Bearer {API_KEY}"}
# Fetch all usage records
all_records = []
offset = 0
limit = 100
while True:
response = requests.get(
f"{BASE}/usage?limit={limit}&offset={offset}",
headers=headers
)
data = response.json()
all_records.extend(data["usage"])
if len(data["usage"]) < limit:
break # No more records
offset += limit
print(f"Total records fetched: {len(all_records)}")
Next Steps
Account Metadata
Get tier, credits, and rate limits
Rate Limits
Understand credit consumption