Documentation 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 plugin. 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

Property Type Required Purpose
clientKey String Yes
softId Integer Yes The ID of your app from the Developer Center
mode String No Type 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
          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

Property Type Purpose
errorId Integer Error identifier.
0 - no errors, 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
chartData Array
An object which contains title of the chart data, daily values, dates and more. Ready to be rendered in HighCharts.js
fromDate String Starting date of the report
toDate String Ending date of the report

Response example

JSON with no errors
          {
  "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"
}
        
JSON with an error
          {
    "errorId": 1,
    "errorCode": "ERROR_KEY_DOES_NOT_EXIST",
    "errorDescription": "Account authorization key not found in the system"
}