Ranks
Ranks show where your apps stand in the app stores. You can get them from the API in two ways:
- Basic reports show ranks across the countries and apps you select.
- Snapshot reports show the full standings for one country and category.
Generating a Ranks Report
Section titled “Generating a Ranks Report”Request
Section titled “Request”GET /ranks/{product_ids}/{granularity}/{start_date}/{end_date}?countries={countries}&filter={filter}&tz={tz}&format={format}Arguments
Section titled “Arguments”| Field | Type | Description |
|---|---|---|
| product_ids | Array | One or more product_ids to get ranks for. Separate multiple product_ids with a comma (,). |
| granularity | String | Data granularity: “hourly” or “daily”. |
| start_date | Date | Day to start the report on, in format yyyy-MM-dd. |
| end_date | Date | Day to end the report on, in format yyyy-MM-dd. |
| countries | Array | One or more countries to get ranks from. Separate multiple ISO codes with a semicolon (;). Defaults to US. See /data/countries for codes. |
| tz | String | (user | utc | est) The time zone to use. Defaults to est. |
| filter | Number | Limit results to ranks in the top N, where N is between 1 and 1,000. A filter of 100 returns only records with a rank better than 100 (ex. 25). Defaults to 400. Not all stores and categories go as deep as 1,000. |
| format | String | Output format: json or csv. Defaults to json. |
Response
Section titled “Response”This route returns a container with request metadata (start and end dates) and the ranks for each series. A series is one product’s rank over time in one country and category.
Container Representation:
| Field | Type | Description |
|---|---|---|
| start_date | Date | The start date of the report. |
| end_date | Date | The end date of the report. |
| dates | Array | The dates that the series positions and deltas below map to. |
| data | Array | List of series (see below). Each series has a category, country and product, plus arrays of positions and deltas that match the dates above. |
Series Representation:
| Field | Type | Description |
|---|---|---|
| country | String | ISO code of the country this series is for. |
| category | Category | Representation of the category this series is for. |
| product_id | Number | The product that this series is for. |
| positions | List of rank positions (1-indexed) that match the dates above. | |
| deltas | List of rank changes that match the dates above. The delta is always from the prior hour, even if the granularity is daily. |
Example Response
Section titled “Example Response”// GET /ranks/41046955155/daily/2019-06-05/2019-06-07/?countries=gb,us
{ "start_date": "2017-06-05T00:00:00", "end_date": "2017-06-07T00:00:00", "dates": [ "2017-06-05T00:00:00", "2017-06-06T00:00:00", "2017-06-07T00:00:00" ], "data": [ { "country": "US", "category": { "store": "apple", "store_id": 1, "device": "handheld", "device_id": 1, "name": "Games/Family", "subtype": "paid", "id": 7009, "parent_id": 6014 }, "product_id": 5923605, "positions": [ 186, 179, null ], "deltas": [ -3, 2, null ] }, . . . ]}Generating a Ranks Snapshot for a Category
Section titled “Generating a Ranks Snapshot for a Category”Request
Section titled “Request”GET /ranks/snapshots/{time}/{country}/{category}/{subcategory}/?top={top}Arguments
Section titled “Arguments”| Field | Type | Description |
|---|---|---|
| time | string | “current” for the most recent snapshot, or a date and hour within the last 24 hours, in format yyyy-mm-ddTHH. Note: Requests for times more than 24 hours ago return a 404. If you need older snapshots, contact us. |
| country | String | The ISO code of the country to get a snapshot for. See /data/countries for codes. |
| category | String | The category_id of the category to get a snapshot for. See /data/categories for IDs. |
| subcategory | String | The sub-category to get a snapshot for. Options: “free”, “paid”, “topgrossing”. |
| count | Number | Number of results to return, from 1 to 1,000. Defaults to 400. Not all stores and categories go as deep as 1,000. |
| start | Number | The result index to start from. Use it with count to page through a larger result set. |
Response
Section titled “Response”The response is a JSON object with the following properties:
| Field | Type | Description |
|---|---|---|
| category | Category | A representation of the category. |
| country | string | The ISO code of the app store’s country. The full name of the country is available in /data/countries. |
| timestamp | Date | The time we took the snapshot. |
| page_count | Number | The number of results on this page. |
| page_start | Number | The index this page starts on. |
| total_count | Number | The total number of entries in this snapshot. |
| entries | Array | The top apps, in order. |
Example Response
Section titled “Example Response”// GET /ranks/snapshots/current/us/71/free?count=1000
{ "page_count": 10, "page_start": 0, "total_count": 400, "country": "US", "category": { "store": "google_play", "store_id": 2, "device": "Handheld", "device_id": 1, "name": "Tools", "subtype": "Free", "id": 71 }, "timestamp": "2017-06-07T16:00:00", "entries": [ { "id": 5545649, "name": "Brightest Flashlight Free™", "developer": "GoldenShores Technologies, LLC", "icon": "http://lh6.ggpht.com/oxdTH6PDCgkz-6TkodfJc6fK3-xFsz_voyqslO2blEbAP0pow8R32KlS4sTPWS4j3A", "vendor_identifier": "goldenshorestechnologies.brightestflashlight.free", "package_name": "goldenshorestechnologies.brightestflashlight.free", "store_id": 2, "store": "google_play", "release_date": "2016-12-01T00:00:00-05:00", "added_date": "2016-12-01T02:21:09-05:00", "updated_date": "2017-06-04T03:00:00-04:00", "version": "2.3.4", "source": null, "type": "app", "devices": [ "Handheld" ], "price": { "currency": "USD", "price": "0.00" } }, ... ]}