TidyTools

App Store top charts

POST https://tools.yukai.uk/api/v1/appstore/charts

Get App Store top charts. Apple's top charts for a country, device and category, up to rank 100 (Apple's limit).

Cost

Credits: 5 per chart entry ($0.0005 per chart entry). 250 credits are reserved before the call; the call is then settled on the real number of items returned. Failed calls are free. Source price: app-store-top-charts/chart-entry.

Input

Send a JSON body (POST) or the same fields as a query string (GET).

No field is required.

FieldTypeDefaultDescription
countrystring"us"Two-letter App Store country (storefront). Default: the country in the App Store URL, else us.
chartstring"topfree"Chart. new* charts exist for iPhone only; Mac has topfree only.
devicestring"iphone"Device.
categorystringApp Store category: a name (Productivity, Games: Puzzle) or genre id (6007). Default: all categories.
limitinteger100Number of ranks.

Examples

Replace tt_live_XXXX with your key from the pricing page.

curl

curl -i -X POST "https://tools.yukai.uk/api/v1/appstore/charts" \
  -H "Authorization: Bearer tt_live_XXXX" \
  -H "Content-Type: application/json" \
  -d '{"country":"us"}'

JavaScript (fetch)

const res = await fetch("https://tools.yukai.uk/api/v1/appstore/charts", {
  method: "POST",
  headers: { "Authorization": "Bearer tt_live_XXXX", "Content-Type": "application/json" },
  body: JSON.stringify({"country":"us"}),
});
console.log(res.status, res.headers.get("x-credits-charged"), res.headers.get("x-credits-balance"));
console.log(await res.json());

Python (requests)

import requests

r = requests.post(
    "https://tools.yukai.uk/api/v1/appstore/charts",
    headers={"Authorization": "Bearer tt_live_XXXX"},
    json={"country": "us"},
    timeout=120,
)
print(r.status_code, r.headers.get("x-credits-charged"), r.headers.get("x-credits-balance"))
print(r.json())

Response

JSON with "success": true and the result fields; on failure {"success": false, "error": {"code", "message", "retryable"}} and no credits are used. Every answer carries x-credits-charged (credits used) and x-credits-balance (balance after the call); check the balance any time with GET https://tools.yukai.uk/v1/billing/balance.

Full field list and response schema: OpenAPI spec app-store (its servers entry is the marketplace gateway; call https://tools.yukai.uk with your key).

← All routes · Pricing