Integrate key status
Set LITESCRAPE_API_KEY on your server. Use the SDK's status helper, not a scraper request.
pip install litescrape-sdk
from litescrape_sdk import key_status
# Reads LITESCRAPE_API_KEY from your server environment.
status = key_status()
print(status)Request parameters
No query parameters or request body are required. Send Authorization: Bearer YOUR_API_KEY in the request headers. Never place your key in the URL or browser bundle.
Response
{
"remaining_calls": 10000,
"concurrency_limit": 25,
"status": "active"
}remaining_calls- Calls currently available to spend. For a key in an account, this is the account's shared balance.
concurrency_limit- Configured simultaneous requests across endpoints. Keys in an account share the account's limit; other keys have their own. It is not a count of active requests or available slots.
statusactiveidentifies a usable key.
The full response also contains pricing and credit-expiry information. Keys in an account also return monthly_allowance_units and allowance_used for any monthly cap the account owner set; a key at its cap gets 402 allowance_exhausted.
Missing, malformed or invalid keys return 401 invalid_key; revoked keys return 403 revoked_key.