Account API
Check your balance, usage statistics, and subscription status programmatically. Perfect for building dashboards or monitoring your API usage in real-time.
GET
/internal/v1/account
Returns comprehensive account information including billing details, active subscription, and usage metrics. Use the same API key you use for SERP requests.
Authentication
API Key via
X-API-KEY header
Request
# Using cURL curl https://api.serpsbot.com/internal/v1/account \ -H "X-API-KEY: your_api_key"
Response
{
"user": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"email": "you@company.com",
"has_api_access": true,
"created_at": "2024-01-15T10:30:00Z"
},
"billing": {
"balance": 45.50,
"currency": "USD",
"price_per_request": 0.005,
"max_concurrency": 20,
"auto_top_up": {
"enabled": true,
"threshold": 25.0,
"amount": 100.0
}
},
"subscription": null, // or object if subscribed
"usage_summary": {
"total_requests_ever": 125430,
"total_cost_ever": 627.15,
"requests_this_month": 8520,
"cost_this_month": 42.60
},
"server_time": "2024-01-20T14:32:10Z"
}
Key Fields
| Field | Type | Description |
|---|---|---|
| user.has_api_access | boolean | Whether API calls are allowed. false if balance is exhausted. |
| billing.balance | number | Current prepaid balance in USD. |
| billing.price_per_request | number | Cost per successful API request in USD. |
| billing.max_concurrency | integer | Your rate limit in requests per second. |
| subscription | object | null | Active subscription with plan details, or null for Pay-As-You-Go. |
| usage_summary | object | Lifetime and current month usage statistics. |
Errors
| Status | Description |
|---|---|
| 401 | Missing or invalid API key. |
| 403 | API key is disabled or revoked. |