{
  "openapi": "3.0.1",
  "info": {
    "title": "G2 Software Reviews & Ratings Scraper",
    "description": "Scrape G2.com for B2B software product reviews, ratings, comparisons, and competitive intelligence. Essential for SaaS marketing and software market research.",
    "version": "1.1",
    "x-build-id": "OvhIqpJCMEMuzfVkW"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/alizarin_refrigerator-owner~g2-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-alizarin_refrigerator-owner-g2-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/alizarin_refrigerator-owner~g2-scraper/runs": {
      "post": {
        "operationId": "runs-sync-alizarin_refrigerator-owner-g2-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/alizarin_refrigerator-owner~g2-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-alizarin_refrigerator-owner-g2-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": {
          "scrapeType": {
            "title": "Scrape Type",
            "enum": [
              "product_profile",
              "category_search",
              "reviews",
              "alternatives",
              "compare"
            ],
            "type": "string",
            "description": "What to scrape. 'category_search' browses a G2 category page. 'product_profile' scrapes one product (requires Product URL or Product Name). 'alternatives' finds competitors for a product.",
            "default": "category_search"
          },
          "productUrl": {
            "title": "Product URL",
            "type": "string",
            "description": "Full G2 product page URL. RECOMMENDED — paste the URL from your browser for best results. Example: https://www.g2.com/products/hubspot-crm/reviews"
          },
          "productName": {
            "title": "Product Name",
            "type": "string",
            "description": "Software product name to search on G2 (e.g. 'HubSpot CRM'). Only needed if you don't have a direct Product URL."
          },
          "category": {
            "title": "Category",
            "type": "string",
            "description": "G2 software category. Common values: CRM Software, Marketing Automation, Project Management, HR Software, Help Desk Software, Email Marketing, SEO Tools, Accounting, E-Commerce, Video Conferencing, Analytics, Website Builder, Live Chat, Chatbot, AI Writing",
            "default": "CRM Software"
          },
          "minRating": {
            "title": "Minimum Rating",
            "minimum": 1,
            "maximum": 5,
            "type": "number",
            "description": "Only include products with this rating or higher (1.0-5.0)"
          },
          "companySize": {
            "title": "Company Size",
            "enum": [
              "any",
              "small_business",
              "mid_market",
              "enterprise"
            ],
            "type": "string",
            "description": "Filter by company size",
            "default": "any"
          },
          "includeReviews": {
            "title": "Include Reviews",
            "type": "boolean",
            "description": "Scrape user reviews for each product",
            "default": true
          },
          "maxReviewsPerProduct": {
            "title": "Max Reviews Per Product",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum reviews to collect per product. Keep low (10-25) for faster runs.",
            "default": 10
          },
          "includeAlternatives": {
            "title": "Include Alternatives",
            "type": "boolean",
            "description": "Include competitor/alternative products",
            "default": false
          },
          "includePricing": {
            "title": "Include Pricing",
            "type": "boolean",
            "description": "Include pricing information when available",
            "default": true
          },
          "maxResults": {
            "title": "Maximum Results",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum number of products to scrape. Start small (5-10) — G2 blocks large requests.",
            "default": 10
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Proxy settings. Defaults to RESIDENTIAL proxies (recommended for G2)."
          },
          "demoMode": {
            "title": "Demo Mode (Sample Data)",
            "type": "boolean",
            "description": "When ON, returns realistic sample data WITHOUT hitting G2 (free, instant, no blocking). Turn OFF for real scraping. G2 has aggressive anti-bot protection — real scraping may get blocked.",
            "default": false
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "URL to POST results when scraping completes (Zapier, Make, n8n, custom endpoint)"
          },
          "webhookPlatform": {
            "title": "Webhook Platform",
            "enum": [
              "custom",
              "zapier",
              "make",
              "n8n"
            ],
            "type": "string",
            "description": "Platform-specific payload formatting",
            "default": "custom"
          },
          "webhookHeaders": {
            "title": "Webhook Headers",
            "type": "object",
            "description": "Custom HTTP headers to send with webhook (JSON object)"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}