{
  "openapi": "3.0.1",
  "info": {
    "title": "Instacart Storefront Price Scraper",
    "description": "Scrape real-time grocery prices from Instacart storefronts. Search products by keyword, look up items by ID, or pull a retailer's store overview - no login, no API key.",
    "version": "1.0",
    "x-build-id": "9F4nFWg9vwz3ANmaD"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawlerbros~instacart-storefront-price-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawlerbros-instacart-storefront-price-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/crawlerbros~instacart-storefront-price-scraper/runs": {
      "post": {
        "operationId": "runs-sync-crawlerbros-instacart-storefront-price-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/crawlerbros~instacart-storefront-price-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-crawlerbros-instacart-storefront-price-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": [
          "mode",
          "retailerSlug"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "browseAisle",
              "listAisles",
              "productDetail",
              "storeOverview"
            ],
            "type": "string",
            "description": "What to fetch.",
            "default": "search"
          },
          "retailerSlug": {
            "title": "Retailer",
            "enum": [
              "costco",
              "safeway",
              "publix",
              "cvs",
              "walgreens",
              "aldi",
              "wegmans",
              "kroger",
              "meijer",
              "food-lion",
              "giant-eagle",
              "vons",
              "randalls",
              "king-soopers",
              "fred-meyer",
              "ralphs",
              "hy-vee",
              "shoprite",
              "winn-dixie",
              "sams-club",
              "gristedes",
              "jewel-osco",
              "acme-markets",
              "pavilions",
              "tom-thumb",
              "smart-final",
              "bevmo",
              "cub",
              "petco",
              "staples"
            ],
            "type": "string",
            "description": "Which Instacart-partnered retailer's storefront to scrape. Pick from the list, or use \"Custom retailer slug\" below to supply any Instacart retailer slug not in this list.",
            "default": "costco"
          },
          "customRetailerSlug": {
            "title": "Custom retailer slug (overrides Retailer above)",
            "type": "string",
            "description": "Any Instacart retailer slug, e.g. `whole-foods-market` or `sprouts-farmers-market`. Find a retailer's slug in its Instacart storefront URL: instacart.com/store/<slug>/storefront. Leave empty to use the Retailer dropdown instead."
          },
          "searchQuery": {
            "title": "Search query (mode=search)",
            "type": "string",
            "description": "Keyword to search for within the selected retailer's storefront, e.g. `milk`, `organic eggs`, `paper towels`. Results are filtered so every returned item's name/brand/category contains each significant word of your query (generic words like \"organic\" are ignored for this check). Note: this is a substring check, not full product understanding, so on rare occasions an item that happens to contain all your query words in an unrelated context (e.g. a \"milk chocolate\"-flavored candy matching a search for \"almond milk\") can still slip through.",
            "default": "milk"
          },
          "orderBy": {
            "title": "Sort order (mode=search, browseAisle)",
            "enum": [
              "bestMatch",
              "priceAsc",
              "priceDesc"
            ],
            "type": "string",
            "description": "How to order results.",
            "default": "bestMatch"
          },
          "aisleSlug": {
            "title": "Aisle / department slug (mode=browseAisle)",
            "type": "string",
            "description": "Which department/aisle (a.k.a. \"collection\") to browse within the selected retailer, e.g. `9797-crackers`, `produce`, or `dynamic_collection-sales` (retailer-wide deals). Run `mode=listAisles` first to get the exact slugs available for your chosen Retailer, or copy one from an Instacart collection URL: instacart.com/store/<retailer>/collections/<slug>."
          },
          "itemIds": {
            "title": "Item IDs (mode=productDetail)",
            "type": "array",
            "description": "Full Instacart item IDs to look up, e.g. `items_74-17444603` (copy from a `search`, `browseAisle`, or `storeOverview` result's `itemId` field). Must all belong to the same Retailer selected above.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "minPrice": {
            "title": "Min price (USD)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Drop items priced below this amount (whole dollars)."
          },
          "maxPrice": {
            "title": "Max price (USD)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Drop items priced above this amount (whole dollars)."
          },
          "brandContains": {
            "title": "Brand name contains",
            "type": "string",
            "description": "Keep only items whose brand name contains this text (case-insensitive)."
          },
          "inStockOnly": {
            "title": "In-stock only",
            "type": "boolean",
            "description": "Drop items that are marked out of stock.",
            "default": false
          },
          "onSaleOnly": {
            "title": "On sale only",
            "type": "boolean",
            "description": "Keep only items currently discounted from their regular price (has a `regularPrice` higher than `price`).",
            "default": false
          },
          "minRating": {
            "title": "Min rating (0-5)",
            "minimum": 0,
            "maximum": 5,
            "type": "number",
            "description": "Drop items with an average customer rating below this (out of 5). Items without a public rating are kept (unknown, not zero)."
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Hard cap on emitted records.",
            "default": 20
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional. Instacart's storefront does not require a proxy in most regions; enable the free Apify datacenter proxy if you see repeated 429/403 responses.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}