G2 categories API
Every G2 software category, as a tree with parents and top-level groups.
GET /v1/g2/categoriesBeta1 credit per callRefunded on failureimport os, requests
res = requests.get(
"https://api.groundsocial.dev/v1/g2/categories",
headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
data = res.json()Response
200 · 1 credit{ "categories": [ { "slug": "active-learning-tools", "name": "Active Learning Tools", "url": "https://www.g2.com/categories/active-learning-tools", "parent_slug": null, "group": "Artificial Intelligence", "depth": 0 }, { "slug": "agentic-ai", "name": "Agentic AI Software", "url": "https://www.g2.com/categories/agentic-ai", "parent_slug": null, "group": "Artificial Intelligence", "depth": 0 }, "… 58 more" ], "total": 60}Response fields
200 with a G2CategoriesResponse, in G2’s own JSON.
| Field | Type | Description |
|---|---|---|
categories | G2Category[] | |
total | integer |
Status codes
| Status | Meaning |
|---|---|
200 | Every category. |
400 | Invalid input. Nothing was charged. |
401 | Missing or invalid API key. |
402 | Not enough credits, a spend cap was reached, or payment is required. |
403 | The target is private, or the account is suspended. |
404 | G2 lists no product by that name. |
429 | Too many requests. Wait for Retry-After seconds. |
503 | G2 is temporarily unavailable. Retryable; nothing was charged. |
Every error has code, message, hint and retryable. All error codes
G2 is a trademark of its owner. We are not affiliated with or endorsed by it.