{
  "openapi": "3.0.1",
  "info": {
    "title": "Flight Deals & Mistake Fare Scraper",
    "description": "Collect flight deals, flash sales and error fares from four deal publishers into one newest-first table: airline, route, price, trip type and how old the deal is — plus both airport codes, fare class, routing, stopover rules and mileage where the deal spells them out.",
    "version": "0.0",
    "x-build-id": "jXgzqfGDmQj5reen5"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/apt_marble~flight-deals-mistake-fare-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-apt_marble-flight-deals-mistake-fare-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/apt_marble~flight-deals-mistake-fare-scraper/runs": {
      "post": {
        "operationId": "runs-sync-apt_marble-flight-deals-mistake-fare-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/apt_marble~flight-deals-mistake-fare-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-apt_marble-flight-deals-mistake-fare-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": {
          "sources": {
            "title": "Deal sources",
            "type": "array",
            "description": "Which deal publishers to collect from. Leave all four on for the widest coverage. Where two of them post the same fare and describe the route in the same words at the same price, the repeat is merged into one row that records where else it appeared; publishers who word the same deal differently are delivered as separate rows.",
            "items": {
              "type": "string",
              "enum": [
                "theflightdeal",
                "fly4free",
                "travelfree",
                "cheapoair"
              ],
              "enumTitles": [
                "The Flight Deal — deep archive, fare class, routing and mileage detail",
                "Fly4free — latest European deals",
                "Travelfree — latest European deals",
                "CheapOair — on-sale fares with the seller's own deal rating"
              ]
            },
            "default": [
              "theflightdeal",
              "fly4free",
              "travelfree",
              "cheapoair"
            ]
          },
          "originCities": {
            "title": "Departure places",
            "type": "array",
            "description": "Only keep deals leaving from these places. Use airport codes (JFK, LHR), city-wide codes (NYC, LON) or plain names (\"San Francisco\"). Leave empty to collect deals from everywhere. On-sale fares are published per city, so an airport code is read at city level and the run log says so.",
            "items": {
              "type": "string"
            }
          },
          "keyword": {
            "title": "Keyword",
            "type": "string",
            "description": "Only keep deals whose own text mentions this word — the headline, the opening lines, either end of the route, the airline or the cabin. A publisher's unrelated tags are not matched, so a Rome to Hanoi fare tagged \"budapest\" is not returned as a Budapest deal. Leave empty to keep everything."
          },
          "tripType": {
            "title": "Trip type",
            "enum": [
              "any",
              "oneway",
              "roundtrip"
            ],
            "type": "string",
            "description": "Keep only one-way deals, only return deals, or both. Deals whose trip type the publisher never stated are left out when you pick one.",
            "default": "any"
          },
          "currency": {
            "title": "Currency for on-sale fares",
            "enum": [
              "USD",
              "GBP"
            ],
            "type": "string",
            "description": "Which currency the on-sale fares are asked for. Deal write-ups are published in whatever currency their author used, so every row also carries the currency it was actually published in — that value is never overwritten with the one you picked here.",
            "default": "USD"
          },
          "since": {
            "title": "Published after",
            "type": "string",
            "description": "Only keep deals published after this date, as YYYY-MM-DD. Ideal for a scheduled run that should pick up only what is new since the last one."
          },
          "maxAgeDays": {
            "title": "Maximum deal age (days)",
            "minimum": 0,
            "maximum": 3650,
            "type": "integer",
            "description": "Drop anything published more than this many days ago. Leave empty to keep deals of any age. These fares move fast, so 2–7 days is the useful window for alerting."
          },
          "includeBackfill": {
            "title": "Include the historical archive",
            "type": "boolean",
            "description": "Go beyond the latest deals and work back through the archive, which reaches to 2011. Use this to build a history for research; leave it off for day-to-day alerting.",
            "default": false
          },
          "maxDeals": {
            "title": "Maximum deals to return",
            "minimum": 1,
            "maximum": 25000,
            "type": "integer",
            "description": "The most rows this run will produce, across every source, after filtering and merging. Newest deals come first.",
            "default": 200
          },
          "includeDealDetails": {
            "title": "Include the extended deal detail",
            "type": "boolean",
            "description": "Read each deal write-up as well as its headline. The write-up is where the fare class, full routing, stopover rules, mileage earning, cents-per-mile AND both airport codes are stated, plus the flight numbers and price bands on on-sale fares. Turn it off for a faster, headline-only run — those rows then arrive with the airport codes, routing, mileage and publisher tags empty, and each one says so in its data notes.",
            "default": true
          },
          "onlyFlightDeals": {
            "title": "Flight deals only",
            "type": "boolean",
            "description": "Leave out hotel and holiday-package posts, which some publishers mix into the same deal stream.",
            "default": true
          },
          "requirePrice": {
            "title": "Only deals with a price",
            "type": "boolean",
            "description": "Leave out posts where no fare was published, such as roundups and announcements. Prices are never inferred, so a post without one is returned empty rather than filled in.",
            "default": true
          },
          "excludeLikelyExpired": {
            "title": "Hide deals that are probably gone",
            "type": "boolean",
            "description": "Leave out deals old enough to have expired. Off by default, so you see everything and can judge from the age on each row.",
            "default": false
          },
          "likelyExpiredAfterDays": {
            "title": "Treat a deal as gone after (days)",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "How old a deal has to be before it is marked as probably gone. Deal publishers themselves warn that a fare more than two days old has usually died, which is the default here.",
            "default": 2
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}