# G2 同类替代产品 API (g2.alternatives)

- Canonical page: https://everyinfra.com/g2-api/alternatives
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "g2", "action": "alternatives", "params": {...}}
- Price: $0.001389 per call ($1.39 per 1,000 requests); failed calls and empty results are not charged
- Returns: list, default 10, max 30 per call
- Mode: sync; add "mode": "async" for slow tasks

G2 同类替代产品按一款软件的 G2 产品链接或 slug，列出 G2 上它的替代产品，每条带名称、slug、链接、简介、厂商、评分及满分、十分制评分、评价条数、入门档价格、分类内排名和图片。它回答「除了这款软件，还有哪些同类产品可选」，适合采购方搭建备选清单，产品营销和竞争情报团队梳理竞品格局。

`url` 填 /products/<slug> 形式的产品链接，或只填 slug，例如 slack。`rating` 要配合同一行的 `rating_scale` 读；`rating_out_of_ten` 是十分制，量纲不同，比较前先换算。`source_product_slug` 标出这一行由哪款源产品查出，批量查多款产品时可以用它归组。

## Health

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

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| url | not declared | yes | not declared | G2 /products/<slug> 产品 URL 或裸产品 slug；用于读取该软件产品的替代品。 |
| limit | integer (1–30) | no | 10 | 这次调用最多返回的条数，整数，1–30；不传按默认值，实际返回可能少于这个数。超过上限会在扣费前返回 422。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| name | 名称。用于账号/商品/商家类能力，指该对象本身的名字。 |
| slug | 该条目的 URL 短名。 |
| url | 该记录在原平台上的可访问链接。 |
| description | 简介或描述，通常比 text 短。 |
| vendor_name | 厂商名称。 |
| rating | 评分。**分制随平台而异**，同一行的 `rating_scale` 给出该平台满分 (多数是 5，Booking/豆瓣/爱奇艺/NAVER 是 10)。跨平台比较前必须先按 rating_scale 换算。直接比数字会得出反的结论。 |
| rating_scale | 上一列 `rating` 的满分。5 表示五星制、10 表示十分制。只在该行有 rating 时出现。 |
| review_count | 评价条数，用于商品/商家类能力。null 表示不公开，不等于 0。 |
| rank | 在所属分类里的排名。 |
| source_product_slug | 发起对比的源产品 slug（查竞品时用）。 |
| image_url | 图片链接。多图能力可能返回 image_urls 数组。 |
| platform | 数据来源平台标识，与请求里的 platform 一致（如 xiaohongshu、tiktok）。 |
| rating_out_of_ten | 10 分制评分。**与 aggregate_rating 量纲不同，别混着比。** |
| entry_level_price | 入门档价格。 |

## 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": "g2",
  "action": "alternatives",
  "params": {
    "url": "https://www.g2.com/products/slack/reviews"
  }
}'
```

```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": "g2",
        "action": "alternatives",
        "params": {
            "url": "https://www.g2.com/products/slack/reviews",
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

Real response to the example request above, captured 2026-09-26T08:56:04Z. `results` and `count` are real with personal information (names, handles, avatars, profile links, contact details) removed; the list keeps the first 2 of 5. `id`, `billing` and `quota` differ on every call, so only their shape is shown.

```text
{
  "id": "req_…",
  "platform": "g2",
  "action": "alternatives",
  "results": [
    {
      "name": "ClickUp",
      "slug": "clickup",
      "url": "https://www.g2.com/products/clickup/reviews",
      "description": "By ClickUp",
      "rating": 4.6,
      "rating_out_of_ten": 9.2,
      "review_count": 14374,
      "rank": 1,
      "source_product_slug": "slack",
      "image_url": "https://images.g2crowd.com/uploads/product/image/a05e90757d45fd56faa93611eb55814d/clickup.png",
      "platform": "g2",
      "rating_scale": 5
    },
    {
      "name": "monday AI Work Platform",
      "slug": "monday-com",
      "url": "https://www.g2.com/products/monday-com/reviews",
      "description": "By monday.com",
      "rating": 4.7,
      "rating_out_of_ten": 9.4,
      "review_count": 17228,
      "entry_level_price": "free",
      "rank": 2,
      "source_product_slug": "slack",
      "image_url": "https://images.g2crowd.com/uploads/product/image/ae6f6333a603f01784274fb154d92dfb/monday-com.png",
      "platform": "g2",
      "rating_scale": 5
    }
  ],
  "count": 5,
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## FAQ

### `url` 应该填什么？

填产品在 G2 上的链接，路径形如 /products/<slug>，例如 https://www.g2.com/products/slack/reviews；也可以只填 slug，即这个例子里的 slack。厂商页和分类页不是产品链接。只知道产品名时，先用 G2 关键词搜索找到它的 G2 链接。

### 替代产品的评分怎么比较？

`rating` 要和同一行的 `rating_scale`（满分）一起读，`rating_out_of_ten` 是十分制评分，两者量纲不同，不能混着比。比较前先按各自满分换算，再结合 `review_count` 看评价条数：条数少的评分波动大，null 表示没有公开。

### 找到替代产品之后还能做什么？

结果里的 `slug` 可以直接传给 G2 评价，读这款产品的用户点评，或传给 G2 主页或对象详情读产品资料；把源产品和替代品的 slug 一起交给 G2 产品对比，可以看到 G2 对比页上的分维度评分。

## Also

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