{
  "openapi": "3.0.1",
  "info": {
    "title": "BTS Airline On-Time Performance Scraper",
    "description": "Scrape US DOT Bureau of Transportation Statistics On-Time Performance data. Get airline on-time rates, delay-cause breakdowns, cancellation and diversion rates by carrier, route, year, and month.",
    "version": "1.0",
    "x-build-id": "FXEUUbp6I9emsaYv0"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawlerbros~bts-airline-on-time-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawlerbros-bts-airline-on-time-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/crawlerbros~bts-airline-on-time-scraper/runs": {
      "post": {
        "operationId": "runs-sync-crawlerbros-bts-airline-on-time-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/crawlerbros~bts-airline-on-time-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-crawlerbros-bts-airline-on-time-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",
        "required": [
          "mode",
          "year",
          "month"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "carrierMonthSummary",
              "routeMonthSummary",
              "topRoutesByCarrier",
              "topCarriersByAirport"
            ],
            "type": "string",
            "description": "What to compute from the monthly BTS on-time performance file.",
            "default": "carrierMonthSummary"
          },
          "carrier": {
            "title": "Carrier (mode=carrierMonthSummary/routeMonthSummary/topRoutesByCarrier)",
            "enum": [
              "AA",
              "DL",
              "UA",
              "WN",
              "AS",
              "B6",
              "NK",
              "F9",
              "G4",
              "HA",
              "MQ",
              "OO",
              "OH",
              "YX",
              "9E",
              "YV",
              "9K",
              "ZW",
              "C5",
              "OQ",
              "US",
              "CO",
              "NW",
              "TW",
              "EA",
              "PA",
              "PI",
              "EV",
              "XE",
              "FL",
              "TZ",
              "DH",
              "J7",
              "HP"
            ],
            "type": "string",
            "description": "Reporting carrier code. Curated list of current + well-known historical US carriers. Use carrierCodeOverride for any other BTS carrier code (e.g. very old regional codes).",
            "default": "WN"
          },
          "carrierCodeOverride": {
            "title": "Carrier code override (free text)",
            "type": "string",
            "description": "Raw BTS Reporting_Airline code, used instead of carrier if set. For historical codes not in the curated dropdown."
          },
          "originAirport": {
            "title": "Origin airport (mode=routeMonthSummary/topCarriersByAirport)",
            "enum": [
              "ATL",
              "DFW",
              "DEN",
              "ORD",
              "CLT",
              "PHX",
              "LAX",
              "LAS",
              "MCO",
              "LGA",
              "SEA",
              "DCA",
              "MIA",
              "EWR",
              "BOS",
              "SFO",
              "DTW",
              "JFK",
              "SLC",
              "MSP",
              "IAH",
              "FLL",
              "BNA",
              "BWI",
              "SAN",
              "PHL",
              "TPA",
              "AUS",
              "DAL",
              "MDW",
              "HNL",
              "STL",
              "HOU",
              "RDU",
              "PDX",
              "SMF",
              "MSY",
              "IAD",
              "RSW",
              "SJC",
              "MCI",
              "SNA",
              "IND",
              "OAK",
              "SAT",
              "PIT",
              "CMH",
              "CVG",
              "CLE",
              "SJU",
              "PBI",
              "BUR",
              "JAX",
              "OGG",
              "MKE",
              "OMA",
              "ONT",
              "ABQ",
              "SDF",
              "CHS",
              "OKC",
              "BDL",
              "GEG",
              "ANC",
              "RIC",
              "TUS",
              "BUF",
              "BOI",
              "SAV",
              "GRR",
              "PVD",
              "MEM",
              "ORF",
              "TUL",
              "SYR",
              "ROC",
              "ELP",
              "ALB",
              "LIT",
              "XNA",
              "GSP",
              "PSP",
              "MYR",
              "DSM",
              "ICT",
              "COS",
              "BHM",
              "GRB",
              "MSN",
              "CAK",
              "PWM",
              "CHA",
              "TYS",
              "FAT",
              "FAR",
              "BZN",
              "JAC",
              "ASE",
              "EGE",
              "SGF",
              "GPT",
              "MOB",
              "TLH",
              "PNS",
              "VPS",
              "ECP",
              "DAY",
              "FWA",
              "AVL",
              "FSD",
              "GJT",
              "PIA",
              "MFR",
              "EUG",
              "BIL",
              "MHT",
              "LGB"
            ],
            "type": "string",
            "description": "Origin airport code. Curated list of ~115 major US airports. Use originAirportOverride for any other US airport code."
          },
          "originAirportOverride": {
            "title": "Origin airport override (free text)",
            "type": "string",
            "description": "Raw 3-letter BTS Origin airport code, used instead of originAirport if set."
          },
          "destAirport": {
            "title": "Destination airport (mode=routeMonthSummary)",
            "enum": [
              "ATL",
              "DFW",
              "DEN",
              "ORD",
              "CLT",
              "PHX",
              "LAX",
              "LAS",
              "MCO",
              "LGA",
              "SEA",
              "DCA",
              "MIA",
              "EWR",
              "BOS",
              "SFO",
              "DTW",
              "JFK",
              "SLC",
              "MSP",
              "IAH",
              "FLL",
              "BNA",
              "BWI",
              "SAN",
              "PHL",
              "TPA",
              "AUS",
              "DAL",
              "MDW",
              "HNL",
              "STL",
              "HOU",
              "RDU",
              "PDX",
              "SMF",
              "MSY",
              "IAD",
              "RSW",
              "SJC",
              "MCI",
              "SNA",
              "IND",
              "OAK",
              "SAT",
              "PIT",
              "CMH",
              "CVG",
              "CLE",
              "SJU",
              "PBI",
              "BUR",
              "JAX",
              "OGG",
              "MKE",
              "OMA",
              "ONT",
              "ABQ",
              "SDF",
              "CHS",
              "OKC",
              "BDL",
              "GEG",
              "ANC",
              "RIC",
              "TUS",
              "BUF",
              "BOI",
              "SAV",
              "GRR",
              "PVD",
              "MEM",
              "ORF",
              "TUL",
              "SYR",
              "ROC",
              "ELP",
              "ALB",
              "LIT",
              "XNA",
              "GSP",
              "PSP",
              "MYR",
              "DSM",
              "ICT",
              "COS",
              "BHM",
              "GRB",
              "MSN",
              "CAK",
              "PWM",
              "CHA",
              "TYS",
              "FAT",
              "FAR",
              "BZN",
              "JAC",
              "ASE",
              "EGE",
              "SGF",
              "GPT",
              "MOB",
              "TLH",
              "PNS",
              "VPS",
              "ECP",
              "DAY",
              "FWA",
              "AVL",
              "FSD",
              "GJT",
              "PIA",
              "MFR",
              "EUG",
              "BIL",
              "MHT",
              "LGB"
            ],
            "type": "string",
            "description": "Destination airport code. Curated list of ~115 major US airports. Use destAirportOverride for any other US airport code."
          },
          "destAirportOverride": {
            "title": "Destination airport override (free text)",
            "type": "string",
            "description": "Raw 3-letter BTS Dest airport code, used instead of destAirport if set."
          },
          "year": {
            "title": "Year",
            "enum": [
              "2000",
              "2001",
              "2002",
              "2003",
              "2004",
              "2005",
              "2006",
              "2007",
              "2008",
              "2009",
              "2010",
              "2011",
              "2012",
              "2013",
              "2014",
              "2015",
              "2016",
              "2017",
              "2018",
              "2019",
              "2020",
              "2021",
              "2022",
              "2023",
              "2024",
              "2025",
              "2026"
            ],
            "type": "string",
            "description": "Reporting year. This actor's data source (BTS PREZIP monthly archive) serves 2000-present (typically ~2 months behind the current date).",
            "default": "2025"
          },
          "month": {
            "title": "Month",
            "enum": [
              "1",
              "2",
              "3",
              "4",
              "5",
              "6",
              "7",
              "8",
              "9",
              "10",
              "11",
              "12"
            ],
            "type": "string",
            "description": "Reporting month.",
            "default": "12"
          },
          "maxItems": {
            "title": "Max items (mode=topRoutesByCarrier/topCarriersByAirport)",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Cap on ranked records returned. Ignored by the single-record summary modes.",
            "default": 20
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}