Key and usage
Check which account and key a request authenticated as, and read your remaining scans and daily request counts.
Two routes report on the key itself. They work whatever endpoint groups the key is limited to. Neither spends scans, but both count toward the rate limit.
2 routes. Every path below is served under https://api.scanner.net, and every request carries the key header, so those two are not repeated per route. Shared errors and limits are in Requests and errors.
Who am I
GET /v1/whoamiThe account and key the request authenticated as. Use it to check a key works. No parameters.
curl "https://api.scanner.net/v1/whoami" \
-H "x-api-key: $SCANNER_API_KEY"Response:
{
"success": true,
"user": { "id": "...", "email": "ab***@example.com" },
"authentication": { "method": "api_key", "key": { "id": "...", "name": "production" } },
"plan": { "type": "scale", "rpm": 120 }
}plan.type is scale or enterprise. email is masked, and null when the account has none. plan.rpm is the per-minute limit for this key, after any lower limit you set on it.
Usage
GET /v1/usageRemaining scans, the key's limit, and daily request counts for the whole account (every key, plus the browser extension).
| Parameter | In | Type | Required | Notes |
|---|---|---|---|---|
days | query | integer | no | 1 to 90. Default 30. |
curl "https://api.scanner.net/v1/usage?days=7" \
-H "Authorization: Bearer $SCANNER_API_KEY"Response: { "success": true, "credits", "limit": { "rpm" }, "daily": [...] }.
credits: scans left on the account.daily: one row per day, client, endpoint group and status class, withdate(YYYY-MM-DD),clientType(api,extensionorindexer),endpointGroup(a path such as/explorer/address/:address),statusClass(2xx,4xx,429and so on),originandrequests.
Usage can take up to a minute to appear.