{
  "openapi": "3.0.1",
  "info": {
    "title": "Emirates Skywards Miles Scraper",
    "description": "Skywards miles calculator at scale: pull Emirates & flydubai earn miles (Skywards + Tier) for every route, cabin & tier in one run. Price a whole network in minutes.",
    "version": "0.1",
    "x-build-id": "OXnG40q6DReGkDF7L"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/leafy-dev-jr~emirates-skywards-miles-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-leafy-dev-jr-emirates-skywards-miles-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/leafy-dev-jr~emirates-skywards-miles-scraper/runs": {
      "post": {
        "operationId": "runs-sync-leafy-dev-jr-emirates-skywards-miles-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/leafy-dev-jr~emirates-skywards-miles-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-leafy-dev-jr-emirates-skywards-miles-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": [
          "milesType",
          "airlines",
          "routeInputMethod",
          "cabinClasses",
          "tiers"
        ],
        "properties": {
          "milesType": {
            "title": "Miles type",
            "enum": [
              "earn",
              "spend",
              "upgrade"
            ],
            "type": "string",
            "description": "Only \"Earn\" is available today. \"Spend\" and \"Upgrade\" are coming soon — selecting them stops the run with a note.",
            "default": "earn"
          },
          "airlines": {
            "title": "Airlines",
            "type": "array",
            "description": "Which carriers to price. Both share the Emirates Skywards program and the same miles currency. flydubai only has Economy and Business cabins — other cabins are skipped for it automatically.",
            "items": {
              "type": "string",
              "enum": [
                "Emirates",
                "flydubai"
              ],
              "enumTitles": [
                "Emirates (EK)",
                "flydubai (FZ)"
              ]
            },
            "default": [
              "Emirates",
              "flydubai"
            ]
          },
          "routeInputMethod": {
            "title": "Route option",
            "enum": [
              "cross",
              "network",
              "pairs"
            ],
            "type": "string",
            "description": "Option 1 — Cross: every origin paired with every destination. Option 2 — Origin → all destinations: every airport the airline serves, from your origin(s). Option 3 — Route pairs: exact FROM-TO routes.",
            "default": "cross"
          },
          "crossOrigins": {
            "title": "Option 1 · Cross — Origins (IATA codes)",
            "type": "array",
            "description": "Departure airport codes (3 letters, e.g. DXB, LHR) — type any code, one per entry. Paired with every destination below. (Used only for Option 1 — Cross.)",
            "items": {
              "type": "string"
            }
          },
          "crossDestinations": {
            "title": "Option 1 · Cross — Destinations (IATA codes)",
            "type": "array",
            "description": "Arrival airport codes — type any code, one per entry. Same-airport pairs are skipped. (Used only for Option 1 — Cross.)",
            "items": {
              "type": "string"
            }
          },
          "networkOrigins": {
            "title": "Option 2 · Origin(s) → all destinations",
            "type": "array",
            "description": "Pick one or more departure airports. Each one is priced against every destination the airline serves. Tip: more than one origin makes a much bigger run (each origin adds a whole network). (Used only for Option 2.)",
            "items": {
              "type": "string",
              "enum": [
                "ABJ",
                "ABV",
                "ACC",
                "ADD",
                "ADL",
                "AER",
                "AHB",
                "AJF",
                "AKL",
                "ALA",
                "ALG",
                "AMD",
                "AMM",
                "AMS",
                "AQI",
                "AQJ",
                "ARN",
                "ASB",
                "ASM",
                "ATH",
                "AWZ",
                "BAH",
                "BCN",
                "BEG",
                "BEY",
                "BGW",
                "BGY",
                "BHX",
                "BKK",
                "BLQ",
                "BLR",
                "BND",
                "BNE",
                "BOG",
                "BOM",
                "BOS",
                "BRU",
                "BSL",
                "BSR",
                "BTS",
                "BUD",
                "BUS",
                "CAG",
                "CAI",
                "CAN",
                "CCJ",
                "CCU",
                "CDG",
                "CEB",
                "CFU",
                "CGK",
                "CGP",
                "CHC",
                "CKY",
                "CMB",
                "CMN",
                "COK",
                "CPH",
                "CPT",
                "CRK",
                "CTA",
                "DAC",
                "DAR",
                "DBV",
                "DEL",
                "DFW",
                "DME",
                "DMM",
                "DPS",
                "DSS",
                "DUB",
                "DUR",
                "DUS",
                "DXB",
                "DYU",
                "EAM",
                "EBB",
                "EBL",
                "EDI",
                "ELQ",
                "ESB",
                "EVN",
                "EWR",
                "EZE",
                "FCO",
                "FEG",
                "FRA",
                "FRU",
                "GAN",
                "GBB",
                "GIG",
                "GIZ",
                "GLA",
                "GRU",
                "GVA",
                "GYD",
                "HAM",
                "HAN",
                "HAS",
                "HBE",
                "HEL",
                "HGA",
                "HKG",
                "HKT",
                "HND",
                "HOF",
                "HRE",
                "HRI",
                "HYD",
                "IAD",
                "IAH",
                "ICN",
                "IEV",
                "IFN",
                "IKA",
                "ISB",
                "IST",
                "ISU",
                "JED",
                "JFK",
                "JIB",
                "JMK",
                "JNB",
                "JRO",
                "JTR",
                "JUB",
                "KBV",
                "KHI",
                "KIH",
                "KIX",
                "KRK",
                "KRR",
                "KRT",
                "KTM",
                "KUF",
                "KUL",
                "KUT",
                "KWI",
                "KZN",
                "LAD",
                "LAX",
                "LCA",
                "LED",
                "LGW",
                "LHE",
                "LHR",
                "LIS",
                "LJU",
                "LKO",
                "LOS",
                "LRR",
                "LUN",
                "LYP",
                "LYS",
                "MAA",
                "MAD",
                "MAN",
                "MBA",
                "MCO",
                "MCT",
                "MCX",
                "MED",
                "MEL",
                "MEX",
                "MGQ",
                "MHD",
                "MIA",
                "MLA",
                "MLE",
                "MNL",
                "MRU",
                "MRV",
                "MUC",
                "MUX",
                "MXP",
                "NBO",
                "NCE",
                "NCL",
                "NJF",
                "NMA",
                "NQZ",
                "NRT",
                "NUM",
                "ODS",
                "OLB",
                "OPO",
                "ORD",
                "OSL",
                "OSS",
                "OTP",
                "OVB",
                "PEE",
                "PEK",
                "PER",
                "PEW",
                "PNH",
                "PRG",
                "PSA",
                "PVG",
                "PZU",
                "RGN",
                "RIX",
                "ROV",
                "RUH",
                "SAW",
                "SEA",
                "SEZ",
                "SFO",
                "SGN",
                "SIN",
                "SJJ",
                "SKD",
                "SKG",
                "SKP",
                "SKT",
                "SLL",
                "SOF",
                "SSH",
                "STN",
                "SVO",
                "SVX",
                "SYD",
                "SYZ",
                "SZG",
                "TBS",
                "TGD",
                "TIF",
                "TIV",
                "TLL",
                "TLV",
                "TPE",
                "TRV",
                "TUN",
                "TUU",
                "UET",
                "UFA",
                "ULH",
                "VCE",
                "VIE",
                "VKO",
                "VNO",
                "VOG",
                "VOZ",
                "WAW",
                "YNB",
                "YUL",
                "YYZ",
                "ZAG",
                "ZNZ",
                "ZRH",
                "ZVH",
                "ZVJ",
                "ZYL"
              ]
            }
          },
          "routePairs": {
            "title": "Option 3 · Route pairs",
            "type": "array",
            "description": "Exact routes as \"FROM-TO\" (e.g. \"DXB-LHR\"), one per entry. (Used only for Option 3.)",
            "items": {
              "type": "string"
            }
          },
          "cabinClasses": {
            "title": "Cabin classes",
            "type": "array",
            "description": "Which cabins to price. Emirates First only returns FlexPlus and Flex fares. flydubai only supports Economy and Business — Premium Economy and First are skipped for flydubai.",
            "items": {
              "type": "string",
              "enum": [
                "Economy",
                "Premium Economy",
                "Business",
                "First"
              ],
              "enumTitles": [
                "Economy",
                "Premium Economy",
                "Business",
                "First"
              ]
            },
            "default": [
              "Economy",
              "Premium Economy",
              "Business",
              "First"
            ]
          },
          "tiers": {
            "title": "Skywards tiers",
            "type": "array",
            "description": "Which Skywards membership tiers to price. Earn miles differ by tier.",
            "items": {
              "type": "string",
              "enum": [
                "Blue",
                "Silver",
                "Gold",
                "Platinum"
              ],
              "enumTitles": [
                "Blue",
                "Silver",
                "Gold",
                "Platinum"
              ]
            },
            "default": [
              "Blue",
              "Silver",
              "Gold",
              "Platinum"
            ]
          },
          "journeyType": {
            "title": "Journey type",
            "enum": [
              "One Way",
              "Round Trip"
            ],
            "type": "string",
            "description": "One Way prices a single leg; Round Trip prices the return journey (~2× the miles).",
            "default": "One Way"
          },
          "notes": {
            "title": "Notes (optional)",
            "type": "string",
            "description": "Any text here is copied into a \"Notes\" column on every output row — handy for tagging or labeling a batch/run."
          },
          "maxConcurrency": {
            "title": "Max concurrent requests",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How many API calls to run in parallel. 10–20 is safe. Raise for very large jobs.",
            "default": 10
          },
          "maxRequestRetries": {
            "title": "Max retries per request",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Retries for a failed request before it is logged as failed.",
            "default": 3
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}