{
  "openapi": "3.0.1",
  "info": {
    "title": "FreshDirect Grocery Scraper",
    "description": "Scrape FreshDirect - US Northeast online grocery. Search the catalog by keyword, browse departments/categories, fetch products by ID. Get name, brand, size, price, sale price, unit price, allergens, ingredients, images. No auth required.",
    "version": "1.0",
    "x-build-id": "qr1X1G7iGDmSVXLDV"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawlerbros~freshdirect-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawlerbros-freshdirect-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~freshdirect-scraper/runs": {
      "post": {
        "operationId": "runs-sync-crawlerbros-freshdirect-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~freshdirect-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-crawlerbros-freshdirect-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"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "byCategory",
              "byDepartment",
              "byProductIds",
              "byUrls",
              "deals"
            ],
            "type": "string",
            "description": "What to fetch.",
            "default": "search"
          },
          "searchQuery": {
            "title": "Search query",
            "type": "string",
            "description": "Free-text query (mode=search), e.g. `milk`, `organic chicken`, `chocolate`.",
            "default": "milk"
          },
          "categoryId": {
            "title": "Category (mode=byCategory)",
            "enum": [
              "dai_milk_cream",
              "dai_milk_milk",
              "dai_butte",
              "dai_eggs",
              "dai_yogur",
              "dai_chees",
              "dai_milk_non",
              "dai_soy",
              "dai_dips_spreads",
              "dai_condi",
              "fro_icecr",
              "fro_appet",
              "fro_meals",
              "fro_veget",
              "fro_fruit",
              "bak_artisan_bread",
              "bak_bagel_knish",
              "gro_cerea",
              "gro_coffe",
              "gro_canne",
              "gro_pasta",
              "gro_rice",
              "gro_peanu_nut",
              "gro_snack_chips",
              "gro_candy",
              "gro_cooki",
              "beer_craft",
              "gro_bever_juice",
              "gro_bever_soy_nut_almond",
              "gro_baker",
              "gro_salad",
              "gro_condi",
              "gro_oil",
              "hba_bath_body",
              "hba_dental",
              "gro_pet_catfud",
              "gro_pet_dogfud",
              "apl",
              "ban",
              "avc",
              "veg_packaged",
              "art_asp",
              "veg_asian_vegetables",
              "pou_chicken",
              "pou_turkey",
              "mea_alternatives",
              "meals_entrees",
              "meals_30g_protein",
              "scav",
              "fflt",
              "fwhl",
              "gro_baby_food",
              "gro_house_clean",
              "flor_bouquets",
              "cat_antipasti",
              "deli_charcuterie"
            ],
            "type": "string",
            "description": "FreshDirect category id to browse, e.g. `dai_milk_cream` (Cream & Creamers). Popular categories are listed below; any category id works."
          },
          "departmentId": {
            "title": "Department (mode=byDepartment)",
            "enum": [
              "dai",
              "bev",
              "bky",
              "fro",
              "fdw",
              "sea",
              "fru",
              "veg",
              "flor",
              "mea",
              "pou",
              "meals",
              "del",
              "che",
              "cat",
              "pan",
              "snacks",
              "beer",
              "hhd",
              "bby",
              "hba",
              "pet",
              "deli_prepared",
              "fresh_produce",
              "meat_seafood",
              "supergro"
            ],
            "type": "string",
            "description": "FreshDirect department to browse. Superdepartments (Prepared & Deli, Produce, Meat & Poultry, Grocery) are expanded into their sub-departments automatically."
          },
          "productIds": {
            "title": "Product IDs (mode=byProductIds)",
            "type": "array",
            "description": "FreshDirect product IDs (e.g. `dai_pid_2005607`, `dai_orgval_whlmilk_01`). Full product-detail pages are fetched for each.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "urls": {
            "title": "FreshDirect URLs (mode=byUrls)",
            "type": "array",
            "description": "Any FreshDirect URL: search pages (`/search.jsp?searchParams=...`), category pages (`/sc/<categoryId>`), department pages (`/d/<deptId>`, `/sd/<superId>`), product pages (`/product/<productId>`), or the deals page.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "minPrice": {
            "title": "Min price (USD)",
            "minimum": 0,
            "maximum": 10000,
            "type": "number",
            "description": "Only emit products priced at or above this amount."
          },
          "maxPrice": {
            "title": "Max price (USD)",
            "minimum": 0,
            "maximum": 10000,
            "type": "number",
            "description": "Only emit products priced at or below this amount."
          },
          "ebtEligibleOnly": {
            "title": "EBT-eligible only",
            "type": "boolean",
            "description": "Only emit products eligible for SNAP/EBT payment.",
            "default": false
          },
          "inStockOnly": {
            "title": "In-stock only",
            "type": "boolean",
            "description": "Only emit products marked as available.",
            "default": false
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Hard cap on emitted records.",
            "default": 50
          },
          "useApifyProxy": {
            "title": "Use Apify proxy (optional)",
            "type": "boolean",
            "description": "Enable to fall back to the Apify AUTO proxy if a request is blocked (403/429). FreshDirect works without a proxy; enable only if you see blocks.",
            "default": false
          },
          "proxyGroups": {
            "title": "Proxy groups",
            "type": "array",
            "description": "Apify proxy groups used when `useApifyProxy` is enabled.",
            "default": [
              "AUTO"
            ],
            "items": {
              "type": "string"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}