{
  "openapi": "3.0.1",
  "info": {
    "title": "Instacart Scraper - Grocery Products and Retailers",
    "description": "Extract Instacart grocery products, retailers, collections, guest prices, and delivery estimates in the United States and Canada. Pay per delivered row plus a start fee; export JSON, CSV, or Excel.",
    "version": "0.1",
    "x-build-id": "FmpWLk5WhxOCYJwI4"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/lentic_clockss~instacart-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-lentic_clockss-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/lentic_clockss~instacart-scraper/runs": {
      "post": {
        "operationId": "runs-sync-lentic_clockss-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/lentic_clockss~instacart-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-lentic_clockss-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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "auto",
              "nearMe",
              "discoverRetailers",
              "storefront",
              "collection",
              "discoverCollections",
              "product",
              "enrich",
              "search",
              "hub",
              "category",
              "eta",
              "startUrls"
            ],
            "type": "string",
            "description": "Leave on Auto: the mode follows the fields you fill (start URLs, a product, a category, a hub, a collection, a search query, a retailer or a location). Pick a mode only to force it.",
            "default": "auto"
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Instacart storefront, collection, hub, category, product, or search page links on instacart.com or instacart.ca. Each link is a separate input.",
            "items": {
              "type": "string"
            }
          },
          "query": {
            "title": "Search query",
            "type": "string",
            "description": "Search phrase for search mode. Add retailerSlug to search within one retailer."
          },
          "retailerSlug": {
            "title": "Retailer slug",
            "type": "string",
            "description": "Retailer identifier from a store link, such as costco or sprouts. Required for product and enrich modes unless the product link identifies the retailer."
          },
          "collectionSlug": {
            "title": "Collection slug",
            "type": "string",
            "description": "Collection identifier from a collection link, such as produce. Use with retailerSlug in collection mode."
          },
          "hubSlug": {
            "title": "Hub slug",
            "type": "string",
            "description": "Hub identifier, such as alcohol, convenience, pharmacy, pet, baby, or deals_tab. Required for hub mode."
          },
          "categoryId": {
            "title": "SEO category ID",
            "pattern": "^\\s*[0-9]+\\s*$",
            "type": "string",
            "description": "Numeric category identifier from a link such as /categories/1234-snacks. Required for category mode."
          },
          "categorySlug": {
            "title": "SEO category slug",
            "type": "string",
            "description": "Optional category name after the numeric identifier in a category link."
          },
          "productUrl": {
            "title": "Product URL",
            "pattern": "^https?://([A-Za-z0-9-]+\\.)*instacart\\.(com|ca)/.+",
            "type": "string",
            "description": "Instacart product page link. Also set retailerSlug unless the link identifies its retailer."
          },
          "productId": {
            "title": "Product ID",
            "pattern": "^\\s*[0-9A-Za-z_-]+\\s*$",
            "type": "string",
            "description": "Instacart product identifier for product or enrich mode. Also supply retailerSlug."
          },
          "productIds": {
            "title": "Product IDs (batch enrich)",
            "type": "array",
            "description": "Product identifiers for enrich mode. Supply retailerSlug; each identifier counts as a separate input.",
            "items": {
              "type": "string"
            }
          },
          "postalCode": {
            "title": "Postal / ZIP",
            "type": "string",
            "description": "Delivery ZIP or Canadian postal code used to select nearby stores. If omitted, the selected city or market supplies the location."
          },
          "city": {
            "title": "City preset",
            "type": "string",
            "description": "City preset (sf, nyc, la, chicago, seattle, austin, miami, denver, toronto, vancouver, montreal, calgary, ottawa) or US/Canadian city name such as Cleveland, OH. If the city cannot be found, provide postalCode."
          },
          "country": {
            "title": "Country",
            "enum": [
              "us",
              "ca"
            ],
            "type": "string",
            "description": "Shopping market: us for the United States or ca for Canada.",
            "default": "us"
          },
          "maxResults": {
            "title": "Max rows per input",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Most Dataset rows for each start URL or batch product ID; scalar modes such as one search, collection, storefront, or location count as one input. Default 70; larger values are collected in parts of 70. All row types count together for that input. The run stops at your maximum total charge. Free Apify plan: 200 rows per run.",
            "default": 70
          },
          "enrichDetails": {
            "title": "Enrich product details",
            "type": "boolean",
            "description": "Add available ratings to existing product rows in listing modes, up to enrichLimit. Enabled by default; enrichment may increase run time.",
            "default": true
          },
          "enrichLimit": {
            "title": "Enrich limit",
            "minimum": 0,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum product rows to enrich with ratings, from 0 to 50; 0 skips rating enrichment in listing modes. In enrich mode, a positive value caps the product list, while 0 uses maxResults.",
            "default": 10
          },
          "includeEta": {
            "title": "Include ETA",
            "type": "boolean",
            "description": "Include available delivery estimates in nearby-retailer searches. Separate ETA rows share the row limit and are billed like other rows.",
            "default": false
          },
          "maxPages": {
            "title": "Max collection pages",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum collection pages to read, from 1 to 50. The row limit can stop collection earlier.",
            "default": 10
          },
          "shopId": {
            "title": "Shop ID",
            "type": "string",
            "description": "Optional known shop identifier. Resolved from the selected retailer when needed and not provided."
          },
          "zoneId": {
            "title": "Zone ID",
            "type": "string",
            "description": "Optional delivery zone identifier for the selected location."
          },
          "latitude": {
            "title": "Latitude",
            "type": "number",
            "description": "Optional latitude for the shopping location. Use with longitude."
          },
          "longitude": {
            "title": "Longitude",
            "type": "number",
            "description": "Optional longitude for the shopping location. Use with latitude."
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Optional language value. Leave empty for normal use; translated output is not guaranteed."
          },
          "locale": {
            "title": "Locale (alias of country)",
            "enum": [
              "us",
              "ca"
            ],
            "type": "string",
            "description": "Alternative country selector: us or ca. Keep it consistent with country.",
            "default": "us"
          },
          "proxyCountry": {
            "title": "Connection country",
            "type": "string",
            "description": "Leave empty to use the selected market. If supplied, use US or CA to match country."
          },
          "workerBaseUrl": {
            "title": "Developer testing only",
            "type": "string",
            "description": "Leave empty. Used only by the developer for testing."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}