{
  "openapi": "3.0.1",
  "info": {
    "title": "DiDi Food Restaurant & Menu Scraper - Mexico & LatAm",
    "description": "Scrape DiDi Food restaurants and menus in Mexico, Colombia, Costa Rica and Peru: every store of a city with cuisine, rating and address, plus menu items with sections, descriptions, images and prices in MXN, COP, CRC or PEN. No login or proxy setup.",
    "version": "0.1",
    "x-build-id": "ZrZKuZeiofXVmjJ6d"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/teodor_banea~didi-food-restaurant-menu-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-teodor_banea-didi-food-restaurant-menu-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/teodor_banea~didi-food-restaurant-menu-scraper/runs": {
      "post": {
        "operationId": "runs-sync-teodor_banea-didi-food-restaurant-menu-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/teodor_banea~didi-food-restaurant-menu-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-teodor_banea-didi-food-restaurant-menu-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",
        "properties": {
          "mode": {
            "title": "What to scrape",
            "enum": [
              "menus",
              "restaurants"
            ],
            "type": "string",
            "description": "Choose \"Full menus\" for one row per menu item with its section, description, price and image (a typical store has 20–100 items). Choose \"Restaurants\" for one row per store with cuisine, rating, address and menu size.",
            "default": "menus"
          },
          "country": {
            "title": "Country",
            "enum": [
              "mx",
              "co",
              "cr",
              "pe"
            ],
            "type": "string",
            "description": "Select the DiDi Food market. Cities and store ids are looked up in this country; prices come in its currency (MXN, COP, CRC or PEN).",
            "default": "mx"
          },
          "cities": {
            "title": "Cities",
            "type": "array",
            "description": "Enter cities as DiDi Food lists them, e.g. \"Ciudad de México\", \"Guadalajara\", \"Monterrey\", \"Bogotá\", \"Medellín\", \"San José\" or \"Lima\". Case and accents are ignored and the site's city codes work too (\"ciudad-de-mexico-cdmx\"). Unknown names are reported with close matches. Each city returns the stores DiDi Food lists for it (Mexico City lists about 6,000).",
            "items": {
              "type": "string"
            }
          },
          "restaurantUrls": {
            "title": "Store URLs or ids",
            "type": "array",
            "description": "Enter DiDi Food store page URLs (https://web.didiglobal.com/mx/food/<city>/<store>/<id>/), DiDi Food store links or bare store ids (19 digits; the Country field tells where to look). They are read in addition to the cities, always from their store page.",
            "items": {
              "type": "string"
            }
          },
          "searchQuery": {
            "title": "Search stores",
            "type": "string",
            "description": "Keep only stores whose name contains this text. Case and accents are ignored, so \"cafe\" also finds \"Café\"."
          },
          "cuisines": {
            "title": "Cuisines",
            "type": "array",
            "description": "Keep only stores with one of these cuisines as DiDi Food shows them, e.g. \"Pizzas\", \"Hamburguesas\", \"Tacos\", \"Sushi\", \"Postres\". Case and accents are ignored.",
            "items": {
              "type": "string"
            }
          },
          "minRating": {
            "title": "Minimum rating",
            "enum": [
              "4",
              "4.5",
              "4.8"
            ],
            "type": "string",
            "description": "Keep only stores rated at least this much. Stores without a rating are dropped when this is set."
          },
          "maxRestaurants": {
            "title": "Maximum stores per city",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Limit the stores returned (restaurants) or the stores whose menus are read (menus) for each city; your store URLs form one more group with the same limit. 0 = all stores of the city (restaurants: up to 8,000 per city; menus: up to 2,000 per city). Stores with an empty menu are skipped without counting.",
            "default": 50
          },
          "maxItemsPerRestaurant": {
            "title": "Maximum items per store",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "In menus mode, keep only the first N menu items of each store (in menu order). 0 = the whole menu.",
            "default": 0
          },
          "maxItemsTotal": {
            "title": "Maximum results",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Set a hard ceiling on returned rows for the whole run, across all cities. 0 = no ceiling (still capped at 50,000 rows). The run stops as soon as it is reached.",
            "default": 0
          },
          "includeDetails": {
            "title": "Include store page details",
            "type": "boolean",
            "description": "In restaurants mode, also read each store's page: the site's short store summary, the number of menu sections and items, and the lowest and highest menu price. One extra request per store (the city list alone gives 20 stores per request). Store URLs always get these details.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}