{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Shopping Scraper",
    "description": "Search Google Shopping with every filter, or paste a product link to get every store's price, shipping, stock, direct store link and 12 months of price history. 13 countries. $4 per 1,000 results.",
    "version": "0.0",
    "x-build-id": "DdkcwzDrLBb3EP3pr"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sourabhbgp~google-shopping-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sourabhbgp-google-shopping-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/sourabhbgp~google-shopping-scraper/runs": {
      "post": {
        "operationId": "runs-sync-sourabhbgp-google-shopping-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/sourabhbgp~google-shopping-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-sourabhbgp-google-shopping-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": {
          "mode": {
            "title": "What to scrape",
            "enum": [
              "search",
              "offers"
            ],
            "type": "string",
            "description": "Pick what to scrape, then fill the section with the same name below. Settings of the other mode are ignored.",
            "default": "search"
          },
          "country": {
            "title": "Country",
            "enum": [
              "us",
              "gb",
              "ca",
              "au",
              "de",
              "fr",
              "es",
              "it",
              "nl",
              "in",
              "br",
              "mx",
              "jp"
            ],
            "type": "string",
            "description": "The Google Shopping country for both modes. It sets the stores, prices and currency. Pasted links always use their own Google site. Every store's price is not available in the UK and the EU countries (Google lists comparison sites there, not stores).",
            "default": "us"
          },
          "queries": {
            "title": "Search words",
            "type": "array",
            "description": "One search per line, written the way you would type it on Google Shopping, for example wireless earbuds.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          "startUrls": {
            "title": "Google Shopping search links (advanced)",
            "type": "array",
            "description": "For size, colour, brand or any other filter Google offers: filter on Google Shopping in your browser, copy the address (it contains udm=28) and paste it here. Every search run also saves a FILTERS record with a ready link for each filter Google offered.",
            "items": {
              "type": "string",
              "pattern": "^https?://www\\.google\\.[a-z.]{2,6}/search\\?\\S*udm=28\\S*$"
            }
          },
          "maxResultsPerQuery": {
            "title": "Max products per search",
            "minimum": 1,
            "maximum": 300,
            "type": "integer",
            "description": "Stop after this many products for each search word or link. Google shows about 150 to 300 products per search, depending on the search.",
            "default": 40
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "price_low",
              "price_high"
            ],
            "type": "string",
            "description": "Google does not reliably sort by price, so for a price sort the scraper reads every page Google has for the search and sorts the products itself.",
            "default": "relevance"
          },
          "includeOffers": {
            "title": "Also get every store's price for each product found",
            "type": "boolean",
            "description": "For each product found, also list every store selling it (one extra row per store, so it costs more). Uses Max stores per product and Price history from the Every store's price section.",
            "default": false
          },
          "minPrice": {
            "title": "Min price",
            "minimum": 0,
            "type": "integer",
            "description": "Only products at or above this price, in the country's currency."
          },
          "maxPrice": {
            "title": "Max price",
            "minimum": 0,
            "type": "integer",
            "description": "Only products at or below this price, in the country's currency."
          },
          "onSaleOnly": {
            "title": "Only products on sale",
            "type": "boolean",
            "description": "Same as Google Shopping's On sale filter.",
            "default": false
          },
          "freeShippingOnly": {
            "title": "Only free delivery",
            "type": "boolean",
            "description": "Same as Google Shopping's Free shipping filter.",
            "default": false
          },
          "condition": {
            "title": "Condition",
            "enum": [
              "any",
              "new",
              "used"
            ],
            "type": "string",
            "description": "New only, or used and refurbished only.",
            "default": "any"
          },
          "stores": {
            "title": "Only these stores",
            "type": "array",
            "description": "Store names as Google shows them, for example Walmart, Best Buy, Target. Each store is searched separately.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 80
            }
          },
          "minRating": {
            "title": "Min product rating",
            "enum": [
              "any",
              "3",
              "4",
              "4.5"
            ],
            "type": "string",
            "description": "Products without a rating are left out when this is set.",
            "default": "any"
          },
          "productUrls": {
            "title": "Google Shopping product links or IDs",
            "type": "array",
            "description": "The link of a product page opened from Google Shopping (it contains prds=catalogid:...), or the productUrl or productId of a row from Search products.",
            "items": {
              "type": "string",
              "pattern": "^(https?://www\\.google\\.[a-z.]{2,6}/search\\?\\S*prds=\\S*(catalogid|gpcid)(:|%3A)\\d+\\S*|\\d{6,22})$"
            }
          },
          "gtins": {
            "title": "Barcodes (EAN, UPC or GTIN)",
            "type": "array",
            "description": "Google publishes no barcodes, so each barcode is matched to the closest Google Shopping product by name (rows say matchType: closest). A barcode the web does not clearly identify comes back as not found, at no charge. Product links are exact: use them when you have them.",
            "items": {
              "type": "string",
              "pattern": "^(\\d{8}|\\d{12,14})$"
            }
          },
          "maxOffersPerProduct": {
            "title": "Max stores per product",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Stop after this many stores for each product. Most products have 5 to 60 stores; very popular ones can have hundreds.",
            "default": 50
          },
          "includePriceHistory": {
            "title": "Price history",
            "type": "boolean",
            "description": "Add daily prices for up to the last 12 months for the main stores Google tracks for the product (usually the first 3 to 5 stores).",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}