# G2 Users Reviews Products (`g2-scraper/g2-users-reviews-products`)

Easily access all of G2s data for your competitor analysis and lead gen. Access linkedin profiles, review content, product/vendor info, and more.

- **URL**: https://beta-securitybyobscurity.apify.com/g2-scraper/g2-users-reviews-products.md
- **Developed by:** [G2 Scraper](https://beta-securitybyobscurity.apify.com/g2-scraper) (community)
- **Categories:** Lead generation, Social media, Integrations
- **Stats:** 115 total users, 28 monthly users, 72.3% runs succeeded, NaN bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

$25.00 / 1,000 results

This Actor is paid per result. You are not charged for the Apify platform usage, but only a fixed price for dataset items the Actor outputs.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-result

# README

## G2 Scraper API Actor

This Apify actor serves as a wrapper around the G2 Scraper API, providing access to various data points like product details, vendor information, reviews, and user data.

### Input Configuration

The actor requires a JSON input object specifying the desired `endpoint` and the necessary parameters for that endpoint. The `endpoint` field determines which API endpoint to call.

#### Common Parameters

- `endpoint` (string, required): The specific API endpoint to target. See the list below for valid values.

#### Endpoint-Specific Parameters

Below are the valid `endpoint` values and the additional parameters they require:

1. **`autocomplete`**
   - **Description:** Retrieves autocomplete suggestions based on a search query.
   - **Requires:**
     - `query` (string): The search term for autocompletion.
   - **Returns:** A list of autocomplete suggestion strings.

2. **`product_info`**
   - **Description:** Fetches detailed information about a specific product.
   - **Requires:**
     - `slug` (string): The unique identifier (slug) of the product.
   - **Returns:** An object containing detailed product information.

3. **`product_competitors`**
   - **Description:** Retrieves a list of competitors for a given product.
   - **Requires:**
     - `slug` (string): The unique identifier (slug) of the product.
   - **Returns:** A list of objects, each representing a competitor product.

4. **`product_reviews`**
   - **Description:** Gets reviews for a specific product, with options for pagination and filtering.
   - **Requires:**
     - `id` (string | number): The unique ID of the product.
   - **Optional:**
     - `page` (number): The page number for paginated results (defaults to 1).
     - `starRating` (number): Filters reviews by a specific star rating (e.g., 5).
     - `sortOrder` (string): Specifies the sorting order for reviews (e.g., 'newest', 'highest\_rated').
   - **Returns:** A list of review objects for the specified product.

5. **`vendor_info`**
   - **Description:** Fetches detailed information about a specific vendor.
   - **Requires:**
     - `slug` (string): The unique identifier (slug) of the vendor.
   - **Returns:** An object containing detailed vendor information.

6. **`vendor_products`**
   - **Description:** Retrieves a list of products offered by a specific vendor, with pagination.
   - **Requires:**
     - `slug` (string): The unique identifier (slug) of the vendor.
   - **Optional:**
     - `page` (number): The page number for paginated results (defaults to 1).
   - **Returns:** A list of product objects associated with the vendor.

7. **`user_info`**
   - **Description:** Gets information about a specific user.
   - **Requires:**
     - `id` (string | number): The unique ID of the user.
   - **Returns:** An object containing user profile information.

8. **`user_products`**
   - **Description:** Retrieves a list of products associated with a specific user.
   - **Requires:**
     - `id` (string | number): The unique ID of the user.
   - **Returns:** A list of product objects associated with the user.

9. **`user_reviews`**
   - **Description:** Gets reviews written by a specific user, with pagination.
   - **Requires:**
     - `id` (string | number): The unique ID of the user.
   - **Optional:**
     - `page` (number): The page number for paginated results (defaults to 1).
   - **Returns:** A list of review objects written by the specified user.

### Output

The actor pushes the results of the API call to the Apify dataset.

- For endpoints returning a single item (like `product_info`, `vendor_info`, `user_info`), the dataset will contain one record with the details of that item.
- For endpoints returning lists (like `product_competitors`, `product_reviews`, `vendor_products`), each item in the list will be saved as a separate record in the dataset.
- If the API call is successful but there is no specific data to return (e.g., an empty list of reviews), a simple status message indicating success might be pushed instead.

If the actor encounters an error (either due to invalid input or an issue calling the API), the run will fail, and the dataset will be empty. Check the run log for error details.

# Actor input Schema

## `endpoint` (type: `string`):

Select the API endpoint to call.

## `query` (type: `string`):

The search term for autocomplete.

## `slug` (type: `string`):

The unique identifier string for a product or vendor (e.g., 'slack', 'microsoft'). Required for product\_info, product\_competitors, vendor\_info, vendor\_products.

## `id` (type: `string`):

The unique ID for a user. Required for user\_info, user\_products, user\_reviews.

## `page` (type: `integer`):

Optional: Page number for paginated results (product\_reviews, vendor\_products, user\_reviews). Starts at 1.

## `starRating` (type: `integer`):

Optional: Filter product reviews by star rating (1-5).

## `sortOrder` (type: `string`):

Optional: Specify sort order for product reviews ('g2\_default', 'most\_recent', 'most\_helpful', 'highest\_rated', 'lowest\_rated').

## Actor input object example

```json
{
  "endpoint": "product_info",
  "query": "crm software",
  "slug": "slack",
  "id": "adipat",
  "page": 1,
  "starRating": 1,
  "sortOrder": "g2_default"
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("g2-scraper/g2-users-reviews-products").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("g2-scraper/g2-users-reviews-products").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call g2-scraper/g2-users-reviews-products --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=g2-scraper/g2-users-reviews-products",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "G2 Users Reviews Products",
        "description": "Easily access all of G2s data for your competitor analysis and lead gen. Access linkedin profiles, review content, product/vendor info, and more.",
        "version": "0.0",
        "x-build-id": "uYBnfcbPHQ7q75let"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/g2-scraper~g2-users-reviews-products/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-g2-scraper-g2-users-reviews-products",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/g2-scraper~g2-users-reviews-products/runs": {
            "post": {
                "operationId": "runs-sync-g2-scraper-g2-users-reviews-products",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/g2-scraper~g2-users-reviews-products/run-sync": {
            "post": {
                "operationId": "run-sync-g2-scraper-g2-users-reviews-products",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "endpoint"
                ],
                "properties": {
                    "endpoint": {
                        "title": "API Endpoint",
                        "enum": [
                            "product_autocomplete",
                            "vendor_autocomplete",
                            "category_autocomplete",
                            "product_info",
                            "product_competitors",
                            "product_reviews",
                            "vendor_info",
                            "vendor_products",
                            "user_info",
                            "user_products",
                            "user_reviews"
                        ],
                        "type": "string",
                        "description": "Select the API endpoint to call.",
                        "default": "product_info"
                    },
                    "query": {
                        "title": "Search Query (for Autocomplete)",
                        "type": "string",
                        "description": "The search term for autocomplete.",
                        "default": "crm software"
                    },
                    "slug": {
                        "title": "Slug (for Product/Vendor)",
                        "type": "string",
                        "description": "The unique identifier string for a product or vendor (e.g., 'slack', 'microsoft'). Required for product_info, product_competitors, vendor_info, vendor_products.",
                        "default": "slack"
                    },
                    "id": {
                        "title": "ID (for User)",
                        "type": "string",
                        "description": "The unique ID for a user. Required for user_info, user_products, user_reviews.",
                        "default": "adipat"
                    },
                    "page": {
                        "title": "Page Number",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Optional: Page number for paginated results (product_reviews, vendor_products, user_reviews). Starts at 1.",
                        "default": 1
                    },
                    "starRating": {
                        "title": "Star Rating Filter (for Product Reviews)",
                        "minimum": 1,
                        "maximum": 5,
                        "type": "integer",
                        "description": "Optional: Filter product reviews by star rating (1-5).",
                        "default": 1
                    },
                    "sortOrder": {
                        "title": "Sort Order (for Product Reviews)",
                        "type": "string",
                        "description": "Optional: Specify sort order for product reviews ('g2_default', 'most_recent', 'most_helpful', 'highest_rated', 'lowest_rated').",
                        "default": "g2_default"
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
