# G2 Alternatives Scraper (`automation-lab/g2-alternatives-scraper`) Actor

Extract ranked G2 alternatives, direct comparison relationships, shared categories, feature gaps, ratings, review counts, and public pricing links for SaaS battlecards.

- **URL**: https://apify.com/automation-lab/g2-alternatives-scraper.md
- **Developed by:** [Stas Persiianenko](https://apify.com/automation-lab) (community)
- **Categories:** Business, Marketing, Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## G2 Alternatives Scraper

Build repeatable SaaS competitor maps from public G2 product data.

**G2 Alternatives Scraper** resolves products by G2 URL, slug, or name and returns one typed dataset row per alternative relationship. Each row combines ratings, review counts, shared categories, feature overlap, feature gaps, direct comparison evidence, and public pricing-page links for recurring SaaS battlecards.

The Actor distinguishes two kinds of evidence:

- `g2_comparison` means the source product exposes a public G2 comparison tag for the pair.
- `category_alternative` means the products share public G2 categories and were ranked using documented public product signals.

It never labels an inferred category peer as the order shown on G2's protected alternatives page.

### What can you do with G2 alternatives data?

Use the output to:

- refresh competitor battlecards on a schedule;
- map alternatives around a product or vendor;
- find direct comparison relationships published in G2 product metadata;
- compare public ratings and review volume;
- identify shared categories and feature keywords;
- find source-only and alternative-only feature terms;
- attach G2 product, comparison, and pricing-page links to CRM records;
- detect changes by comparing datasets from recurring runs.

The default `battlecard` mode returns direct comparison-tag relationships first, followed by relevant category peers.

### Who is this Actor for?

#### Product marketing teams

Create evidence-backed competitor lists before writing positioning pages, sales enablement material, or launch briefs.

#### Competitive intelligence analysts

Run the same inputs weekly or monthly and compare datasets to detect new peers, rating changes, review growth, or feature-keyword changes.

#### SaaS founders and product managers

Explore products that overlap in category and public feature context without manually opening many G2 profiles.

#### Sales and revenue operations teams

Enrich accounts and battlecards with stable product URLs, vendors, ratings, review counts, and pricing research links.

#### Data engineers and automation builders

Receive flat, typed relationship rows that work in JSON, CSV, Excel, webhooks, Make, Zapier, n8n, Python, or JavaScript.

### How the ranking works

The Actor uses G2's public structured product index rather than the protected `www.g2.com` alternatives page.

For each source product it:

1. resolves the exact G2 product;
2. reads public categories, feature keywords, ratings, review counts, and comparison tags;
3. retrieves a bounded pool of products sharing G2 category IDs;
4. places direct G2 comparison-tag relationships first;
5. scores remaining peers by shared categories, feature overlap, rating, and review volume;
6. emits the ranking method and relationship evidence in every row.

`relevanceScore` is the Actor's deterministic score. It is not represented as G2's protected-page rank.

### Input

You may provide `productUrls`, `searchQueries`, or both.

| Field | Type | Default | Description |
| --- | --- | --- | --- |
| `productUrls` | array | Slack URL in the Console prefill | G2 product URLs or bare product slugs. |
| `searchQueries` | string array | `[]` | Product or vendor names to resolve through G2 search. |
| `mode` | string | `battlecard` | `battlecard`, `alternatives`, or `comparisons`. |
| `maxItems` | integer | `20` | Maximum relationship rows across the run, from 1 to 1,000. |
| `maxAlternativesPerProduct` | integer | `10` | Maximum ranked alternatives for each source product, from 1 to 50. |
| `includeFeatureContext` | boolean | `true` | Include shared and pair-specific public feature keywords. |
| `includePricingLinks` | boolean | `true` | Include public G2 pricing-page links. |

At least one non-empty product URL/slug or search query is required.

### Relationship modes

#### `battlecard`

Returns direct comparison-tag relationships plus ranked category alternatives. Choose this for most competitive-intelligence workflows.

#### `alternatives`

Returns the complete ranked peer list, including direct comparisons when present. Choose this when broad coverage matters more than evidence type.

#### `comparisons`

Returns only relationships backed by direct public G2 comparison tags. Choose this for a narrower comparison-link inventory.

Some products expose no direct comparison tags. A successful `comparisons` run can therefore return zero rows and logs that result clearly.

### Getting started

1. Open the Actor in Apify Console.
2. Paste one or more G2 product URLs, or enter product-name search queries.
3. Select a relationship mode.
4. Keep the small default limits for a first run.
5. Click **Start**.
6. Open the **G2 alternatives** dataset view.
7. Export JSON, CSV, or Excel, or connect the dataset to your workflow.

A useful first input is:

```json
{
  "productUrls": [
    { "url": "https://www.g2.com/products/slack/reviews" }
  ],
  "mode": "battlecard",
  "maxItems": 10,
  "maxAlternativesPerProduct": 10,
  "includeFeatureContext": true,
  "includePricingLinks": true
}
```

### Output fields

Each default-dataset row represents one source-to-alternative relationship.

| Field group | Important fields | Meaning |
| --- | --- | --- |
| Source identity | `sourceProductId`, `sourceProductName`, `sourceProductSlug`, `sourceProductUrl` | The product whose alternatives were requested. |
| Source signals | `sourceVendorName`, `sourceRating`, `sourceReviewCount` | Public source-product context. |
| Alternative identity | `alternativeProductId`, `alternativeProductName`, `alternativeProductSlug`, `alternativeProductUrl` | The candidate alternative. |
| Alternative signals | `alternativeVendorName`, `alternativeRating`, `alternativeReviewCount`, `alternativeDescription` | Public alternative context. |
| Evidence | `relationshipType`, `relationshipEvidence` | Direct comparison tag or shared-category evidence. |
| Ranking | `rank`, `relevanceScore`, `rankingMethod` | Position and transparent ranking method. |
| Category context | `sharedCategories` | Public G2 categories shared by the pair. |
| Feature context | `sharedFeatures`, `sourceOnlyFeatures`, `alternativeOnlyFeatures` | Pair-level public feature-keyword overlap and gaps. |
| Research links | `comparisonUrl`, `sourcePricingUrl`, `alternativePricingUrl` | Public URLs for follow-up research. |
| Freshness | `scrapedAt` | ISO 8601 extraction timestamp. |

Nullable fields remain `null` when G2 does not expose the corresponding value.

### Example output

The following shortened record reflects the current Actor behavior:

```json
{
  "sourceProductName": "HubSpot Sales Hub",
  "sourceProductSlug": "hubspot-sales-hub",
  "sourceRating": 4.4,
  "sourceReviewCount": 13283,
  "alternativeProductName": "Agentforce Sales (formerly Salesforce Sales Cloud)",
  "alternativeProductSlug": "agentforce-sales-formerly-salesforce-sales-cloud",
  "alternativeRating": 4.4,
  "alternativeReviewCount": 24680,
  "relationshipType": "category_alternative",
  "relationshipEvidence": "Shared public G2 categories: Conversation Intelligence, Sales Engagement, CRM",
  "rank": 1,
  "relevanceScore": 138.96,
  "sharedCategories": ["Conversation Intelligence", "Sales Engagement", "CRM"],
  "sharedFeatures": ["workflow automation", "contact management", "pipeline management"],
  "sourcePricingUrl": "https://www.g2.com/products/hubspot-sales-hub/pricing",
  "alternativePricingUrl": "https://www.g2.com/products/agentforce-sales-formerly-salesforce-sales-cloud/pricing"
}
```

Ratings, counts, features, and rankings change as the public source changes.

### How much does it cost to extract G2 alternatives?

The Actor uses pay-per-event pricing:

- one `start` event per run: **$0.005**;
- one `alternative` event for each useful relationship row saved.

Current per-relationship prices are:

| Apify tier | Price per relationship |
| --- | ---: |
| Free | $0.002001 |
| Bronze | $0.001740 |
| Silver | $0.0013572 |
| Gold | $0.001044 |
| Platinum | $0.000696 |
| Diamond | $0.0004872 |

At the Bronze rate, a run with 10 relationships costs about **$0.0224** including the start event. A 50-row run costs about **$0.092**. A 100-row run costs about **$0.179**.

You are charged only for rows pushed to the dataset. Unknown products and relationships filtered out before saving do not create an `alternative` event.

### Build a recurring SaaS battlecard workflow

A practical scheduled workflow is:

1. select a stable list of source-product URLs;
2. run in `battlecard` mode every week;
3. save the dataset ID and extraction timestamp;
4. compare the current rows with the previous run by source and alternative slug;
5. flag new or removed relationships;
6. flag rating, review-count, category, or feature changes;
7. send the changes to Slack, email, a CRM, or a warehouse.

The Actor returns current snapshots. It does not maintain historical state or send alerts by itself.

### Export and integration options

Use Apify's dataset export to download:

- JSON for applications and RAG pipelines;
- CSV or Excel for analysts and product marketers;
- XML or RSS-compatible transformations for legacy systems;
- API responses for data warehouses and automation tools.

Use a run-finished webhook when a downstream workflow should begin only after the complete map is available.

### Run with the Apify API using cURL

```bash
curl -X POST \
  "https://api.apify.com/v2/acts/automation-lab~g2-alternatives-scraper/runs?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "searchQueries": ["HubSpot Sales Hub"],
    "mode": "alternatives",
    "maxItems": 8,
    "maxAlternativesPerProduct": 8
  }'
```

Poll the returned run ID, then fetch items from its `defaultDatasetId`.

### Run with JavaScript

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

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('automation-lab/g2-alternatives-scraper').call({
    productUrls: [{ url: 'https://www.g2.com/products/slack/reviews' }],
    mode: 'battlecard',
    maxItems: 10,
    maxAlternativesPerProduct: 10,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

### Run with Python

```python
import os
from apify_client import ApifyClient

client = ApifyClient(os.environ["APIFY_TOKEN"])
run = client.actor("automation-lab/g2-alternatives-scraper").call(run_input={
    "productUrls": [{"url": "https://www.g2.com/products/slack/reviews"}],
    "mode": "comparisons",
    "maxItems": 5,
    "maxAlternativesPerProduct": 5,
})

items = client.dataset(run["defaultDatasetId"]).list_items().items
print(items)
```

### Use with Apify MCP

Add the Actor to Claude Code:

```bash
claude mcp add --transport http apify \
  "https://mcp.apify.com?tools=automation-lab/g2-alternatives-scraper"
```

#### Claude Desktop setup

Add this server object to Claude Desktop's MCP configuration:

```json
{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com?tools=automation-lab/g2-alternatives-scraper"
    }
  }
}
```

#### Cursor setup

Open **Cursor Settings → MCP**, add a remote server named `apify`, and use the same URL:

```text
https://mcp.apify.com?tools=automation-lab/g2-alternatives-scraper
```

#### VS Code setup

Add an HTTP MCP server named `apify` in your VS Code MCP configuration with that Actor-specific URL. Authenticate with your Apify account when prompted.

Example prompts:

- “Find eight G2 alternatives to HubSpot Sales Hub and summarize the largest feature gaps.”
- “Extract only direct G2 comparison relationships for Slack.”
- “Build a 15-row battlecard map for Slack, Microsoft Teams, and Zoom Workplace.”

### Data quality and interpretation

Treat ratings, review counts, categories, descriptions, and feature keywords as source snapshots.

A direct comparison tag proves that G2 product metadata links the pair. It does not prove that either vendor considers the other its primary competitor.

A category alternative is an evidence-backed candidate, not a claim that G2 displayed that exact pair or order on its protected alternatives page.

Feature arrays reflect public G2 feature keywords. They are not a complete product specification and should be verified before making procurement decisions.

Pricing fields are links to public G2 pricing pages. The Actor does not extract or guarantee price amounts, editions, currencies, discounts, or contract terms.

### Limits and failure behavior

- The Actor supports public G2 software products available in the structured index.
- Product slugs can change; search by current product name if an old slug stops resolving.
- `comparisons` mode may return no rows when a product exposes no direct comparison tags.
- Search queries resolve the strongest public product match; use an explicit URL when names are ambiguous.
- A single run returns at most 1,000 rows and at most 50 alternatives per source product.
- Transient network, HTTP 429, and server errors are retried with bounded backoff.
- Malformed limits, unsupported modes, missing targets, and completely unresolved input fail the run instead of silently returning success.
- The Actor does not bypass CAPTCHAs or use residential proxies at runtime.

### Troubleshooting

#### Why did my search resolve the wrong product?

Product names and vendor names can overlap. Replace the query with the exact G2 product URL or bare product slug.

#### Why did `comparisons` mode return zero rows?

That mode requires direct public comparison-tag evidence. Switch to `battlecard` or `alternatives` to include category peers.

#### Why is `comparisonUrl` null?

Only direct `g2_comparison` rows receive a constructed comparison URL. Category alternatives remain clearly identified as inferred relationships.

#### Why are the pricing fields URLs rather than amounts?

Structured price amounts are not part of the public product-index route used by this Actor. Links support follow-up research without inventing stale or unavailable values.

#### Why did a product fail to resolve?

Confirm that the URL contains `/products/<slug>` and that the product is publicly listed. Try the current product name through `searchQueries` if G2 renamed the slug.

### Responsible and legal use

This Actor collects publicly available product metadata. You are responsible for using the data in accordance with G2's terms, applicable laws, and your organization's policies.

Do not use the output to misrepresent vendors, fabricate endorsements, or make automated high-impact procurement decisions without review. Respect trademarks and attribution. Avoid combining public product data with personal data in ways that create privacy or discrimination risks.

### FAQ

#### Does this scrape G2 reviews?

No. It uses aggregate rating and review-count signals but does not return individual review text.

#### Does it reproduce G2's protected alternatives-page ranking?

No. It returns direct G2 comparison-tag evidence and a transparent deterministic category-peer ranking. Every row states the method.

#### Can I process several source products in one run?

Yes. Add multiple URLs and/or search queries. `maxItems` applies across the complete run.

#### Can I disable feature arrays?

Yes. Set `includeFeatureContext` to `false` for smaller rows.

#### Can I schedule monitoring?

Yes. Create an Apify Schedule and compare each run's dataset in your downstream system. Historical storage and alerts are not built into this Actor.

#### Are empty or duplicate rows charged?

No. The Actor charges the `alternative` event only for unique useful rows pushed to the default dataset.

### Related automation-lab Actors

- [G2 Scraper](https://apify.com/automation-lab/g2-scraper) — use when you need individual G2 reviews, product search, or category browsing rather than relationship rows.
- [G2 Software Categories Scraper](https://apify.com/automation-lab/g2-software-categories-scraper) — use when your workflow starts from G2's software category taxonomy.

Choose this Actor when the required unit is a source-product-to-alternative relationship for battlecards, comparison maps, or recurring competitive-intelligence automation.

# Actor input Schema

## `productUrls` (type: `array`):

Products to map. Accepts G2 product URLs such as https://www.g2.com/products/slack/reviews or bare slugs such as slack.

## `searchQueries` (type: `array`):

Resolve G2 products by product or vendor name when you do not have URLs.

## `mode` (type: `string`):

Battlecard returns direct G2 comparison-tag relationships plus ranked category alternatives. Alternatives returns the complete ranked peer map. Comparisons returns only direct public comparison-tag relationships.

## `maxItems` (type: `integer`):

Maximum number of relationship rows saved across all source products.

## `maxAlternativesPerProduct` (type: `integer`):

Maximum ranked relationships returned for each resolved source product.

## `includeFeatureContext` (type: `boolean`):

Include shared features plus source-only and alternative-only public G2 feature keywords.

## `includePricingLinks` (type: `boolean`):

Include each product's public G2 pricing-page URL for downstream pricing research. This does not claim that structured price amounts are available.

## Actor input object example

```json
{
  "productUrls": [
    {
      "url": "https://www.g2.com/products/slack/reviews"
    }
  ],
  "searchQueries": [],
  "mode": "battlecard",
  "maxItems": 20,
  "maxAlternativesPerProduct": 10,
  "includeFeatureContext": true,
  "includePricingLinks": true
}
```

# Actor output Schema

## `dataset` (type: `string`):

Default dataset containing one row per source-product and alternative-product relationship.

# 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 = {
    "productUrls": [
        {
            "url": "https://www.g2.com/products/slack/reviews"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("automation-lab/g2-alternatives-scraper").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 = { "productUrls": [{ "url": "https://www.g2.com/products/slack/reviews" }] }

# Run the Actor and wait for it to finish
run = client.actor("automation-lab/g2-alternatives-scraper").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 '{
  "productUrls": [
    {
      "url": "https://www.g2.com/products/slack/reviews"
    }
  ]
}' |
apify call automation-lab/g2-alternatives-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/yp3ofveBDY7KgiVyY/builds/DpHVvFMWyMQvRmOjm/openapi.json
