{
  "openapi": "3.0.1",
  "info": {
    "title": "G2G Price Monitor: Undercut & Price Drop Alerts",
    "description": "Monitor G2G.com prices and get alerted when a seller undercuts you, a price drops or a new offer appears. Also scrapes every offer, seller and stock level from any category.",
    "version": "1.0",
    "x-build-id": "1tb66una38oSRB2cc"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/fayoussef~g2g-offer-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-fayoussef-g2g-offer-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/fayoussef~g2g-offer-scraper/runs": {
      "post": {
        "operationId": "runs-sync-fayoussef-g2g-offer-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/fayoussef~g2g-offer-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-fayoussef-g2g-offer-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",
        "required": [
          "urls"
        ],
        "properties": {
          "urls": {
            "title": "G2G URLs",
            "minItems": 1,
            "type": "array",
            "description": "One or more G2G URLs. Three kinds work: a category page (https://www.g2g.com/categories/wow-classic-gold), an offer-group page with filters applied (https://www.g2g.com/categories/rbl-item/offer/group?fa=...&region_id=..., which returns only the offers that page shows), and a Trending hub (https://www.g2g.com/trending/game-coins, expanded into every category it lists). A raw seo_term (wow-classic-gold) works too, and locale prefixes like /uk/ are fine. For undercut alerts, paste the offer-group URL of the server or item you sell on, so you are compared only with sellers of the same product. Prices come back in USD, cheapest first.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 500000,
            "type": "integer",
            "description": "In scraper mode: how many offers to scrape in total across every URL; the run stops as soon as it has this many. In monitor mode: the most change rows one run reports (the rest are kept and reported next run). Free plans are capped at 20 regardless.",
            "default": 1000
          },
          "monitorMode": {
            "title": "Monitor mode",
            "type": "boolean",
            "description": "Report only changes since the last run instead of scraping everything. The snapshot is saved in a key-value store in your own account, named after your URLs, so a schedule needs no extra setup.",
            "default": false
          },
          "watchWindow": {
            "title": "Cheapest offers to watch",
            "minimum": 5,
            "maximum": 500,
            "type": "integer",
            "description": "How many of the cheapest offers to track per URL. Undercuts happen at the bottom of the price ladder, so 100 covers it for most markets. Free plans watch 20.",
            "default": 100
          },
          "minChangePercent": {
            "title": "Ignore changes smaller than (%)",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "A price move smaller than this is not reported, which keeps noisy markets quiet. Undercuts and new offers are always reported. Use 0 to see every move.",
            "default": 2
          },
          "reportNewOffers": {
            "title": "Report new offers",
            "type": "boolean",
            "description": "Report offers that appeared in a market you already watch since the last run. Turn it off if you only care about price moves and undercuts.",
            "default": true
          },
          "mySeller": {
            "title": "My G2G username (for undercut alerts)",
            "type": "string",
            "description": "Your seller name on G2G, or several separated by commas. Your own offers are never reported as changes. The Actor tracks your price, your rank and who sits below you in each market, and flags any seller who moves below your price as an undercut."
          },
          "watchlistName": {
            "title": "Watchlist name (optional)",
            "type": "string",
            "description": "Names the saved snapshot. Leave empty and it is derived from your URLs, so the same URLs always continue the same watchlist. Set it when you want two schedules on the same URLs to keep separate histories."
          },
          "alertWebhookUrl": {
            "title": "Alert webhook URL",
            "type": "string",
            "description": "A Discord, Slack or generic https webhook URL. Kept secret. Do not put it in a public task."
          },
          "alertTelegramBotToken": {
            "title": "Telegram bot token",
            "type": "string",
            "description": "Optional. Create a bot with @BotFather on Telegram and paste its token here. Kept secret."
          },
          "alertTelegramChatId": {
            "title": "Telegram chat ID",
            "type": "string",
            "description": "Optional. The chat the bot should message: your own chat ID, or a group or channel the bot was added to."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional. Leave empty to use Apify Proxy (datacenter), the default. Switch to residential if G2G starts refusing the requests.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}