# Google Play 竞品应用 API (google_play.competitors)

- Canonical page: https://everyinfra.com/google-play-api/competitors
- Endpoint: POST /api/v1/social with {"platform": "google_play", "action": "competitors", "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_id` 找出和目标应用在搜索词上重合的应用，每个竞品一行，按共同关键词个数 `shared_keywords` 从多到少排，并给出共同词下的平均名次 `avg_position`（越小越靠前）、前 10 名个数 `shared_top10_keywords` 和月搜索量合计 `shared_search_volume`。它回答「谁在和我抢同一批搜索词」。

`app_id` 是 Android 包名，例如 com.whatsapp，也可以填 play.google.com 的应用链接，不是 Apple App Store 的数字 ID。`target_app_id` 每行相同，就是这次查的目标应用。默认 20 条，最多 100 条。

## Health

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

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| app_id | not declared | yes | not declared | Android 应用包名，例如 com.spotify.music，即 Play 商店链接 ?id= 后的值；也可以直接填 play.google.com 的应用链接。不是 Apple App Store 的数字 ID。 |
| country | not declared | no | not declared | Google Play 店面国家/地区：只支持 us（美国站，默认），传别的国家在扣费前被拒。 |
| limit | integer (1–100) | no | 20 | 这次调用最多返回的条数，整数，1–100；不传按默认值，实际返回可能少于这个数。超过上限照收，按上限返回。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| app_id | 应用包名（如 com.example.app），Google Play 的唯一标识。 |
| shared_keywords | 这个竞品和目标 App 都排得上的关键词个数（competitors），按它从多到少排。 |
| avg_position | 竞品在共同关键词下的平均名次（competitors），越小越靠前。 |
| shared_top10_keywords | 共同关键词里，竞品排进前 10 的个数（competitors）。 |
| shared_search_volume | 共同关键词的月搜索量合计（competitors）。 |
| keyword_count | 这个 App 排得上的关键词总数（bulk_metrics、competitors）。 |
| top10_keywords | 排进前 10 的关键词个数（bulk_metrics、competitors，含前 3）。 |
| target_app_id | 这次查的目标 App（competitors），每行相同。 |
| 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": "competitors",
  "params": {
    "app_id": "com.whatsapp"
  }
}'
```

```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": "competitors",
        "params": {
            "app_id": "com.whatsapp",
        },
    },
    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": "competitors",
  "results": [
    {
      "app_id": …,
      "shared_keywords": …,
      "avg_position": …,
      "shared_top10_keywords": …,
      "shared_search_volume": …,
      "keyword_count": …,
      "top10_keywords": …,
      "target_app_id": …,
      "platform": …
    }
  ],
  "count": …,
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## FAQ

### 竞品列表先看哪几行？

结果按 `shared_keywords` 从多到少排，共同关键词最多的竞品在最前面。重合多只说明搜索词撞得多，还要看 `avg_position` 和 `shared_top10_keywords`：平均名次越小、前 10 的个数越多，这个竞品在共同词上的位置就越靠前。

### 这一页和批量 App 排名指标怎么配合？

这一页从一个目标应用出发，找出竞品；批量 App 排名指标收一批包名，每个应用一行给汇总数字，收 1–20 个。先用这一页挑出 `shared_keywords` 靠前的几个竞品，再把它们的 `app_id` 连同自己的包名放进批量指标，对比前 1、前 3 的个数和全部关键词的搜索量合计，这几项这一页没有。

### `app_id` 能填 Apple App Store 的数字 ID 吗？

不能。这里只认 Android 应用包名，也就是 Play 商店链接 ?id= 后面那段，或者直接贴 play.google.com 的应用链接。店面同样受限：`country` 只接受 us，填其他国家的请求在扣费前就会被拒掉。

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