# G2 分类列表 API (g2.category)

- Canonical page: https://everyinfra.com/g2-api/category
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "g2", "action": "category", "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 40 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=category

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| category | not declared | yes | not declared | G2 /categories/<slug> 分类短名或完整 URL；从目标分类页复制，不是产品名称或自由文本关键词。 |
| limit | integer (1–40) | no | 10 | 这次调用最多返回的条数，整数，1–40；不传按默认值，实际返回可能少于这个数。超过上限会在扣费前返回 422。 |

## Response fields (items in `results`)

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

## 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": "category",
  "params": {
    "category": "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": "category",
        "params": {
            "category": "project-management",
        },
    },
    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 10. `id`, `billing` and `quota` differ on every call, so only their shape is shown.

```text
{
  "id": "req_…",
  "platform": "g2",
  "action": "category",
  "results": [
    {
      "name": "Jira",
      "slug": "jira",
      "url": "https://www.g2.com/products/jira/reviews",
      "description": "By Atlassian",
      "vendor_name": "Atlassian",
      "vendor_slug": "atlassian",
      "category": "Project Management",
      "category_slug": "project-management",
      "rating": 4.5,
      "rating_out_of_ten": 9,
      "review_count": 7962,
      "rank": 1,
      "page": 1,
      "is_sponsored": false,
      "image_url": "https://images.g2crowd.com/uploads/product/image/large_detail/large_detail_793034d14bb0f3fa12d97cf3cc0032c4/jira.jpg",
      "platform": "g2",
      "rating_scale": 5
    },
    {
      "name": "Asana",
      "slug": "asana",
      "url": "https://www.g2.com/products/asana/reviews",
      "description": "By Asana",
      "vendor_name": "Asana",
      "vendor_slug": "asana",
      "category": "Project Management",
      "category_slug": "project-management",
      "rating": 4.5,
      "rating_out_of_ten": 9,
      "review_count": 13922,
      "rank": 2,
      "page": 1,
      "is_sponsored": false,
      "image_url": "https://images.g2crowd.com/uploads/product/image/large_detail/large_detail_2a3c6c39bf8b8eb277cfcd42d9bbca1e/asana.png",
      "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
