Documentation menu

getBalance: retrieve an account balance

Retrieve an account balance with its account key. Please don't call this method more often than once in 30 seconds and use a memory/disk cached value instead.

Address: https://api.anti-captcha.com/getBalance
Method: POST
Content-type: application-json

Request properties

Property Type Required Purpose
clientKey String Yes

Request example

CURL
          curl -i -H "Accept: application/json" \
     -H "Content-Type: application/json" \
     -X POST -d '{ "clientKey":"YOUR_API_KEY" }' \
https://api.anti-captcha.com/getBalance
        


Response structure

Property Type Purpose
errorId Integer Error identifier.
0 - no errors, the operation completed successfully.
>1 - error identifier. Error code and short description transferred in errorCode and errorDescription properties.
errorCode String
errorDescription String Short description of the error
balance Double Account balance value in USD

Response example

JSON with no errors
          {
    "errorId": 0,
    "balance": 12.3456
}
        
JSON with an error
          {
    "errorId": 1,
    "errorCode": "ERROR_KEY_DOES_NOT_EXIST",
    "errorDescription": "Account authorization key not found in the system"
}