# G2

Software review and research platform for B2B buyers. Access reviews, product data, competitor comparisons, and buyer intent signals.

## Capabilities

| Integration | Available | Notes |
|-------------|-----------|-------|
| API | ✓ | Reviews, Products, Reports, Categories, Tracking |
| MCP | - | Not available |
| CLI | ✓ | [g2.js](../clis/g2.js) |
| SDK | - | REST API with JSON:API format |

## Authentication

- **Type**: API Token
- **Header**: `Authorization: Token token={YOUR_API_TOKEN}`
- **Content-Type**: `application/vnd.api+json` (JSON:API)
- **Get token**: G2 Admin Portal > Integrations > API Tokens
- **Docs**: https://data.g2.com/api/docs

## Common Agent Operations

### List reviews (survey responses)

```bash
GET https://data.g2.com/api/v1/survey-responses?page[size]=25&page[number]=1

Headers:
  Authorization: Token token={API_TOKEN}
  Content-Type: application/vnd.api+json
```

### Get a specific review

```bash
GET https://data.g2.com/api/v1/survey-responses/{id}

Headers:
  Authorization: Token token={API_TOKEN}
  Content-Type: application/vnd.api+json
```

### Filter reviews by product

```bash
GET https://data.g2.com/api/v1/survey-responses?filter[product_id]={product_id}&page[size]=25

Headers:
  Authorization: Token token={API_TOKEN}
  Content-Type: application/vnd.api+json
```

### List products

```bash
GET https://data.g2.com/api/v1/products?page[size]=25&page[number]=1

Headers:
  Authorization: Token token={API_TOKEN}
  Content-Type: application/vnd.api+json
```

### Get a specific product

```bash
GET https://data.g2.com/api/v1/products/{id}

Headers:
  Authorization: Token token={API_TOKEN}
  Content-Type: application/vnd.api+json
```

### List reports

```bash
GET https://data.g2.com/api/v1/reports?page[size]=25&page[number]=1

Headers:
  Authorization: Token token={API_TOKEN}
  Content-Type: application/vnd.api+json
```

### List categories

```bash
GET https://data.g2.com/api/v1/categories?page[size]=25&page[number]=1

Headers:
  Authorization: Token token={API_TOKEN}
  Content-Type: application/vnd.api+json
```

### Get competitor comparisons

```bash
GET https://data.g2.com/api/v1/competitor-comparisons?filter[product_id]={product_id}&page[size]=25

Headers:
  Authorization: Token token={API_TOKEN}
  Content-Type: application/vnd.api+json
```

### Get tracking events (buyer intent)

```bash
GET https://data.g2.com/api/v1/tracking-events?filter[start_date]=2025-01-01&filter[end_date]=2025-12-31

Headers:
  Authorization: Token token={API_TOKEN}
  Content-Type: application/vnd.api+json
```

## API Pattern

G2 follows the JSON:API specification (https://jsonapi.org/):
- Responses use `data`, `attributes`, `relationships`, `meta` structure
- Pagination: `page[number]` and `page[size]` query parameters
- Filtering: `filter[field]=value` query parameters
- Reviews returned newest-first by default (10 per page default)

## Key Metrics

### Review Metrics
- `star_rating` - Overall star rating
- `title` - Review title
- `comment_answers` - Structured review responses (likes, dislikes, recommendations)
- `submitted_at` - Review submission date
- `is_public` - Whether the review is publicly visible

### Product Metrics
- `name` - Product name
- `slug` - URL slug on G2
- `avg_rating` - Average star rating
- `total_reviews` - Total review count
- `category` - G2 category placement

### Buyer Intent (Tracking)
- `company_name` - Visiting company name
- `page_visited` - G2 page URL visited
- `visited_at` - Visit timestamp
- `activity_type` - Type of buyer activity

## Parameters

### Pagination
- `page[number]` - Page number (default: 1)
- `page[size]` - Items per page (default: 10, max: 100)

### Review Filters
- `filter[product_id]` - Filter by product ID
- `filter[state]` - Filter by review state

### Tracking Filters
- `filter[start_date]` - Start date (YYYY-MM-DD)
- `filter[end_date]` - End date (YYYY-MM-DD)

## When to Use

- Monitoring and analyzing software product reviews
- Tracking buyer intent signals from G2 visitors
- Pulling competitor comparison data for positioning
- Feeding review data into CRM or marketing automation
- Building social proof content from G2 reviews
- Tracking G2 category rankings and report placements

## Rate Limits

- 10,000 requests per hour per API token
- Implement exponential backoff on 429 responses
- Cache results where possible to reduce API calls

## Relevant Skills

- competitor-alternatives
- social-proof
- reputation-management
- customer-feedback
- review-generation
