{
  "openapi": "3.0.1",
  "info": {
    "title": "Open Food Facts Scraper",
    "description": "Scrape Open Food Facts - 3M+ grocery products worldwide. Search by keyword, look up by EAN barcode, or browse by category. Returns nutrition facts, Nutri-Score, NOVA group, Eco-Score, ingredients, allergens, images, and more.",
    "version": "1.0",
    "x-build-id": "DeascLA6OcpI2KD3H"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawlerbros~open-food-facts-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawlerbros-open-food-facts-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~open-food-facts-scraper/runs": {
      "post": {
        "operationId": "runs-sync-crawlerbros-open-food-facts-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~open-food-facts-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-crawlerbros-open-food-facts-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",
              "byBarcode"
            ],
            "type": "string",
            "description": "What to fetch: search by keyword, barcode lookup, or category browse.",
            "default": "search"
          },
          "searchQuery": {
            "title": "Search query (mode=search)",
            "type": "string",
            "description": "Free-text search query, e.g. `chocolate`, `avocado`, `oat milk`. Searches across product name, brand, and ingredients.",
            "default": "chocolate"
          },
          "barcodes": {
            "title": "EAN barcodes (mode=byBarcode)",
            "type": "array",
            "description": "List of EAN-8 or EAN-13 barcodes to look up, e.g. `3017620422003` (Nutella), `5000159407236` (Mars bar).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "categorySlug": {
            "title": "Food category (mode=byCategory)",
            "enum": [
              "beverages",
              "dairy-products",
              "breads",
              "cereals-and-their-products",
              "snacks",
              "confectioneries",
              "meats",
              "fish-and-seafood",
              "fruits-and-vegetables",
              "condiments",
              "oils-and-fats",
              "frozen-foods",
              "baby-foods",
              "alcoholic-beverages",
              "water",
              "chocolates",
              "biscuits-and-cakes",
              "breakfast-cereals",
              "yogurts",
              "cheeses",
              "ice-cream",
              "sodas",
              "fruit-juices",
              "coffees",
              "teas",
              "nuts",
              "sauces",
              "soups",
              "ready-meals",
              "plant-based-foods"
            ],
            "type": "string",
            "description": "Open Food Facts category slug to browse.",
            "default": "chocolates"
          },
          "brand": {
            "title": "Brand filter",
            "type": "string",
            "description": "Filter results to a specific brand, e.g. `Ferrero`, `Nestlé`, `Danone`."
          },
          "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"
            ],
            "type": "string",
            "description": "Restrict results to products sold in a specific country.",
            "default": "any"
          },
          "language": {
            "title": "Language preference",
            "enum": [
              "any",
              "en",
              "fr",
              "de",
              "it",
              "es",
              "pt",
              "nl",
              "pl",
              "ru",
              "ja",
              "zh",
              "ar",
              "tr",
              "sv",
              "da",
              "no",
              "fi"
            ],
            "type": "string",
            "description": "Preferred language for product name and ingredients text (ISO 639-1). Defaults to English.",
            "default": "any"
          },
          "hasIngredients": {
            "title": "Must have ingredients",
            "type": "boolean",
            "description": "When enabled, only include products that have a populated ingredients text.",
            "default": false
          },
          "hasImage": {
            "title": "Must have image",
            "type": "boolean",
            "description": "When enabled, only include products that have a product image.",
            "default": false
          },
          "hasNutrition": {
            "title": "Must have nutrition data",
            "type": "boolean",
            "description": "When enabled, only include products that have at least one nutriment value (calories, fat, protein, etc.).",
            "default": false
          },
          "nutriscore": {
            "title": "Nutri-Score grades",
            "uniqueItems": true,
            "type": "array",
            "description": "Filter by Nutri-Score letter grade (A best → E worst). Leave empty to include all grades.",
            "items": {
              "type": "string",
              "enum": [
                "A",
                "B",
                "C",
                "D",
                "E"
              ],
              "enumTitles": [
                "A — Very good",
                "B — Good",
                "C — Average",
                "D — Poor",
                "E — Very poor"
              ]
            },
            "default": []
          },
          "novaGroup": {
            "title": "NOVA processing level",
            "uniqueItems": true,
            "type": "array",
            "description": "Filter by NOVA food-processing group (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": []
          },
          "dietaryPreference": {
            "title": "Dietary preference",
            "enum": [
              "any",
              "vegan",
              "vegetarian",
              "palmOilFree"
            ],
            "type": "string",
            "description": "Only include products confirmed (not just 'maybe') to match this dietary preference, based on Open Food Facts' own ingredient analysis.",
            "default": "any"
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum number of products to return.",
            "default": 20
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}