Guide
getBalance: Balance

getBalance: retrieve account balance

Retrieve an account balance with its account key, Convenient to do your own alarm and query.

Example request

Request Structure

ParametersTypeRequiredDescription
clientKeyStringYesClient account key, can be found here
POST https://api.capsolver.com/getBalance
Host: api.capsolver.com
Content-Type: application/json
 
{
  "clientKey": "YOUR_API_KEY"
}

Example response

Response Structure

ParameterTypeDescription
errorIdIntegerError message:
0 - no error
1 - with error
errorCodeStringerrorCode: full list of errors
errorDescriptionStringShort description of the error
balanceDecimalAccount balance value in USD
packagesArrayMonthly/Weekly Packages

Example Response

{
  "errorId": 0,
  "balance": 1234567,
  "packages": [
    {
      "packageId": "12327bff7f703e135e7379kf",
      "type": 2,
      "title": "reCAPTCHA v2 500K",
      "numberOfCalls": 1234567,
      "status": 1,
      "token": "CAP-1234567C19044AF7351B31EC12345678",
      "expireTime": 1702896511
    }
  ]
}

Use SDK Request

#pip install --upgrade capsolver
#export CAPSOLVER_API_KEY='...'
 
import capsolver
# capsolver.api_key = "..."
balance = capsolver.balance()