Usage Stats
View API usage statistics for your account, including request counts, rate limit status, and active streams.
GET /api/v1/account/usageThis endpoint replaces the former /me/usage endpoint. The response format has been updated to use the standard v1 envelope.
Authentication
Requires API key. Available to all tiers.
Example Requests
cURL
curl -X GET "https://api.sharpapi.io/api/v1/account/usage" \
-H "X-API-Key: YOUR_API_KEY"Response
Success (200)
{
"data": {
"requests": {
"today": 342,
"this_week": 2105,
"this_month": 14523,
"limit": {
"per_minute": 300,
"remaining": 287,
"resets_at": "2026-02-08T14:45:00.000Z"
}
},
"streams": {
"active": 2,
"max": 10
},
"period": {
"start": "2026-02-01T00:00:00.000Z",
"end": "2026-02-28T23:59:59.000Z"
}
},
"meta": {
"updated_at": "2026-02-08T14:50:00.123Z"
}
}Response Headers
X-RateLimit-Limit: 300
X-RateLimit-Remaining: 287
X-RateLimit-Reset: 1707401400
X-Data-Delay: 0
X-Request-Id: req_usage789abcError Responses
401 Unauthorized
{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key",
"docs": "https://sharpapi.io/docs/authentication"
}
}Response Fields
Requests Object
| Field | Type | Description |
|---|---|---|
today | number | Total API requests today (UTC) |
this_week | number | Total API requests this week |
this_month | number | Total API requests this billing month |
Requests Limit Object
| Field | Type | Description |
|---|---|---|
per_minute | number | Maximum API requests allowed per minute |
remaining | number | Requests remaining in the current rate limit window |
resets_at | string | ISO 8601 timestamp when the rate limit window resets |
Streams Object
| Field | Type | Description |
|---|---|---|
active | number | Number of currently active SSE/WebSocket streams |
max | number | Maximum concurrent streams allowed (0 if streaming not enabled) |
Period Object
| Field | Type | Description |
|---|---|---|
start | string | ISO 8601 start of the current billing month |
end | string | ISO 8601 end of the current billing month |
Use Cases
Monitor Rate Limit Usage
import requests
response = requests.get(
'https://api.sharpapi.io/api/v1/account/usage',
headers={'X-API-Key': 'YOUR_API_KEY'}
)
usage = response.json()['data']
limit = usage['requests']['limit']
usage_pct = (1 - limit['remaining'] / limit['per_minute']) * 100
print(f"Rate limit usage: {usage_pct:.1f}%")
print(f"Resets at: {limit['resets_at']}")Check Stream Availability
const { data } = await fetch(
'https://api.sharpapi.io/api/v1/account/usage',
{ headers: { 'X-API-Key': 'YOUR_API_KEY' } }
).then(r => r.json());
if (data.streams.active >= data.streams.max) {
console.log('All stream slots in use — close a stream before opening a new one');
} else {
console.log(`${data.streams.max - data.streams.active} stream slots available`);
}Related Endpoints
- Account Info - Account details, tier, and features
- API Key Management - Manage your API keys
- Pricing - Compare tier limits
Last updated on