{
  "openapi": "3.0.1",
  "info": {
    "title": "Open Food Facts Scraper",
    "description": "Scrape Open Food Facts (3M+ grocery products). Search or filter by barcode, brand, category, store, label, country, manufacturer, URL. Returns nutrition, Nutri-Score, Eco-Score, NOVA group, ingredients, allergens, packaging, images",
    "version": "1.1",
    "x-build-id": "qcAMBbrPXTzyQCi4g"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawlerbros~openfoodfacts-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawlerbros-openfoodfacts-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~openfoodfacts-scraper/runs": {
      "post": {
        "operationId": "runs-sync-crawlerbros-openfoodfacts-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~openfoodfacts-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-crawlerbros-openfoodfacts-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",
              "byBarcodes",
              "byCategory",
              "byBrand",
              "byCountry",
              "byStore",
              "byLabel",
              "byManufacturer",
              "byUrls"
            ],
            "type": "string",
            "description": "What to fetch.",
            "default": "search"
          },
          "searchQuery": {
            "title": "Search query (mode=search)",
            "type": "string",
            "description": "Free-text query — searches name / brand / ingredients.",
            "default": "chocolate"
          },
          "barcodes": {
            "title": "Barcodes (mode=byBarcodes)",
            "type": "array",
            "description": "EAN-13 / EAN-8 / UPC-A barcode strings (digits only after normalization).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "categorySlug": {
            "title": "Category slug (mode=byCategory)",
            "enum": [
              "beverages",
              "snacks",
              "dairies",
              "cereals-and-potatoes",
              "fruits-and-vegetables-based-foods",
              "meats",
              "fishes",
              "fats",
              "sweets",
              "chocolates",
              "biscuits-and-cakes",
              "breads",
              "pastas",
              "pizzas",
              "sauces",
              "spreads",
              "frozen-foods",
              "condiments",
              "breakfast-cereals",
              "yogurts",
              "cheeses",
              "ice-cream",
              "milk",
              "waters",
              "fruit-juices",
              "sodas",
              "alcoholic-beverages",
              "wines",
              "beers",
              "coffees",
              "teas",
              "plant-based-foods",
              "plant-based-foods-and-beverages",
              "nuts",
              "dried-fruits",
              "honeys",
              "jams",
              "soups",
              "canned-foods",
              "ready-meals",
              "salty-snacks"
            ],
            "type": "string",
            "description": "Open Food Facts category slug. Spaces / commas are normalized to hyphens."
          },
          "brandSlug": {
            "title": "Brand slug (mode=byBrand)",
            "type": "string",
            "description": "Brand name slug — e.g. `nutella`, `danone`, `coca-cola`, `kelloggs`."
          },
          "storeSlug": {
            "title": "Store slug (mode=byStore)",
            "enum": [
              "carrefour",
              "walmart",
              "tesco",
              "lidl",
              "aldi",
              "auchan",
              "casino",
              "intermarche",
              "leclerc",
              "monoprix",
              "kroger",
              "target",
              "whole-foods-market",
              "trader-joe-s",
              "publix",
              "costco",
              "sainsbury-s",
              "asda",
              "morrisons",
              "marks-spencer",
              "waitrose",
              "rewe",
              "edeka",
              "kaufland",
              "netto",
              "penny",
              "mercadona",
              "eroski",
              "dia",
              "esselunga",
              "coop",
              "migros",
              "iga",
              "loblaws",
              "metro",
              "woolworths",
              "coles",
              "7-eleven"
            ],
            "type": "string",
            "description": "Retailer slug. Choose a known store or type a custom slug."
          },
          "labelSlug": {
            "title": "Label slug (mode=byLabel)",
            "enum": [
              "organic",
              "eu-organic",
              "usda-organic",
              "vegan",
              "vegetarian",
              "no-gluten",
              "gluten-free",
              "fair-trade",
              "kosher",
              "halal",
              "no-lactose",
              "no-palm-oil",
              "no-added-sugar",
              "no-preservatives",
              "no-colorings",
              "no-artificial-flavors",
              "made-in-france",
              "made-in-italy",
              "ab-agriculture-biologique",
              "fr-bio-01",
              "rainforest-alliance",
              "msc-certified-sustainable-seafood"
            ],
            "type": "string",
            "description": "Food label slug (organic, vegan, fair-trade, etc.)."
          },
          "manufacturerSlug": {
            "title": "Manufacturing place slug (mode=byManufacturer)",
            "type": "string",
            "description": "Manufacturing place / country (e.g. `france`, `italy`, `germany`)."
          },
          "productUrls": {
            "title": "Product URLs (mode=byUrls)",
            "type": "array",
            "description": "Direct product URLs like `https://world.openfoodfacts.org/product/3017620422003`.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "country": {
            "title": "Country filter",
            "enum": [
              "any",
              "united-states",
              "united-kingdom",
              "france",
              "germany",
              "italy",
              "spain",
              "belgium",
              "netherlands",
              "switzerland",
              "canada",
              "australia",
              "japan",
              "brazil",
              "mexico",
              "india",
              "poland",
              "portugal",
              "sweden",
              "norway",
              "denmark",
              "finland",
              "ireland",
              "austria",
              "russia",
              "china",
              "south-korea",
              "argentina",
              "chile",
              "colombia",
              "south-africa"
            ],
            "type": "string",
            "description": "Restrict results to products sold in a specific country (also drives the country API host).",
            "default": "any"
          },
          "language": {
            "title": "Language",
            "enum": [
              "any",
              "en",
              "fr",
              "de",
              "it",
              "es",
              "pt",
              "nl",
              "pl",
              "ru",
              "ja",
              "zh",
              "ko",
              "ar",
              "tr",
              "sv",
              "da",
              "no",
              "fi",
              "cs",
              "el",
              "he",
              "th",
              "vi",
              "id",
              "ms",
              "ro",
              "hu",
              "uk",
              "hi",
              "bn"
            ],
            "type": "string",
            "description": "Preferred language for `productName` / `ingredientsText` (ISO 639-1).",
            "default": "any"
          },
          "novaGroup": {
            "title": "NOVA processing levels",
            "uniqueItems": true,
            "type": "array",
            "description": "NOVA food-processing classification (1=unprocessed, 4=ultra-processed). Multi-select.",
            "items": {
              "type": "string",
              "enum": [
                "1",
                "2",
                "3",
                "4"
              ],
              "enumTitles": [
                "1 — Unprocessed / minimally processed",
                "2 — Processed culinary ingredients",
                "3 — Processed foods",
                "4 — Ultra-processed foods"
              ]
            },
            "default": []
          },
          "nutriscore": {
            "title": "Nutri-Score grades",
            "uniqueItems": true,
            "type": "array",
            "description": "Filter by Nutri-Score letter (A best → E worst). Multi-select.",
            "items": {
              "type": "string",
              "enum": [
                "A",
                "B",
                "C",
                "D",
                "E",
                "unknown"
              ],
              "enumTitles": [
                "A",
                "B",
                "C",
                "D",
                "E",
                "Unknown"
              ]
            },
            "default": []
          },
          "ecoscore": {
            "title": "Eco-Score grades",
            "uniqueItems": true,
            "type": "array",
            "description": "Filter by Eco-Score letter (A best → E worst). Multi-select.",
            "items": {
              "type": "string",
              "enum": [
                "A",
                "B",
                "C",
                "D",
                "E",
                "unknown"
              ],
              "enumTitles": [
                "A",
                "B",
                "C",
                "D",
                "E",
                "Unknown"
              ]
            },
            "default": []
          },
          "containsLabels": {
            "title": "Must contain labels",
            "uniqueItems": true,
            "type": "array",
            "description": "Require every selected label to appear on the product.",
            "items": {
              "type": "string",
              "enum": [
                "organic",
                "vegan",
                "vegetarian",
                "gluten-free",
                "no-gluten",
                "fair-trade",
                "kosher",
                "halal",
                "no-lactose",
                "no-palm-oil",
                "no-added-sugar",
                "no-preservatives",
                "no-colorings"
              ],
              "enumTitles": [
                "Organic",
                "Vegan",
                "Vegetarian",
                "Gluten-free",
                "No gluten",
                "Fair trade",
                "Kosher",
                "Halal",
                "No lactose",
                "No palm oil",
                "No added sugar",
                "No preservatives",
                "No colorings"
              ]
            },
            "default": []
          },
          "excludesAllergens": {
            "title": "Exclude allergens",
            "uniqueItems": true,
            "type": "array",
            "description": "Drop products containing any of the selected allergens.",
            "items": {
              "type": "string",
              "enum": [
                "milk",
                "eggs",
                "gluten",
                "peanuts",
                "soybeans",
                "fish",
                "crustaceans",
                "molluscs",
                "tree-nuts",
                "sesame-seeds",
                "celery",
                "mustard",
                "lupin",
                "sulphur-dioxide-and-sulphites"
              ],
              "enumTitles": [
                "Milk",
                "Eggs",
                "Gluten",
                "Peanuts",
                "Soybeans",
                "Fish",
                "Crustaceans",
                "Molluscs",
                "Tree nuts",
                "Sesame seeds",
                "Celery",
                "Mustard",
                "Lupin",
                "Sulphites (SO2)"
              ]
            },
            "default": []
          },
          "minProductCompleteness": {
            "title": "Min product completeness (0-1)",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Drop products whose completeness score is below this percentage. 0=any, 100=fully complete.",
            "default": 0
          },
          "containsKeyword": {
            "title": "Must contain keyword",
            "type": "string",
            "description": "Post-fetch substring match against `productName` / brand / ingredients."
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Hard cap on emitted records.",
            "default": 50
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}