Skip to Content
API ReferenceUsage Stats

Usage Stats

View API usage statistics for your account, including request counts, rate limit status, and active streams.

GET /api/v1/account/usage

This 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 -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_usage789abc

Error Responses

401 Unauthorized

{ "error": { "code": "unauthorized", "message": "Invalid or missing API key", "docs": "https://sharpapi.io/docs/authentication" } }

Response Fields

Requests Object

FieldTypeDescription
todaynumberTotal API requests today (UTC)
this_weeknumberTotal API requests this week
this_monthnumberTotal API requests this billing month

Requests Limit Object

FieldTypeDescription
per_minutenumberMaximum API requests allowed per minute
remainingnumberRequests remaining in the current rate limit window
resets_atstringISO 8601 timestamp when the rate limit window resets

Streams Object

FieldTypeDescription
activenumberNumber of currently active SSE/WebSocket streams
maxnumberMaximum concurrent streams allowed (0 if streaming not enabled)

Period Object

FieldTypeDescription
startstringISO 8601 start of the current billing month
endstringISO 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`); }
Last updated on