{
  "openapi": "3.0.1",
  "info": {
    "title": "Where and When to Go: Destinations and Dates Compared",
    "description": "Name up to six destinations, or a region, plus a window of start dates, nights, who is going, the budget and the style. It compares each place and date on five years of weather, stay prices for your party, flights from your city, holidays and top-rated places for your style, and ranks them.",
    "version": "0.1",
    "x-build-id": "CRXtBpho9OJ52REin"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/zaiq~where-when/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-zaiq-where-when",
        "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/zaiq~where-when/runs": {
      "post": {
        "operationId": "runs-sync-zaiq-where-when",
        "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/zaiq~where-when/run-sync": {
      "post": {
        "operationId": "run-sync-zaiq-where-when",
        "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": {
          "destinations": {
            "title": "Destinations",
            "type": "array",
            "description": "Up to six, each as Town, Country. Leave empty and fill in Region to have them suggested.",
            "items": {
              "type": "string"
            }
          },
          "region": {
            "title": "Region",
            "type": "string",
            "description": "Instead of destinations: for example South African coast or Mediterranean islands."
          },
          "earliestStart": {
            "title": "Earliest start",
            "type": "string",
            "description": "The first day you could leave. Leave empty for 30 days from today."
          },
          "latestStart": {
            "title": "Latest start",
            "type": "string",
            "description": "The last day you could leave (at most 120 days later). Leave empty for two weeks after the earliest."
          },
          "nights": {
            "title": "Nights",
            "minimum": 1,
            "maximum": 14,
            "type": "integer",
            "description": "How long you go for.",
            "default": 5
          },
          "dateOptions": {
            "title": "Start dates to compare",
            "minimum": 1,
            "maximum": 3,
            "type": "integer",
            "description": "Spread evenly across the window, 1 to 3.",
            "default": 3
          },
          "adults": {
            "title": "Adults",
            "minimum": 1,
            "maximum": 12,
            "type": "integer",
            "description": "Everyone 18 or older.",
            "default": 2
          },
          "childrenAges": {
            "title": "Children's ages",
            "type": "array",
            "description": "One age per child, for example [7, 10].",
            "items": {
              "type": "integer"
            },
            "default": []
          },
          "budget": {
            "title": "Budget",
            "minimum": 1,
            "type": "number",
            "description": "For the stay and flights together."
          },
          "currency": {
            "title": "Currency",
            "type": "string",
            "description": "Three-letter code, for example ZAR, EUR, USD or GBP.",
            "default": "ZAR"
          },
          "tripStyles": {
            "title": "Trip style",
            "type": "array",
            "description": "Beach weighs warm, calm days; nature and adrenaline mild dry ones; every style counts the top-rated places for it.",
            "items": {
              "type": "string",
              "enum": [
                "family",
                "relaxing",
                "adrenaline",
                "nightlife",
                "romantic",
                "culture",
                "food-and-wine",
                "nature",
                "beach",
                "luxury",
                "budget"
              ],
              "enumTitles": [
                "Family",
                "Relaxing",
                "Adrenaline",
                "Nightlife (a jol)",
                "Romantic",
                "Culture",
                "Food and wine",
                "Nature",
                "Beach",
                "Luxury",
                "Budget"
              ]
            },
            "default": []
          },
          "origin": {
            "title": "Flying from",
            "type": "string",
            "description": "Your city or airport, for flight prices."
          },
          "includeFlights": {
            "title": "Compare flights",
            "type": "boolean",
            "description": "Cheapest flights from your city for each option.",
            "default": true
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Language of the written reasons and notes.",
            "default": "English"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}