# App Store App 关键词排名 API (app_store.keywords_for_app)

- Canonical page: https://everyinfra.com/app-store-api/keywords_for_app
- Endpoint: POST /api/v1/social with {"platform": "app_store", "action": "keywords_for_app", "params": {...}}
- Price: $0.01151 per call ($11.51 per 1,000 requests); failed and empty results are not charged
- Returns: list, default 20, max 100 per call (larger values are capped)
- Mode: sync; add "mode": "async" for slow tasks

App Store App 关键词排名按 `app_id` 列出一个应用排得上的关键词，一行一个词：该应用在这个词下的 `search_rank` 名次、搜索量 `search_volume`、这个词搜出的应用总数 `search_result_count`，并带上应用自己的标题、开发者、评分、是否免费和价格。它回答「这款应用靠哪些词被搜到」，适合摸清自家或竞品的关键词布局。

`app_id` 接受数字 ID 或整条 App Store 应用链接，Bundle ID 不行；只查美国站。要同时比较几个应用的共同词，用多个 App 共同关键词，它有每个应用的名次明细。

## Health

- Live health (24h percent, hourly and daily trends): https://api.everyinfra.com/api/v1/social/availability?platform=app_store&action=keywords_for_app

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| app_id | not declared | yes | not declared | Apple 的数字应用 ID，例如应用链接中 id 后的数字；也可将完整 App Store 应用链接放入此参数，系统提取数字 ID。不是 com.example.app 形式的 Bundle ID。 |
| country | not declared | no | not declared | App Store 店面国家/地区：只支持 us（美国站，默认），传别的国家在扣费前被拒。 |
| limit | integer (1–100) | no | 20 | 这次调用最多返回的条数，整数，1–100；不传按默认值，实际返回可能少于这个数。超过上限照收，按上限返回。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| keyword | platform-native meaning |
| search_volume | platform-native meaning |
| search_rank | 这个 App 在该关键词的商店搜索结果里排第几（keywords_for_app，从 1 开始）。 |
| search_result_count | 该关键词在商店里搜出的 App 总数（keywords_for_app）。 |
| ranked_at | 这个关键词的排名和搜索量最近一次更新的时间（keywords_for_app，ISO）；数据按周到按月刷新，不是实时。 |
| app_id | App Store 数字 ID。 |
| title | 标题。平台无标题概念时（如纯文本帖）为 null。 |
| url | 该记录在原平台上的可访问链接。 |
| icon_url | 应用图标。 |
| developer | 开发者名称。 |
| rating | 评分。**分制随平台而异**，同一行的 `rating_scale` 给出该平台满分 (多数是 5，Booking/豆瓣/爱奇艺/NAVER 是 10)。跨平台比较前必须先按 rating_scale 换算 —— 直接比数字会得出反的结论。 |
| rating_scale | 上一列 `rating` 的满分。5 表示五星制、10 表示十分制。只在该行有 rating 时出现。 |
| rating_count | 参与评分的人数。null 表示不公开，不等于 0。 |
| is_free | 是否免费下载（keywords_for_app）。 |
| price | 价格数值，不含货币符号；币种见 currency。 |
| currency | 价格币种代码（如 CNY、USD）。price 存在但 currency 为 null 时不要假定币种。 |
| total_keywords | 这个 App 一共有多少个排得上的关键词（keywords_for_app），或这组 App 一共有多少个共同关键词（keyword_intersection）；每行相同，limit 只决定这次给前多少个。 |
| platform | 数据来源平台标识，与请求里的 platform 一致（如 xiaohongshu、tiktok）。 |

## Example

```bash
curl -X POST 'https://api.everyinfra.com/api/v1/social' \
  -H "Authorization: Bearer $EVERYINFRA_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "platform": "app_store",
  "action": "keywords_for_app",
  "params": {
    "app_id": "389801252"
  }
}'
```

```python
import os
import requests

response = requests.post(
    "https://api.everyinfra.com/api/v1/social",
    headers={"Authorization": f"Bearer {os.environ['EVERYINFRA_API_KEY']}"},
    json={
        "platform": "app_store",
        "action": "keywords_for_app",
        "params": {
            "app_id": "389801252",
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

No real sample for these example parameters yet: structure only, every value is a placeholder (…).

```text
{
  "id": "req_…",
  "platform": "app_store",
  "action": "keywords_for_app",
  "results": [
    {
      "keyword": …,
      "search_volume": …,
      "search_rank": …,
      "search_result_count": …,
      "ranked_at": …,
      "app_id": …,
      "title": …,
      "url": …,
      "icon_url": …,
      "developer": …,
      "rating": …,
      "rating_scale": …,
      "rating_count": …,
      "is_free": …,
      "price": …,
      "currency": …,
      "total_keywords": …,
      "platform": …
    }
  ],
  "count": …,
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## FAQ

### `search_rank` 和 `search_result_count` 怎么一起读？

`search_rank` 是这个应用在该关键词的商店搜索结果里排第几，从 1 开始，`search_result_count` 是这个词一共搜出多少个应用。同样排第 3，搜出的应用总数越大，说明这个词下的竞争对手越多。

### 这里的数据是实时的吗？

不是。`ranked_at` 是这个关键词的排名和搜索量最近一次更新的时间，数据按周到按月刷新。对比两次读数时，先比较各行的 `ranked_at`，确认它们不是同一轮数据再下结论。

### 能一次拿到应用的全部关键词吗？

每次最多 100 行，默认 20 行。`total_keywords` 是这个应用一共有多少个排得上的关键词，每行相同，`limit` 只决定这次给前多少个，所以拿它和返回的行数比，就知道还剩多少没读。

## Also

- Capability catalog (no key): https://api.everyinfra.com/api/v1/social/catalog?platform=app_store
- OpenAPI: https://everyinfra.com/openapi.json · Agents guide: https://everyinfra.com/agents.md
