> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mindcase.co/llms.txt
> Use this file to discover all available pages before exploring further.

# G2 Products API

> Get G2 products with product name, product slug, product url, vendor name, rating, review count, by search keywords or categorys.

`POST /v1/data/g2/products/run`

**Pricing:** $0.004 per product ($4.00 per 1,000).

## Ways to call it

* **Search Keywords**: set `queries` (optional: `maxResults`)
* **Categorys**: set `categorys` (optional: `maxResults`)

## Request

Send the inputs under `params`. Only the keys below are accepted; any other key returns `422 invalid_params`.

**queries** `string[]`

One or more search keywords. One request reads them all.

**categorys** `string[]`

G2 category slugs or links, e.g. crm or [https://www.g2.com/categories/project-management](https://www.g2.com/categories/project-management). Returns the ranked products in each category.

**maxResults** `integer` (default: 100)

How many products to return in total. Defaults to 100; use 0 for all.

## Example

```bash cURL theme={null}
curl -X POST "https://api.mindcase.co/v1/data/g2/products/run?wait=true" \
  -H "Authorization: Bearer $MINDCASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "params": {
    "queries": [
      "crm"
    ],
    "maxResults": 10
  }
}'
```

```python Python theme={null}
import os, requests

r = requests.post(
    "https://api.mindcase.co/v1/data/g2/products/run",
    params={"wait": "true"},
    headers={"Authorization": f"Bearer {os.environ['MINDCASE_API_KEY']}"},
    json={"params": {
    "queries": [
        "crm"
    ],
    "maxResults": 10
}},
)
job = r.json()
rows = job.get("data", [])  # if job["status"] == "running", poll /v1/jobs/{job_id}/results
```

```javascript Node.js theme={null}
const r = await fetch("https://api.mindcase.co/v1/data/g2/products/run?wait=true", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.MINDCASE_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ params: {
  "queries": [
    "crm"
  ],
  "maxResults": 10
} }),
});
const job = await r.json();
const rows = job.data ?? []; // if job.status === "running", poll /v1/jobs/{job_id}/results
```

## Response fields

Each row in `data` is one product, keyed by these fields.

| Field | Name | Type |
| - | - | - |
| `productId` | Product ID | text |
| `productName` | Product Name | text |
| `productSlug` | Product Slug | text |
| `productUrl` | Product URL | url |
| `vendorName` | Vendor Name | text |
| `rating` | Rating | number |
| `reviewCount` | Review Count | number |
| `categories` | Categories | array |
| `description` | Description | text |
| `logoUrl` | Logo URL | url |
| `rank` | Rank | number |
| `query` | Query | text |

## Example response

Abridged: long text and lists are shortened.

```json theme={null}
{
  "job_id": "7f3a1c2e-0b9d-4c55-9a51-3f2e8d1b6a40",
  "agent": "g2/products",
  "status": "completed",
  "row_count": 1,
  "truncated": false,
  "data": [
    {
      "rating": 4.4,
      "logoUrl": "https://images.g2crowd.com/uploads/product/image/thumb/thumb_c7667c650c352acba4bfca38ee89457b/agentforce-sales-formerly-salesforce-sales-cloud.png",
      "productId": "506",
      "reviewCount": 26315,
      "rank": 1,
      "description": "Sell faster, smarter, and more efficiently with AI + Data + CRM. Boost productivity and grow in a whole new way with Sales Cloud.",
      "productSlug": "agentforce-sales-formerly-salesforce-sales-cloud",
      "query": "crm",
      "categories": [
        "Sales Planning",
        "Business Scheduling"
      ],
      "productName": "Salesforce Sales Cloud",
      "productUrl": "https://www.g2.com/products/agentforce-sales-formerly-salesforce-sales-cloud",
      "vendorName": "Salesforce"
    }
  ]
}
```

## Related APIs

For review text use [`g2/reviews`](https://docs.mindcase.co/apis/g2/reviews); for Capterra reviews use [`capterra/reviews`](https://docs.mindcase.co/apis/capterra/reviews); for Gartner Peer Insights use [`gartner/reviews`](https://docs.mindcase.co/apis/gartner/reviews).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.