{
  "openapi": "3.0.1",
  "info": {
    "title": "G2 Comparison Scraper",
    "description": "Scrape G2 head-to-head comparisons at scale: side-by-side star ratings, all seven G2 criteria scores with respondent counts, entry pricing, top pros & cons, integrations, alternatives, reviewer company-size and industry splits, AI summaries and FAQs. Structured JSON for competitive research.",
    "version": "1.0",
    "x-build-id": "S3CRDNLDI2iuxXhqw"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/axlymxp~g2-comparison-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-axlymxp-g2-comparison-scraper",
        "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/axlymxp~g2-comparison-scraper/runs": {
      "post": {
        "operationId": "runs-sync-axlymxp-g2-comparison-scraper",
        "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/axlymxp~g2-comparison-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-axlymxp-g2-comparison-scraper",
        "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",
        "properties": {
          "comparisonUrls": {
            "title": "G2 comparison URLs",
            "type": "array",
            "description": "Full G2 comparison page URLs, e.g. https://www.g2.com/compare/asana-vs-monday-com. The most reliable way to target exactly the comparisons you want.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "productPairs": {
            "title": "Product pairs",
            "type": "array",
            "description": "Comparison slugs such as 'asana-vs-monday-com', or free text such as 'Slack vs Microsoft Teams'. G2 automatically resolves renamed products and canonical pair order.",
            "items": {
              "type": "string"
            }
          },
          "productA": {
            "title": "Product A",
            "type": "string",
            "description": "First product slug or G2 product URL, used with 'Product B' to build a single comparison."
          },
          "productB": {
            "title": "Product B",
            "type": "string",
            "description": "Second product slug or G2 product URL, used with 'Product A'."
          },
          "discoverFromSitemap": {
            "title": "Discover comparisons automatically",
            "type": "boolean",
            "description": "Top the list up from G2's official comparison sitemaps (over a million comparison pages) until 'Max comparisons' is reached. Useful for bulk dataset building when you don't have a specific list.",
            "default": false
          },
          "maxComparisons": {
            "title": "Max comparisons",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many comparison pages. Each comparison produces exactly one dataset row.",
            "default": 10
          },
          "includeReviewerInsights": {
            "title": "Include reviewer demographics",
            "type": "boolean",
            "description": "Add the reviewer company-size and industry breakdowns for both products. Costs one extra page fetch per comparison.",
            "default": true
          },
          "includeFeatureScores": {
            "title": "Include full feature score table",
            "type": "boolean",
            "description": "Add every rated feature (often 200-700 per comparison) with each product's score, respondent count and winner. Large output; costs one extra page fetch per comparison.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Proxy settings. G2 uses DataDome bot protection, so RESIDENTIAL proxies are strongly recommended — datacenter IPs are usually blocked. Leave disabled to fall back to the built-in residential pool.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          },
          "useResidentialProxy": {
            "title": "Use built-in residential fallback",
            "type": "boolean",
            "description": "When Apify Proxy is disabled, route the browser through the built-in residential pool instead of your own IP. G2 blocks most datacenter IPs, so keep this on.",
            "default": true
          },
          "proxyCountry": {
            "title": "Fallback proxy country",
            "enum": [
              "US",
              "GB",
              "CA",
              "DE",
              "FR",
              "AU",
              "NL",
              "IN"
            ],
            "type": "string",
            "description": "Exit country for the built-in residential fallback (ISO-3166 alpha-2). G2 serves English content from US exits.",
            "default": "US"
          },
          "debugFingerprint": {
            "title": "Debug: report browser fingerprint",
            "type": "boolean",
            "description": "Diagnostic only. Instead of scraping, report the run environment's browser fingerprint and G2's anti-bot verdict to the key-value store record DIAGNOSTICS.",
            "default": false
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}