{
  "openapi": "3.0.1",
  "info": {
    "title": "Instacart Scraper: Grocery Prices by Store",
    "description": "Compare Instacart grocery prices across stores at one US ZIP. Search a product at Costco, Safeway and the other stores nearby, or list every store that delivers there. Each row has the price, sale price, unit price, size, brand, stock and the store address. JSON or CSV out.",
    "version": "0.0",
    "x-build-id": "IyTEQT2lQH9QzXlqF"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/memo23~instacart-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-memo23-instacart-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/memo23~instacart-scraper/runs": {
      "post": {
        "operationId": "runs-sync-memo23-instacart-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/memo23~instacart-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-memo23-instacart-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": {
          "postalCode": {
            "title": "ZIP code",
            "type": "string",
            "description": "US ZIP the prices belong to. Example: 94105. Store names are matched to the banners that deliver or pick up there.",
            "default": "10001"
          },
          "latitude": {
            "title": "Latitude",
            "type": "number",
            "description": "Optional. A point more precise than the ZIP center. Set it with Longitude. Nearby stores are chosen from this point. The ZIP still picks the prices."
          },
          "longitude": {
            "title": "Longitude",
            "type": "number",
            "description": "Optional. Set it with Latitude."
          },
          "queries": {
            "title": "Search words",
            "type": "array",
            "description": "What to look up, one per line. Example: milk. Each word is checked at every store you name. A specific word returns a tighter list than a broad one.",
            "items": {
              "type": "string"
            }
          },
          "retailers": {
            "title": "Stores",
            "type": "array",
            "description": "Banners to compare, one per line, written the way they appear after /store/ in an Instacart address. Example: costco. Empty means walk the banners at this ZIP until the row cap.",
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "What to collect",
            "enum": [
              "search",
              "store",
              "url"
            ],
            "type": "string",
            "description": "Search checks each word at the stores you name. Stores lists the banners at the ZIP. Links reads an Instacart search, product or store address.",
            "default": "search"
          },
          "urls": {
            "title": "Instacart links",
            "type": "array",
            "description": "Used when What to collect is Paste links. A search link returns that search. A product link returns that product. A store link returns the store. Aisle links are skipped.",
            "items": {
              "type": "string"
            }
          },
          "sortBy": {
            "title": "Sort",
            "enum": [
              "bestMatch",
              "priceAsc",
              "priceDesc",
              "unitPriceAsc",
              "unitPriceDesc"
            ],
            "type": "string",
            "description": "How one store orders its matches. Best match keeps the store's own order.",
            "default": "bestMatch"
          },
          "maxPrice": {
            "title": "Highest price",
            "type": "number",
            "description": "Skip anything above this many dollars. A product with no price is skipped too."
          },
          "minPrice": {
            "title": "Lowest price",
            "type": "number",
            "description": "Skip anything under this many dollars. A product with no price is skipped too."
          },
          "onSaleOnly": {
            "title": "Discounted only",
            "type": "boolean",
            "description": "Keep rows where the store shows a higher regular price crossed out.",
            "default": false
          },
          "inStockOnly": {
            "title": "Available only",
            "type": "boolean",
            "description": "Drop products the store marks unavailable.",
            "default": false
          },
          "includeDepartments": {
            "title": "Include departments",
            "type": "boolean",
            "description": "On Find stores, add the aisle names. Product rows ignore this.",
            "default": false
          },
          "maxItems": {
            "title": "Maximum rows",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many products or stores. 0 means no cap other than the plan limit. A free plan stops at 20. The form starts at 20 so a first run stays small.",
            "default": 20
          },
          "maxConcurrency": {
            "title": "Parallel lookups",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "How many store searches to run at once. Default is 4. Lower it if a run slows down or fails.",
            "default": 4
          },
          "proxy": {
            "title": "Proxy",
            "type": "object",
            "description": "Residential proxies recommended. The default works out of the box."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}