{
  "openapi": "3.0.1",
  "info": {
    "title": "G2 Intelligence API: Reviews, Products, Competitors & Changes",
    "description": "Scrape G2 reviews, product profiles, ratings, pricing and top competitors from a software name or URL. Monitoring mode returns only new or edited reviews and rating changes on scheduled runs, so you pay once per review.",
    "version": "1.0",
    "x-build-id": "L9bMzdU535Fk2FbWZ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sagepennystudio~g2-intelligence-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sagepennystudio-g2-intelligence-api",
        "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/sagepennystudio~g2-intelligence-api/runs": {
      "post": {
        "operationId": "runs-sync-sagepennystudio-g2-intelligence-api",
        "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/sagepennystudio~g2-intelligence-api/run-sync": {
      "post": {
        "operationId": "run-sync-sagepennystudio-g2-intelligence-api",
        "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": {
          "searchTerms": {
            "title": "Products or companies",
            "type": "array",
            "description": "Software or company names, e.g. \"HubSpot CRM\" or \"Slack\". Each name is looked up on G2 and the best match is scraped, so you don't need to find the URL.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "G2 URLs",
            "type": "array",
            "description": "Any G2 URL: a product (https://www.g2.com/products/slack/reviews), a competitor list (.../competitors/alternatives), a category (https://www.g2.com/categories/crm) or a search (https://www.g2.com/search?query=crm).",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "categories": {
            "title": "Categories",
            "type": "array",
            "description": "G2 category slugs or URLs, e.g. \"crm\" or \"project-management\". Returns the ranked product list. Turn on \"Scrape every product in the categories\" to also get each product's reviews.",
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "FULL",
              "NEW_ONLY",
              "NEW_AND_CHANGED"
            ],
            "type": "string",
            "description": "FULL returns everything that matches. NEW_ONLY returns only reviews (and product changes) not seen in earlier runs of the same monitor, so a daily schedule bills you only for fresh data. NEW_AND_CHANGED also returns reviews whose text, rating or update date changed.",
            "default": "FULL"
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Runs that share a monitor name share their memory of what has already been seen. Use a different name per client or watch list.",
            "default": "default"
          },
          "includeProductDetails": {
            "title": "Include product profiles",
            "type": "boolean",
            "description": "One record per product: rating, review count, star breakdown, pricing plans, categories, vendor, pros and cons themes. In monitoring modes it is only returned when something changed.",
            "default": true
          },
          "includeReviews": {
            "title": "Include reviews",
            "type": "boolean",
            "description": "Turn off to get product profiles and competitor lists only.",
            "default": true
          },
          "maxReviewsPerProduct": {
            "title": "Max reviews per product",
            "minimum": 0,
            "type": "integer",
            "description": "Stops after this many reviews per product. 0 means as many as G2 shows. G2 shows about 100 per view to logged-out visitors; above 100 the Actor splits by star rating automatically to reach up to ~500. In monitoring modes the limit applies to new reviews.",
            "default": 100
          },
          "reviewSort": {
            "title": "Review order",
            "enum": [
              "most_recent",
              "g2_default",
              "most_helpful",
              "highest_rated",
              "lowest_rated"
            ],
            "type": "string",
            "description": "Order in which G2 returns reviews. Most recent is required for efficient monitoring and for the date cutoff to stop early.",
            "default": "most_recent"
          },
          "starRatings": {
            "title": "Only these star ratings",
            "type": "array",
            "description": "Filter reviews by star rating at crawl time, so you don't pay for reviews you don't want. Example: [1, 2] for complaint monitoring. Leave empty for all ratings.",
            "items": {
              "type": "string",
              "enum": [
                "1",
                "2",
                "3",
                "4",
                "5"
              ],
              "enumTitles": [
                "1 star",
                "2 stars",
                "3 stars",
                "4 stars",
                "5 stars"
              ]
            }
          },
          "companySizes": {
            "title": "Only reviewers from these company sizes",
            "type": "array",
            "description": "Filter reviews by the reviewer's company size. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "SMALL_BUSINESS",
                "MID_MARKET",
                "ENTERPRISE"
              ],
              "enumTitles": [
                "Small business (50 or fewer)",
                "Mid-market (51-1000)",
                "Enterprise (1000+)"
              ]
            }
          },
          "reviewsPublishedAfter": {
            "title": "Only reviews published after",
            "type": "string",
            "description": "Skip older reviews (YYYY-MM-DD). With \"Most recent\" order the crawl stops as soon as it reaches this date."
          },
          "includeAlternatives": {
            "title": "Include competitors",
            "type": "boolean",
            "description": "Adds G2's top alternatives for each product: rank, rating, review count, categories in common and G2's comparison notes (e.g. \"easier to admin\").",
            "default": false
          },
          "maxAlternatives": {
            "title": "Max competitors per product",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "G2 lists up to 10.",
            "default": 10
          },
          "scrapeAlternatives": {
            "title": "Also scrape the competitors",
            "type": "boolean",
            "description": "Scrape every competitor's product profile and reviews too (with the same review settings). Great for competitor monitoring; multiplies the volume by up to 10.",
            "default": false
          },
          "maxSearchResults": {
            "title": "Matches per product name",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many G2 search results to scrape for each name in \"Products or companies\". 1 takes the best match.",
            "default": 1
          },
          "maxProductsPerCategory": {
            "title": "Max products per category",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "How many ranked products to return from each category.",
            "default": 15
          },
          "scrapeCategoryProducts": {
            "title": "Scrape every product in the categories",
            "type": "boolean",
            "description": "Also scrape each category product's profile and reviews.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "G2 is protected by DataDome, which blocks datacenter IPs. Residential proxies are required.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "US"
            }
          },
          "maxConcurrency": {
            "title": "Max parallel pages",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Higher is faster but raises the chance of being blocked.",
            "default": 3
          },
          "maxRequestRetries": {
            "title": "Retries per page",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Each retry uses a fresh browser identity and IP.",
            "default": 8
          },
          "debugSaveBlockedPages": {
            "title": "Save blocked pages (debug)",
            "type": "boolean",
            "description": "Store the HTML of anti-bot pages in the key-value store.",
            "default": false
          },
          "blockResources": {
            "title": "Block images and trackers",
            "type": "boolean",
            "description": "Skips images, fonts and third-party scripts to cut proxy bandwidth (the main running cost). Turn off only if pages fail to load.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}