Menu

getAppStats: retrieve application statistics

This method retrieves daily statistics for your application, which you register in Developer Center. Statistics are available only to the application owner. Improper access returns ERROR_ACCESS_DENIED.

The statistics are in the same format used in AntiCaptcha to render JS charts using the HighCharts libarary. You can re-format it in the way you need the data for your representations.

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

Request properties

PropertyTypeRequiredPurpose
clientKeyStringYes
softIdIntegerYesThe ID of your app from the Developer Center
modeStringNoType of stats:
errors: (default) : Errors data
views: App page views
downloads: Clicks on “download” link
users: Amount of users
money: Money earned

Request example

curl -i -H "Accept: application/json" \
     -H "Content-Type: application/json" \
     -X POST -d '{
    "clientKey":"YOUR_API_KEY",
    "softId":123,
    "mode":"errors"
}' https://api.anti-captcha.com/getAppStats


Response structure

PropertyTypePurpose
errorIdIntegerError identifier.
0 - no errors, operation completed successfully.
>0 - error identifier. Error code with short description are available in errorCode and errorDescription properties.
errorCodeString
errorDescriptionStringShort description of the error
chartDataArray
An object which contains the title of the chart data, daily values, dates, and more. Ready to be rendered with HighCharts.js library
fromDateStringStarting date of the report
toDateStringEnding date of the report

Response example

JSON with no errors
JSON with an error
{
  "errorId":0,
  "chartData":[
    {
      "name":"Accepted (paid)",
      "data":[
        {
          "date":"25 January",
          "shortdate":"25 Jan",
          "y":134587,
          "beginstamp":1548374400,
          "endstamp":1548460799,
          "stamp":1548374400
        },{
          "date":"26 January",
          "shortdate":"26 Jan",
          "y":87532,
          "beginstamp":1548460800,
          "endstamp":1548547199,
          "stamp":1548460800
        },{
        ...
        }],
        "itemname":"Captchas",
        "errorId":0,
        "code":"",
        "description":""
   },{
        "name":"No slots available (low bid)",
        "data":[
          ..
        ],
        "itemname":"Errors",
        "errorId":2,
        "count":82224,
        "code":"ERROR_NO_SLOT_AVAILABLE",
        "description":"No idle workers are available at the moment. Please try a bit later or increase your maximum bid in menu Settings - API Setup in Anti-Captcha Customers Area."
   }],
  "fromDate":"25 Jan 00:00",
  "toDate":"24 Feb 08:09"
}