Downloads Metrics API (Legacy and V2)
This API provides daily and aggregated app download metrics for authorized clients. It is used by external consumers to fetch downloads within a selected date range.
There are currently two endpoint versions:
- a legacy version kept for backward compatibility
- a v2 version with standard HTTP error semantics
All new client integrations must use the v2 endpoint.
Use this document as the single integration reference for both versions.
Which endpoint should I use?
| Version | Endpoint | Recommended for | Error HTTP behavior |
|---|---|---|---|
| Legacy | GET /misc/downloads-api | Existing clients already integrated | Always 200 (errors are in body) |
| V2 | GET /misc/v2/downloads-api | All new client integrations | Proper HTTP status codes (400/403/404/429/500) |
Base URL:
https://db.appinchina.co
Quick Start (Developers)
Request
curl "https://db.appinchina.co/misc/v2/downloads-api?id=YOUR_CLIENT_ID&start=2026-04-01&end=2026-04-30"
Required query params
id(string): your assigned client API IDstart(string): start dateend(string): end date
Rules
- Date range is inclusive.
startandendshould useYYYY-MM-DD.startmust be earlier than or equal toend.- Maximum date range is
366days. - Requests are subject to a daily usage limit.
Response Contract
Success shape
{
"data": {
"result": "success",
"usage": {
"dailyLimit": 100,
"usedToday": 4,
"remainingToday": 96
},
"downloadsData": {
"start": "2026-04-01",
"end": "2026-04-30",
"downloads": [
{
"store": "All Stores",
"updateDownloads": 278,
"newDownloads": 475,
"totalDownloads": 753
},
{
"store": "HUAWEI",
"downloadsArray": [
{
"date": "2026-04-01",
"updateDownloads": 100,
"newDownloads": 91,
"totalDownloads": 191
}
],
"updateDownloads": 214,
"newDownloads": 204,
"totalDownloads": 418
}
]
}
}
}
Error shape (both versions)
{
"data": {
"result": "error",
"responseBody": "human-readable message",
"errorCode": "MACHINE_READABLE_CODE"
}
}
Some errors include additional fields (for example: dailyLimit, usedToday, remainingToday, resetAt).
Error example
{
"data": {
"result": "error",
"responseBody": "daily limit reached",
"errorCode": "DAILY_LIMIT_REACHED",
"dailyLimit": 100,
"usedToday": 100,
"remainingToday": 0,
"resetAt": "2026-04-18T00:00:00.000Z"
}
}
Status Codes by Version
Legacy (/misc/downloads-api)
200 OKfor success and API-level errors.- Clients must always inspect
data.result.
V2 (/misc/v2/downloads-api)
200 OKsuccess400 Bad Requestmissing/invalid query params or invalid date range403 ForbiddenID not allowed404 Not Foundmapped internal app not found429 Too Many Requestsdaily limit reached500 Internal Server Errorserver-side processing error
Error Codes
MISSING_REQUIRED_QUERY_PARAMSINVALID_DATEINVALID_DATE_RANGEDATE_RANGE_TOO_LONGID_NOT_ALLOWEDID_NOT_FOUNDDAILY_LIMIT_REACHEDLIMIT_CHECK_FAILEDDOWNLOADS_FETCH_FAILED
Integration Guidance
- For all new client integrations, use the v2 endpoint.
- For existing legacy integrations, keep current behavior and migrate when convenient.
- In both versions, parse
data.resultanderrorCodefor deterministic handling.
Recommended handling logic
- Check HTTP status (especially in v2).
- Parse JSON body.
- Check
data.result:success-> processdownloadsDataerror-> handle byerrorCode
- Use
usage.remainingTodayfor client-side throttling/UX.
Migration Notes (Legacy -> V2)
- Path changes from
/misc/downloads-apito/misc/v2/downloads-api. - Error HTTP status semantics become standard in v2.
- Response body structure remains consistent (
data.result,downloadsData,errorCode).