{
  "openapi": "3.0.1",
  "info": {
    "title": "Instacart Grocery Scraper: Prices, Deals & Stock (US + Canada)",
    "description": "Store-level Instacart prices for any US ZIP or Canadian postal code: Costco, Walmart, Safeway, Kroger, Loblaws, T&T and every other store on Instacart. Search terms or whole-department crawls, sale and regular price, unit price, promotions, stock level, ratings and store hours. No login.",
    "version": "0.1",
    "x-build-id": "GTbS09XYXoR0XIbv4"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/yugenox~instacart-grocery-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-yugenox-instacart-grocery-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/yugenox~instacart-grocery-scraper/runs": {
      "post": {
        "operationId": "runs-sync-yugenox-instacart-grocery-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/yugenox~instacart-grocery-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-yugenox-instacart-grocery-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": [
          "locations"
        ],
        "properties": {
          "locations": {
            "title": "📍 Locations",
            "type": "array",
            "description": "Where to shop. Canadian postal codes (M5V 3L9) or just the first three characters (M5V), US ZIP codes (60614), \"latitude,longitude\" or \"City, ST\" (Seattle, WA). Postal and ZIP codes are the most precise. Each location gets its own store list and prices: instacart.ca for Canada, instacart.com for the US.",
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "📦 What to scrape",
            "enum": [
              "search",
              "catalog",
              "stores"
            ],
            "type": "string",
            "description": "Search: products matching your search terms (about 300 results per term per store). Catalog: every product in whole departments or aisles, or the whole store. Stores: the list of stores Instacart serves at each location, with store types and optional opening hours.",
            "default": "search"
          },
          "searchTerms": {
            "title": "🔎 Search terms",
            "type": "array",
            "description": "Products to look up in Search mode, e.g. \"milk\", \"paper towels\", \"kirkland coffee\". Each term is searched at every selected store. Terms longer than 200 characters are shortened.",
            "items": {
              "type": "string"
            }
          },
          "retailers": {
            "title": "🏪 Stores",
            "type": "array",
            "description": "Store names, Instacart store slugs or store links, e.g. Costco, Walmart, Safeway, Kroger, Whole Foods, Loblaws, No Frills, T&T, Sobeys, Metro, or https://www.instacart.ca/store/costco-canada/storefront. Leave empty to use every store that serves the location (use \"Max stores per location\" to cap it). A name that is not available at a location is skipped with a note listing the stores that are.",
            "items": {
              "type": "string"
            }
          },
          "categories": {
            "title": "🗂️ Departments or aisles (Catalog mode)",
            "type": "array",
            "description": "Which departments or aisles to crawl in Catalog mode, e.g. \"Dairy & Eggs\", \"Snacks\", \"cheese\", \"frozen\". Leave empty to crawl the whole store.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "🔢 Max results",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of rows for the whole run. Leave empty for no limit."
          },
          "maxItemsPerSearch": {
            "title": "Max products per search term per store",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Search mode: how many products to save for each term at each store. Instacart returns up to about 300 matches per term. With filters on (e.g. only on sale), the actor reads further down the results until this many matching products are saved.",
            "default": 200
          },
          "maxItemsPerStore": {
            "title": "Max products per store (Catalog mode)",
            "minimum": 1,
            "type": "integer",
            "description": "Catalog mode: stop crawling a store after this many products. Leave empty for the whole store."
          },
          "maxStoresPerLocation": {
            "title": "Max stores per location",
            "minimum": 1,
            "type": "integer",
            "description": "When \"Stores\" is empty, use at most this many stores per location (in Instacart's own order). Leave empty for all."
          },
          "serviceType": {
            "title": "Delivery or pickup prices",
            "enum": [
              "delivery",
              "pickup"
            ],
            "type": "string",
            "description": "Some stores price delivery and pickup differently on Instacart. Pick which prices you want; a store that offers only one uses that one.",
            "default": "delivery"
          },
          "onlyOnSale": {
            "title": "Only products on sale",
            "type": "boolean",
            "description": "Keep only products with a reduced price or store sale. Some stores (for example Loblaw banners and T&T in Canada) show few or no sale prices on Instacart.",
            "default": false
          },
          "onlyInStock": {
            "title": "Only products in stock",
            "type": "boolean",
            "description": "Drop products Instacart marks as out of stock at that store.",
            "default": false
          },
          "skipSponsored": {
            "title": "Skip sponsored results",
            "type": "boolean",
            "description": "Search mode: leave out paid placements (they are flagged with isSponsored otherwise).",
            "default": false
          },
          "includeStoreHours": {
            "title": "Include opening hours (Stores mode)",
            "type": "boolean",
            "description": "Add the next 7 days of opening hours to each store row.",
            "default": false
          },
          "country": {
            "title": "Country for city names",
            "enum": [
              "auto",
              "CA",
              "US"
            ],
            "type": "string",
            "description": "Only matters for city names without a state or province. Postal codes and ZIP codes pick the country by themselves.",
            "default": "auto"
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Parallel connections, each with its own IP address.",
            "default": 6
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Residential proxies are recommended; the country is matched to each location automatically. Datacenter proxies work as well: blocked addresses are skipped, and the run switches to residential if too many are blocked. If your Apify plan has no residential proxies, the run uses datacenter proxies and waits out refusals on fresh addresses (slower).",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          },
          "_noResidential": {
            "title": "Run as an account without residential proxies",
            "type": "boolean",
            "description": "Internal (canaries): behave exactly like an account without the RESIDENTIAL proxy group.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}