{
  "openapi": "3.0.1",
  "info": {
    "title": "US Grocery Price Comparator",
    "description": "Compare grocery staple prices across 11 major US chains (Walmart, Target, Kroger & affiliates), normalized to unit prices ($/fl oz, $/oz, $/lb, $/count). Features store-brand equivalence, promo vs. regular price separation, private-label margin metrics, and a Whole-Basket Optimizer.",
    "version": "0.0",
    "x-build-id": "0T7HNFrj3QxJ116F8"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/hypebridge~us-grocery-price-comparator/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-hypebridge-us-grocery-price-comparator",
        "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/hypebridge~us-grocery-price-comparator/runs": {
      "post": {
        "operationId": "runs-sync-hypebridge-us-grocery-price-comparator",
        "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/hypebridge~us-grocery-price-comparator/run-sync": {
      "post": {
        "operationId": "run-sync-hypebridge-us-grocery-price-comparator",
        "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": {
          "queries": {
            "title": "Grocery items",
            "maxItems": 50,
            "type": "array",
            "description": "Grocery staples to compare across supermarkets (e.g., 'whole milk 1 gallon', 'large white eggs 12 ct'). Max 50 items per run. Can be combined with or replaced by a Preset Staple Basket.",
            "items": {
              "type": "string"
            }
          },
          "presetBasket": {
            "title": "Preset Staple Basket",
            "enum": [
              "none",
              "usda_thrifty_15",
              "cpi_core_25",
              "keto_10",
              "baking_essentials_8"
            ],
            "type": "string",
            "description": "Optional pre-configured grocery basket for instant benchmarking or CPI/inflation tracking. Merged with any custom Grocery items above (up to 50 total).",
            "default": "none"
          },
          "stores": {
            "title": "Stores",
            "type": "array",
            "description": "Supermarket chains to compare (11 supported banners). Every store is priced at the nearest store to your ZIP code. A banner with no store within ~25 miles of the ZIP is skipped (null in storeLocations) rather than priced from another region.",
            "items": {
              "type": "string",
              "enum": [
                "walmart",
                "target",
                "kroger",
                "fred_meyer",
                "ralphs",
                "harris_teeter",
                "king_soopers",
                "frys",
                "marianos",
                "smiths",
                "qfc"
              ],
              "enumTitles": [
                "Walmart",
                "Target",
                "Kroger (Midwest / South)",
                "Fred Meyer (Pacific Northwest)",
                "Ralphs (Southern California)",
                "Harris Teeter (Mid-Atlantic / Carolinas)",
                "King Soopers (Colorado / Rocky Mountains)",
                "Fry's Food Stores (Arizona)",
                "Mariano's (Chicagoland)",
                "Smith's Food & Drug (Mountain West / Nevada / Utah)",
                "QFC - Quality Food Centers (Seattle / Puget Sound)"
              ]
            },
            "default": [
              "walmart",
              "target",
              "kroger"
            ]
          },
          "zipCode": {
            "title": "ZIP code (local prices)",
            "pattern": "^[0-9]{5}$",
            "type": "string",
            "description": "5-digit US ZIP code. Walmart, Target and every Kroger banner are priced at the nearest store to this ZIP, so all prices come from the same neighbourhood. Kroger banners only exist in some regions (e.g. Fred Meyer in the Pacific Northwest); one with no store near the ZIP is skipped. Default: 45202 (Cincinnati, OH), where Walmart, Target and Kroger all have stores.",
            "default": "45202"
          },
          "candidatesPerStore": {
            "title": "Candidates per store",
            "minimum": 3,
            "maximum": 12,
            "type": "integer",
            "description": "Number of search results inspected per store. Higher numbers improve store-brand matching accuracy.",
            "default": 8
          },
          "matchMode": {
            "title": "Matching mode",
            "enum": [
              "all_tiers",
              "private_label_equivalent",
              "exact_brand_only"
            ],
            "type": "string",
            "description": "Choose matching strategy: all available tiers (store brand + national brand + organic), equivalent store private labels only, or exact national brands only.",
            "default": "all_tiers"
          },
          "krogerClientId": {
            "title": "Kroger Developer Client ID",
            "type": "string",
            "description": "Optional custom Kroger OAuth2 client_id from developer.kroger.com. Falls back to default environment credentials."
          },
          "krogerClientSecret": {
            "title": "Kroger Developer Client Secret",
            "type": "string",
            "description": "Optional custom Kroger OAuth2 client_secret from developer.kroger.com."
          },
          "maxChildSpendUsd": {
            "title": "Max child actor spend (USD)",
            "minimum": 0.1,
            "maximum": 20,
            "type": "number",
            "description": "Hard budget cap on pass-through Walmart/Target scraper charges for this run (about $0.10 per Walmart query and $0.07 per Target query at 8 candidates, free-tier rates). Queries beyond the cap are skipped. Kroger banners cost $0.",
            "default": 5
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}