Call Statistics

Publicly query API call volume: how many times an endpoint was called, and the ranking of call volume per service. Only call counts are public; project and latency data are not.

/api/statistics/

Service Description

The statistics service publicly exposes call counts per endpoint: query how many times an endpoint has been called (total and today), or view a ranking of services by call volume. It is useful for public dashboards or your own monitoring panel.

This is the only open service on the site that requires no signature, and it can be called without logging in. The figures cover call counts only; no caller project, failure rate or latency information is exposed.

Data is pre-aggregated per day and writes are delayed by up to a few seconds, so a call you just made may not appear immediately.

Response Format

Every endpoint returns the same JSON envelope; the payload is always inside data:

{
  "code": 10000,
  "msg": "成功",
  "data": { ... }
}
  • code: business status code. 10000 means success; anything else is an error — see the Error Codes page for the full list.
  • msg: a human-readable message you can show to end users, but never use it for program logic.
  • data: the payload; usually null on error. Each endpoint's Response section lists its data fields.

Judge success by code, not by the HTTP status code. View all error codes

Call Volume Query

XiaoYingAPI built-in call statistics (daily pre-aggregation) Available · No Signature

Call volume is public information, so this Endpoint is open (no signature required). Data is aggregated daily, so writes may lag by a few seconds; only /api/ Endpoints are counted, including rejected authentication and unmatched routes.

GET /api/statistics/api_calls Total calls: 0

Query Call Volume of a Single Endpoint

Returns the total and today's call count of an Endpoint.

Required: an Endpoint path registered in the docs; for Endpoints with path parameters, pass the placeholder as documented, e.g. /api/music/xiaoying/musics/<uuid>

  • Public Endpoint, no project signature required.
  • Returns code=20003 if path is not registered, or code=20001 if path is missing.
Response Common envelope
Field Type Description
path string Queried endpoint path
total_calls int Total calls
today_calls int Calls today
Example response
{
  "path": "/api/email/v1/send",
  "total_calls": 12345,
  "today_calls": 67
}
GET /api/statistics/services Total calls: 0

Call Volume Ranking by Service

Returns each service's total and today's call count, sorted by total call volume descending.

  • Public Endpoint, no project signature required.
Response Common envelope
Field Type Description
services array Per-service call counts (descending by total)
services[].service string Service prefix (e.g. /api/email/)
services[].name string Service name
services[].total_calls int Total calls
services[].today_calls int Calls today
Example response
{
  "services": [
    {"service": "/api/email/", "name": "邮箱服务", "total_calls": 12345, "today_calls": 67}
  ]
}
XiaoYingAPI · Unified API Aggregation Service