{
  "openapi": "3.0.1",
  "info": {
    "title": "Flight Price History & Booking Timing",
    "description": "Is this a good price? For any route: today's cheapest fare against that route's usual price, a low/typical/high verdict, 61 days of daily price history on the very first run, and how far ahead the route is normally cheapest to book — by week, month and weekday.",
    "version": "0.0",
    "x-build-id": "tu06Q2x7e40d28GXW"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/apt_marble~flight-price-history-booking-timing/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-apt_marble-flight-price-history-booking-timing",
        "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/apt_marble~flight-price-history-booking-timing/runs": {
      "post": {
        "operationId": "runs-sync-apt_marble-flight-price-history-booking-timing",
        "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/apt_marble~flight-price-history-booking-timing/run-sync": {
      "post": {
        "operationId": "run-sync-apt_marble-flight-price-history-booking-timing",
        "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": [
          "routes"
        ],
        "properties": {
          "routes": {
            "title": "Routes",
            "type": "array",
            "description": "One route per line, written as two three-letter codes: JFK-LAX. Use airport codes (JFK, LHR, CDG) or city codes that cover every airport in a city (NYC, LON, PAR). Each route produces one row.",
            "items": {
              "type": "string"
            }
          },
          "departureDate": {
            "title": "Departure date",
            "type": "string",
            "description": "The day to price. Write an exact day as 2026-09-15, or a number of days from the day the run starts as +30 — handy for a scheduled report that should always look, say, a month ahead. Fares are published for today and the following 330 days.",
            "default": "+30"
          },
          "tripLengthDays": {
            "title": "Return after (nights)",
            "minimum": 1,
            "maximum": 60,
            "type": "integer",
            "description": "Leave empty to price a one-way trip. Set a number of nights to price a return trip instead: a departure on 15 September with 7 nights comes back on 22 September."
          },
          "cabinClass": {
            "title": "Cabin",
            "enum": [
              "economy",
              "premium_economy",
              "business",
              "first"
            ],
            "type": "string",
            "description": "Which cabin to price. The price history, the usual price and the verdict are all specific to the cabin you choose.",
            "default": "economy"
          },
          "currency": {
            "title": "Currency to ask for",
            "enum": [
              "USD",
              "EUR",
              "GBP",
              "CAD",
              "AUD",
              "NZD",
              "CHF",
              "SEK",
              "NOK",
              "DKK",
              "PLN",
              "CZK",
              "RON",
              "TRY",
              "ILS",
              "AED",
              "SAR",
              "QAR",
              "EGP",
              "ZAR",
              "INR",
              "JPY",
              "KRW",
              "CNY",
              "HKD",
              "SGD",
              "MYR",
              "THB",
              "PHP",
              "IDR",
              "VND",
              "BRL",
              "MXN",
              "MAD"
            ],
            "type": "string",
            "description": "The currency to price in. Every row is stamped with the currency that actually came back, which is not always the one asked for — so you always know what the numbers mean.",
            "default": "USD"
          },
          "market": {
            "title": "Market",
            "enum": [
              "US",
              "GB",
              "DE",
              "FR",
              "ES",
              "IT",
              "NL",
              "CA",
              "AU",
              "IN",
              "AE",
              "SG",
              "JP",
              "BR",
              "MX",
              "PL",
              "SE",
              "CH",
              "IE",
              "ZA"
            ],
            "type": "string",
            "description": "The country you are selling into. Fares and availability differ by market, so choose the one your travellers buy from and the fare figures come back the way they see them. The when-to-book figures are published for five markets only — United States, United Kingdom, Germany, France and Spain. Choose any other market and those figures describe United States travellers instead; every row names the market they came from in bookingTimingMarket.",
            "default": "US"
          },
          "includeBookingTiming": {
            "title": "Add when-to-book figures",
            "type": "boolean",
            "description": "Adds how far ahead this route is normally cheapest to book, week by week, plus the cheapest month, the cheapest day of the week and the average price by cabin. Published for the United States, United Kingdom, Germany, France and Spain; for any other market these figures describe United States travellers and the row says so. Charged only for the routes where these figures exist.",
            "default": true
          },
          "includeRouteMetadata": {
            "title": "Add who flies the route",
            "type": "boolean",
            "description": "Adds the airlines serving the route with their names, the airports flights connect through, and the route's price and journey-time range.",
            "default": true
          },
          "maxRoutes": {
            "title": "Maximum routes",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "A safety cap on how many routes one run will cover. Routes beyond it are listed in the run summary rather than quietly dropped.",
            "default": 50
          },
          "parallelRoutes": {
            "title": "Routes at a time",
            "minimum": 1,
            "maximum": 6,
            "type": "integer",
            "description": "How many routes to work on at once. Higher is faster; leave it at the default unless a run is timing out.",
            "default": 4
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}