# G2 Categories API Documentation

<p><strong>G2 Categories API</strong> returns the full G2 software category tree in one call: about 38 groups and 2,250 categories, each with slug, name and G2 URL. The tree changes slowly, so the response is cached for 24 hours. The call takes no parameters.</p><p>Category product lists are not available. Use the Search API to find products of a topic.</p>

- **Documentation:** [https://scrappa.co/docs/g2-api/g2_categories](https://scrappa.co/docs/g2-api/g2_categories)
- **API group:** G2 API
- **Endpoint:** `GET https://scrappa.co/api/g2/categories`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Example response

```json
{
    "data": {
        "groups": [
            {
                "name": "Sales Tools",
                "categories": [
                    {
                        "url": "https://www.g2.com/categories/crm",
                        "name": "CRM Software",
                        "slug": "crm"
                    }
                ]
            }
        ],
        "group_count": 38,
        "category_count": 2254
    },
    "meta": {
        "billable": true,
        "endpoint_family": "categories"
    },
    "success": true
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A required parameter or a value is invalid. This response is not billable. |
| 503 | Upstream Unavailable | G2 could not be reached or returned data that does not match the request. This response is not billable and is retryable. |

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
