getSpendingStats: retrieve account spending stats
This method grabs account spendings and task volume statistics for a 24 hour period.
Address: https://api.anti-captcha.com/getSpendingStats
Method: POST
Content-type: application-json
Request properties
Property | Type | Required | Purpose |
---|---|---|---|
clientKey | String | Yes | |
date | Integer | No | Unix timestamp of the hour from which we grab the 24 hour stats. |
queue | String | No | You can find the name of the queue in the AntiCaptcha statistics. If it's not provided, totals are calculated for all queues. Examples: "English ImageToText" "Recaptcha Proxyless" |
softId | Integer | No | The ID of your app from the Developer Center |
ip | String | No | Filter statistics by IP address you used for your API calls |
Request example
curl -i -H "Accept: application/json" \
-H "Content-Type: application/json" \
-X POST -d '{
"clientKey":"YOUR_API_KEY",
"date":1672185600,
"queue":"Recaptcha Proxyless"
}' https://api.anti-captcha.com/getSpendingStats
Response structure
Property | Type | Purpose |
---|---|---|
errorId | Integer | Error identifier. 0 - no errors, operation completed successfully. >0 - error identifier. Error code with short description are available in errorCode and errorDescription properties. |
errorCode | String | |
errorDescription | String | Short description of the error |
data | Array | Records of the following structure:
|
Response example
JSON with no errors
JSON with an error
{
"errorId":0,
"data":[
{
"dateFrom":1550533500,
"dateTill":1550537099,
"volume":1899,
"money":7.495948
},{
"dateFrom":1550537100,
"dateTill":1550540699,
"volume":2217,
"money":7.861741
}
.....
{
"dateFrom":1550612700,
"dateTill":1550616299,
"volume":2156,
"money":7.827058
}
]
}