# Google Play 多个 App 共同关键词 API (google_play.keyword_intersection)

- Canonical page: https://everyinfra.com/google-play-api/keyword_intersection
- Endpoint: POST /api/v1/social with {"platform": "google_play", "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

Google Play 多个 App 共同关键词把 2–10 个包名放进 `app_ids`，返回这组应用全都排得上的搜索词，一个词一行。每行的 `rankings` 列出各个应用在这个词下的名次，同一行还有 `keyword`、`search_volume` 和数据更新时间 `ranked_at`。它回答「这几个竞品在哪些搜索词上正面碰上了、谁排前面」，适合找要重点争的词。

`total_keywords` 每行都一样，是这组应用共有的关键词个数；`limit` 不改变它，只管这次取前几行，默认 20，传超过 100 的数也按 100 返回。店面只有美国站。

## Health

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

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| app_ids | not declared | yes | not declared | 要查的 Android 应用包名，数组或逗号分隔的字符串，每个是 Play 商店链接 ?id= 后面的值（如 com.spotify.music）。bulk_metrics 收 1–20 个（一个应用一行，没有数据的不出行），keyword_intersection 收 2–10 个（一行一个共同关键词）；只查美国站。 |
| country | not declared | no | not declared | Google Play 店面国家/地区：只支持 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 |
| 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": "google_play",
  "action": "keyword_intersection",
  "params": {
    "app_ids": [
      "com.spotify.music",
      "com.soundcloud.android"
    ]
  }
}'
```

```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": "google_play",
        "action": "keyword_intersection",
        "params": {
            "app_ids": [
                "com.spotify.music",
                "com.soundcloud.android",
            ],
        },
    },
    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": "google_play",
  "action": "keyword_intersection",
  "results": [
    {
      "keyword": …,
      "search_volume": …,
      "ranked_at": …,
      "rankings": …,
      "total_keywords": …,
      "platform": …
    }
  ],
  "count": …,
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## FAQ

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

`rankings` 是数组，顺序和你传入 `app_ids` 的顺序一致，每项带包名、名次、标题和链接，可以按位置或包名对应。要比谁在这个词上领先，比名次就行，数字越小越靠前。

### 只想比较各应用的关键词数量，需要这一页吗？

不需要。每个应用的关键词总数、前 1、前 3、前 10 名的个数和搜索量合计，批量 App 排名指标一次给一行，收 1–20 个包名。这一页收 2–10 个包名，给的是细到每个词的明细，要知道「哪些词是大家一起排得上的」才用它。

### 共同关键词的名次多久更新一次？

按周到按月刷新，不是实时；每行的 `ranked_at` 记着这个词的排名和搜索量上次更新的时间。拿几个应用的名次做对比前先看它；`total_keywords` 比你取回的行数大，说明还有没取出来的共同关键词，调大 `limit`（最多 100）可以多取一些。

## Also

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