{
  "openapi": "3.0.1",
  "info": {
    "title": "PedidosYa Scraper | Restaurants and Menu Prices",
    "description": "Collect PedidosYa restaurant listings and optional menu prices from 15 Latin American country sites, including ratings, delivery fees and categories. Pay per delivered row plus a start fee.",
    "version": "0.2",
    "x-build-id": "4chSTPXWQvipiz8aN"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/lentic_clockss~pedidosya-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-lentic_clockss-pedidosya-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/lentic_clockss~pedidosya-scraper/runs": {
      "post": {
        "operationId": "runs-sync-lentic_clockss-pedidosya-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/lentic_clockss~pedidosya-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-lentic_clockss-pedidosya-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": "Mode",
            "enum": [
              "auto",
              "city",
              "restaurant",
              "category",
              "chain",
              "discoverCities",
              "discoverCountries",
              "discoverCategories",
              "discoverSitemap",
              "startUrls"
            ],
            "type": "string",
            "description": "Leave on Auto: the mode follows the field you fill (start URLs > restaurant URL / partner id / vendor slug > chain name > category slug > city slug). Pick a Discover mode to list cities, countries, categories or sitemap entries without any target.",
            "default": "auto"
          },
          "market": {
            "title": "Market",
            "enum": [
              "ar",
              "bo",
              "cl",
              "cr",
              "do",
              "ec",
              "sv",
              "gt",
              "hn",
              "ni",
              "pa",
              "py",
              "pe",
              "uy",
              "ve"
            ],
            "type": "string",
            "description": "Country site to collect from. Choose the country matching your city or restaurant address.",
            "default": "pe"
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "PedidosYa city-list or restaurant addresses from a country site (pedidosya.com.ar, pedidosya.cl, ...). Each address is one target with its own maxResults.",
            "items": {
              "type": "string"
            }
          },
          "restaurantUrl": {
            "title": "Restaurant URL",
            "pattern": "^$|^https?://([A-Za-z0-9-]+\\.)*pedidosya\\.[A-Za-z.]+/.*",
            "type": "string",
            "description": "Full restaurant address, e.g. https://www.pedidosya.cl/restaurantes/santiago/subway-51946-menu"
          },
          "partnerId": {
            "title": "Partner / vendor id",
            "type": "string",
            "description": "Restaurant ID, such as 51946. Set the matching market; vendorCode is also accepted as an alias."
          },
          "vendorSlug": {
            "title": "Vendor slug",
            "type": "string",
            "description": "Restaurant address segment, e.g. subway-51946-menu; use together with City slug."
          },
          "chainName": {
            "title": "Chain name filter",
            "type": "string",
            "description": "Chain name, e.g. mcdonalds. Lists that chain's restaurants in the city above (or the market's main city)."
          },
          "categorySlug": {
            "title": "Category slug",
            "type": "string",
            "description": "Food category, e.g. pizza, sushi, hamburguesas. Lists restaurants of that category in the city above (or the market's main city)."
          },
          "citySlug": {
            "title": "City slug",
            "pattern": "^[A-Za-z0-9-]*$",
            "type": "string",
            "description": "City as it appears in PedidosYa URLs, e.g. lima, santiago, buenos-aires, montevideo. Filled alone, the run lists that city's restaurants."
          },
          "maxResults": {
            "title": "Max results per URL or target",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum rows for each startUrls URL; other modes have one target. Default 70, with larger requests collected in parts of at most 70 rows. Restaurant and menu rows share this limit. Maximum cost per run also applies; Free-plan users are limited to 200 rows per run and 10 runs.",
            "default": 70
          },
          "includeMenuItems": {
            "title": "Include menu items",
            "type": "boolean",
            "description": "Include menu products as separate menuItem rows. Off by default; each added row is billed and shares maxResults with its restaurant target.",
            "default": false
          },
          "enrichMenus": {
            "title": "Enrich listing with full menus",
            "type": "boolean",
            "description": "Fetch menu rows after a city, category or chain listing for up to maxEnrich restaurants. Also enable includeMenuItems; added rows are billed and count toward the same maxResults limit.",
            "default": false
          },
          "maxEnrich": {
            "title": "Maximum restaurants whose menus are fetched when enrichMenus and includeMenuItems are enabled. Use 0 to skip this extra collection.",
            "minimum": 0,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum restaurants whose menus are fetched when enrichMenus and includeMenuItems are enabled. Use 0 to skip this extra collection.",
            "default": 5
          },
          "maxMenuItemsPerRestaurant": {
            "title": "Max menu items per restaurant",
            "minimum": 0,
            "maximum": 200,
            "type": "integer",
            "description": "Per-parent cap for menuItem rows. The current input target's maxResults budget still applies.",
            "default": 20
          },
          "maxPages": {
            "title": "Max city list pages",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum listing pages to consider, starting at page. Default 1; increase for a broader listing sample.",
            "default": 1
          },
          "page": {
            "title": "First listing page to collect. Page numbering starts at 1.",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "First listing page to collect. Page numbering starts at 1.",
            "default": 1
          },
          "cursor": {
            "title": "Continuation cursor",
            "type": "object",
            "description": "Copy the nextCursor object from the previous RUN_SUMMARY to continue. Keep the same target settings; listings may change between runs."
          },
          "proxyCountry": {
            "title": "Access country override",
            "type": "string",
            "description": "Optional two-letter country code for regional access. Leave empty to follow market."
          },
          "workerBaseUrl": {
            "title": "Developer testing URL",
            "type": "string",
            "description": "Leave empty. Used only by the developer for testing."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}