{
  "openapi": "3.0.1",
  "info": {
    "title": "iFood Restaurant Scraper",
    "description": "Find restaurants in a nationwide index of 98,000+ iFood Brazil establishments, with address, opening hours and the public company registry, then extract live store profiles, complete menus with prices and customer reviews. Structured output, one row per record.",
    "version": "3.0",
    "x-build-id": "VP8HVgDx1MRO45Hd1"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/yasmany.casanova~ifood-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-yasmany.casanova-ifood-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/yasmany.casanova~ifood-scraper/runs": {
      "post": {
        "operationId": "runs-sync-yasmany.casanova-ifood-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/yasmany.casanova~ifood-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-yasmany.casanova-ifood-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": "Operation Mode",
            "enum": [
              "search",
              "store_info",
              "menu",
              "reviews"
            ],
            "type": "string",
            "description": "Type of data to extract: search (find restaurants and their store_id, no proxy needed), store_info (restaurant details), menu (complete menu with prices), or reviews.",
            "default": "menu"
          },
          "store_id": {
            "title": "Store ID",
            "type": "string",
            "description": "Restaurant UUID, required for store_info, menu and reviews. The search mode returns it for every restaurant it finds. You can also open the restaurant on ifood.com.br and copy the last segment of its URL: in https://www.ifood.com.br/delivery/sao-paulo-sp/some-restaurant/f1b60ced-d490-499f-976b-6d3d717d927e the ID is f1b60ced-d490-499f-976b-6d3d717d927e."
          },
          "searchTerm": {
            "title": "Restaurant Name Contains",
            "type": "string",
            "description": "Part of the restaurant name. Accents and case do not matter: \"acai\" finds \"Açaí\"."
          },
          "city": {
            "title": "City",
            "type": "string",
            "description": "City name, with or without accents: \"São Paulo\" and \"sao paulo\" are the same. Combine with State to avoid homonyms."
          },
          "state": {
            "title": "State (UF)",
            "pattern": "^[A-Za-z]{2}$",
            "type": "string",
            "description": "Two-letter state code, such as SP, RJ or MG."
          },
          "segment": {
            "title": "Category",
            "type": "string",
            "description": "iFood category of the restaurant, as shown in the app. The largest: Brasileira, Lanches, Pizza, Doces & Bolos, Açaí, Japonesa, Marmita, Padaria, Sorvetes, Salgados, Saudável, Italiana, Pastel, Carnes, Árabe, Chinesa, Hambúrguer, Cafeteria. Accents and case do not matter."
          },
          "minRating": {
            "title": "Minimum Rating",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Keep restaurants rated at least this many stars (0 to 5). Unrated restaurants are left out whenever this is set."
          },
          "onlyWithCnpj": {
            "title": "Only With CNPJ",
            "type": "boolean",
            "description": "Keep only restaurants whose company tax id (CNPJ) is known.",
            "default": false
          },
          "onlyWithProfile": {
            "title": "Only With Captured Profile",
            "type": "boolean",
            "description": "Keep only restaurants whose full profile was captured: those carry street address, coordinates, price range, minimum order, service flags, opening hours and rating count. The others carry name, category, city, state and the iFood page.",
            "default": false
          },
          "onlyWithCompany": {
            "title": "Only With Company Registry",
            "type": "boolean",
            "description": "Keep only restaurants whose company registry block is present: legal name, status, size, legal nature, main activity, opening date, and for companies proper the corporate phone and email. These rows may be priced separately; see the Pricing tab.",
            "default": false
          },
          "maxResults": {
            "title": "Max Results",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Restaurants to return in this run, 1 to 1000. Default: 100. Every row also reports total_matches, so you know whether to page.",
            "default": 100
          },
          "offset": {
            "title": "Offset",
            "minimum": 0,
            "type": "integer",
            "description": "Rows to skip before returning results, for paging. Default: 0. The order is stable between runs of the same filters.",
            "default": 0
          },
          "maxReviews": {
            "title": "Max Reviews",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum number of reviews to fetch (reviews mode only). Default: 100, Max: 1000.",
            "default": 100
          },
          "latitude": {
            "title": "Customer Address Latitude",
            "type": "string",
            "description": "Latitude of the delivery address, e.g. \"-23.5608786\". Give both coordinates or neither."
          },
          "longitude": {
            "title": "Customer Address Longitude",
            "type": "string",
            "description": "Longitude of the delivery address, e.g. \"-46.6570743\". Give both coordinates or neither."
          },
          "useApifyProxy": {
            "title": "Use Apify Residential Proxy",
            "type": "boolean",
            "description": "Enable Apify Residential Proxy for reliable data extraction. Requires an Apify paid plan. Free-plan users can provide their own residential proxy via 'customProxyUrl' below. The search mode never uses a proxy.",
            "default": true
          },
          "proxyGroups": {
            "title": "Proxy Groups",
            "type": "array",
            "description": "Proxy group for Apify Proxy. ['RESIDENTIAL'] is what every live mode uses.",
            "items": {
              "type": "string"
            },
            "default": [
              "RESIDENTIAL"
            ]
          },
          "proxyCountry": {
            "title": "Proxy Country",
            "pattern": "^[A-Z]{2}$",
            "type": "string",
            "description": "Country code for the proxy (ISO 3166-1 alpha-2). BR is recommended.",
            "default": "BR"
          },
          "customProxyUrl": {
            "title": "Custom Proxy URL",
            "type": "string",
            "description": "Your own proxy, in the form http://user:pass@host:port. Overrides the Apify Proxy settings above. Optional: it simply replaces Apify Proxy and works on any plan, including Free."
          },
          "maxRetries": {
            "title": "Max Retries",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Maximum retry attempts for failed requests.",
            "default": 3
          },
          "timeout": {
            "title": "Timeout (seconds)",
            "minimum": 10,
            "maximum": 120,
            "type": "integer",
            "description": "Request timeout in seconds.",
            "default": 30
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}