# G2 关键词搜索 API (g2.search)

- Canonical page: https://everyinfra.com/g2-api/search
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "g2", "action": "search", "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 50 per call
- Mode: sync; add "mode": "async" for slow tasks

## Health

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

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| keyword | not declared | yes | not declared | G2 软件产品搜索词；用于发现产品条目，不是点评正文检索。 |
| limit | integer (1–50) | no | 10 | 这次调用最多返回的条数，整数，1–50；不传按默认值，实际返回可能少于这个数。超过上限会在扣费前返回 422。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| product_name | 产品名称。 |
| url | 该记录在原平台上的可访问链接。 |
| reviews_url | 评价列表页链接。 |
| description | 简介或描述，通常比 text 短。 |
| vendor_name | 厂商名称。 |
| vendor_url | 厂商在 G2 的主页。 |
| rating | 评分。**分制随平台而异**，同一行的 `rating_scale` 给出该平台满分 (多数是 5，Booking/豆瓣/爱奇艺/NAVER 是 10)。跨平台比较前必须先按 rating_scale 换算。直接比数字会得出反的结论。 |
| rating_scale | 上一列 `rating` 的满分。5 表示五星制、10 表示十分制。只在该行有 rating 时出现。 |
| review_count | 评价条数，用于商品/商家类能力。null 表示不公开，不等于 0。 |
| rank | 在所属分类里的排名。 |
| image_url | 图片链接。多图能力可能返回 image_urls 数组。 |
| categories | 该产品所属的分类列表。 |
| platform | 数据来源平台标识，与请求里的 platform 一致（如 xiaohongshu、tiktok）。 |
| rating_out_of_ten | 10 分制评分。**与 aggregate_rating 量纲不同，别混着比。** |
| pricing_type | 计价方式（订阅 / 买断 / 免费增值）。 |
| item_type | 条目类型。 |
| is_sponsored | 是否为付费推广位。**推广位排在前面不代表评分更高。** |

## 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": "search",
  "params": {
    "keyword": "project management"
  }
}'
```

```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": "search",
        "params": {
            "keyword": "project management",
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

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

```text
{
  "id": "req_…",
  "platform": "g2",
  "action": "search",
  "results": [
    {
      "product_name": "Microsoft Project & Portfolio Management",
      "url": "https://www.g2.com/products/microsoft-microsoft-project-portfolio-management/reviews",
      "reviews_url": "https://www.g2.com/products/microsoft-microsoft-project-portfolio-management/reviews",
      "description": "Microsoft Project & Portfolio Management (PPM) helps you get started quickly and execute projects with ease. Built-in templates, familiar scheduling tools, and access across devices increase productivity for project managers and teams.",
      "vendor_name": "Microsoft",
      "vendor_url": "https://www.g2.com/sellers/microsoft",
      "rating": 4,
      "rating_out_of_ten": 8,
      "review_count": 1627,
      "item_type": "Software",
      "rank": 1,
      "is_sponsored": false,
      "image_url": "https://images.g2crowd.com/uploads/product/image/71cbbc9a2be6ec792b4636a61923c4e1/microsoft-microsoft-project-portfolio-management.jpg",
      "categories": [
        "Earned Value Management",
        "Project and Portfolio Management",
        "Project Management"
      ],
      "platform": "g2",
      "rating_scale": 5
    },
    {
      "product_name": "Oracle Project Management Cloud",
      "url": "https://www.g2.com/products/oracle-oracle-project-management-cloud/reviews",
      "reviews_url": "https://www.g2.com/products/oracle-oracle-project-management-cloud/reviews",
      "description": "Project Management Cloud provides modern project execution tools and methods that you can adopt as part of an Oracle Cloud Suite or deploy with existing solutions.",
      "vendor_name": "Oracle",
      "vendor_url": "https://www.g2.com/sellers/oracle",
      "rating": 3.8,
      "rating_out_of_ten": 7.6,
      "review_count": 39,
      "item_type": "Software",
      "rank": 2,
      "is_sponsored": false,
      "image_url": "https://images.g2crowd.com/uploads/product/image/aca40b5464fcf97310dbc332c2296b5c/oracle-oracle-project-management-cloud.png",
      "categories": [
        "Project Management"
      ],
      "platform": "g2",
      "rating_scale": 5
    }
  ],
  "count": 10,
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

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