> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mindcase.co/llms.txt
> Use this file to discover all available pages before exploring further.

# App Store Keyword Rankings

> Search the App Store for any keyword and get the apps that rank for it, in order: rank, app, developer, rating, reviews and price. Use it to track where you and your competitors rank for the searches that matter.

`POST /v1/data/app-store/keyword-rankings/run`

**Pricing:** $0.001 per ranked app ($1.00 per 1,000).

## Request

Send the inputs under `params`. Only the keys below are accepted; any other key returns `422 invalid_params`.

**keywords** `string[]` *required*

Searches to run on the App Store, e.g. meditation or budget tracker. One or more.

**country** `string` (default: US)

App Store country to rank in, e.g. United States. Defaults to United States.

105 allowed values, for example `DZ` (Algeria), `AO` (Angola), `AR` (Argentina), `AM` (Armenia), `AU` (Australia), `AT` (Austria), `AZ` (Azerbaijan), `BH` (Bahrain), `BB` (Barbados), `BE` (Belgium). Fetch the full list with `GET /v1/data/app-store/keyword-rankings?expand=options`.

**maxResults** `integer` (default: 10)

How many ranked apps to return per keyword, from rank 1 down. Defaults to 10; use 0 for all (up to 700).

Max `700`.

## Example

```bash cURL theme={null}
curl -X POST "https://api.mindcase.co/v1/data/app-store/keyword-rankings/run?wait=true" \
  -H "Authorization: Bearer $MINDCASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "params": {
    "keywords": [
      "meditation"
    ],
    "country": "US",
    "maxResults": 10
  }
}'
```

```python Python theme={null}
import os, requests

r = requests.post(
    "https://api.mindcase.co/v1/data/app-store/keyword-rankings/run",
    params={"wait": "true"},
    headers={"Authorization": f"Bearer {os.environ['MINDCASE_API_KEY']}"},
    json={"params": {
    "keywords": [
        "meditation"
    ],
    "country": "US",
    "maxResults": 10
}},
)
job = r.json()
rows = job.get("data", [])  # if job["status"] == "running", poll /v1/jobs/{job_id}/results
```

```javascript Node.js theme={null}
const r = await fetch("https://api.mindcase.co/v1/data/app-store/keyword-rankings/run?wait=true", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.MINDCASE_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ params: {
  "keywords": [
    "meditation"
  ],
  "country": "US",
  "maxResults": 10
} }),
});
const job = await r.json();
const rows = job.data ?? []; // if job.status === "running", poll /v1/jobs/{job_id}/results
```

## Response fields

Each row in `data` is one ranked app, keyed by these fields.

| Field | Name | Type |
| - | - | - |
| `keyword` | Keyword | text |
| `country` | Country | text |
| `rank` | Rank | number |
| `appId` | App ID | text |
| `title` | Title | text |
| `appUrl` | App URL | url |
| `rating` | Rating | rating |
| `ratingsCount` | Ratings Count | number |
| `free` | Free | boolean |
| `price` | Price | number |
| `currency` | Currency | text |
| `icon` | Icon | image |

## Example response

Abridged: long text and lists are shortened.

```json theme={null}
{
  "job_id": "7f3a1c2e-0b9d-4c55-9a51-3f2e8d1b6a40",
  "agent": "app-store/keyword-rankings",
  "status": "completed",
  "row_count": 1,
  "truncated": false,
  "data": [
    {
      "rating": 4.89511,
      "appId": "337472899",
      "rank": 1,
      "country": "US",
      "free": true,
      "ratingsCount": 448929,
      "icon": "https://is1-ssl.mzstatic.com/image/thumb/Purple211/v4/20/2a/47/202a4706-a8fc-d6ad-4a73-df0a0e3cb55f/AppIcon-0-0-1x_U007epad-0-1-85-220.png/512x512bb.jpg",
      "keyword": "meditation",
      "appUrl": "https://apps.apple.com/us/app/insight-timer-meditate-sleep/id337472899",
      "title": "Insight Timer: Meditate, Sleep",
      "currency": "USD",
      "price": 0
    }
  ]
}
```

## Related APIs

To start from an app instead of a keyword use [`app-store/app-keywords`](https://docs.mindcase.co/apis/app-store/app-keywords); for Google Play use [`google-play/keyword-rankings`](https://docs.mindcase.co/apis/google-play/keyword-rankings).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.