# App Store 多个 App 共同关键词 API (app_store.keyword_intersection)

- Canonical page: https://everyinfra.com/app-store-api/keyword_intersection
- Endpoint: POST /api/v1/social with {"platform": "app_store", "action": "keyword_intersection", "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_ids` 找出你传入的几个应用同时排得上的关键词，一行一个词，带 `search_volume`、该词在商店里搜出的应用总数 `search_result_count`，以及各应用在这个词下的名次 `rankings`。它回答「这几款竞品在哪些词上正面撞车」，适合找该抢的词，也能看出定位重叠。

`app_ids` 要 2 到 10 个，只查美国站。每行的排名和搜索量不是实时的，`ranked_at` 记着它们最近一次更新的时间，刷新周期在一周到一个月之间。各应用的关键词总数，用批量排名指标。

## Health

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

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| app_ids | not declared | yes | not declared | 要查的 App Store 应用 ID，数组或逗号分隔的字符串，每个是应用链接里 id 后面那串数字（如 324684580）。bulk_metrics 收 1–20 个（一个应用一行，没有数据的不出行），keyword_intersection 收 2–10 个（一行一个共同关键词）；只查美国站。 |
| 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_result_count | 该关键词在商店里搜出的 App 总数（keywords_for_app）。 |
| ranked_at | 这个关键词的排名和搜索量最近一次更新的时间（keywords_for_app，ISO）；数据按周到按月刷新，不是实时。 |
| rankings | 这组 App 各自在该关键词下的名次（keyword_intersection），按传入顺序，每项有 app_id、search_rank、title、url。 |
| 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": "keyword_intersection",
  "params": {
    "app_ids": [
      "324684580",
      "1017492454"
    ]
  }
}'
```

```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": "keyword_intersection",
        "params": {
            "app_ids": [
                "324684580",
                "1017492454",
            ],
        },
    },
    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": "keyword_intersection",
  "results": [
    {
      "keyword": …,
      "search_volume": …,
      "search_result_count": …,
      "ranked_at": …,
      "rankings": …,
      "total_keywords": …,
      "platform": …
    }
  ],
  "count": …,
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## FAQ

### `rankings` 里的名次怎么对应到应用？

`rankings` 按你传入 `app_ids` 的顺序排列，每一项有应用 ID、名次、标题和链接，不用再去反查应用名。同一行里名次数字越小排得越靠前，两个应用的名次差，就是它们在这个词上的差距。

### `total_keywords` 为什么每一行都一样？

因为它说的是整组应用：这组应用一共有多少个共同关键词，不属于哪一行。返回几行由 `limit` 定，默认 20、最多 100，共同词比这个多时，`total_keywords` 就会大于行数。

### 只传一个应用可以吗？

不行，这一项要 2 到 10 个应用，因为它找的是几个应用的共同关键词。想看一个应用自己的关键词，用 App 关键词排名，它只要一个应用 ID。

## 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
