{
  "openapi": "3.1.0",
  "info": {
    "title": "Ktemia API",
    "version": "1.0.0",
    "description": "A travel API for search and compare. Describe a trip and get the providers who can sell it, with prices. Booking stays with the provider.\n\nKtemia is a travel search API for flights, hotels, and car rentals. You describe a trip for a person. The response is the providers who can sell it: airlines, booking sites, rental companies, and other sellers, with prices you can compare.\n\nThe API does not issue a ticket, take payment, or hold a reservation. When you open an offer, the response includes that provider's URL. The person books on the provider's site.\n\n**Flow:** every vertical works the same way. A search returns a `searchToken`, results page through the offers, and details expand one offer into every seller's price and booking URL.\n\n**Authentication:** send your key as the `X-API-Key` header, from a server. Get a key at [app.ktemia.com](https://app.ktemia.com). The [Free plan](https://www.ktemia.com/pricing/) includes 100 requests a month.\n\n**Rate limits:** every successful response carries `X-RateLimit-Limit` and `X-RateLimit-Remaining` (per-key burst window) and `X-Quota-Limit` and `X-Quota-Used` (monthly quota, shared across every key on the account). Over a limit, the API answers `429` (`RATE_LIMIT_EXCEEDED` or `QUOTA_EXCEEDED`) with `Retry-After` in seconds. Free: 100 requests a month. Pro: 20,000 a month at 20 requests per second. Business: 250,000 a month at 250 requests per second.\n\n**Errors:** one envelope for every error, `{\"success\": false, \"error\": {\"code\", \"message\", \"param\"}, \"data\": null}`. `400` malformed request, `401` key, `404` no results, `410` expired search, `429` limits, `502` temporary upstream failure (retry).\n\n**Key status:** `GET /key` returns the plan, rate limits and remaining monthly quota for your key. It is the one endpoint that is not metered (still rate limited).\n\n**Retries:** every operation is safe to retry; nothing is booked. Retry `429` after `Retry-After` and `502` with back-off. Do not retry `400` unchanged.\n\n**MCP:** the same endpoints are available as MCP tools for Cursor, Claude Code, Claude Desktop, and Codex. Add `npx -y @ktemia/mcp` (Node, npm) or `uvx ktemia-mcp` (Python, PyPI) to the client config with `KTEMIA_API_KEY` in its environment; tool calls are metered as ordinary API requests. Setup: https://www.ktemia.com/docs/mcp/\n\n**Versioning:** there is no version prefix on the URL. Changes that affect requests or responses are dated in the [API changelog](https://www.ktemia.com/docs/changelog/). This spec is published at https://www.ktemia.com/openapi.json.\n\n- [API documentation](https://www.ktemia.com/docs/api/)\n- [Getting started](https://www.ktemia.com/docs/getting-started/)\n- [MCP server](https://www.ktemia.com/docs/mcp/)\n- [Providers and their ids](https://www.ktemia.com/providers/)\n- [Best travel API in 2026: which travel APIs you can get a key for](https://www.ktemia.com/blog/best-travel-api/)\n- [Ktemia](https://www.ktemia.com/)",
    "contact": {
      "name": "Ktemia",
      "url": "https://www.ktemia.com",
      "email": "contact@ktemia.com"
    },
    "termsOfService": "https://www.ktemia.com/terms/",
    "x-changelog": "https://www.ktemia.com/docs/changelog/"
  },
  "externalDocs": {
    "description": "Ktemia API documentation",
    "url": "https://www.ktemia.com/docs/api/"
  },
  "servers": [
    {
      "url": "https://api.ktemia.com",
      "description": "Production"
    }
  ],
  "security": [
    {
      "ApiKeyAuth": []
    }
  ],
  "tags": [
    {
      "name": "Flights",
      "description": "Search airports and airlines, run a flight search, then read results and each seller's fare.\n\nFurther reading: [Flight search API: compare fares for a route](https://www.ktemia.com/blog/flight-search-api/) \u00b7 [Google Flights API: there isn't an official one](https://www.ktemia.com/blog/google-flights-api/) \u00b7 [Amadeus API vs Skyscanner API](https://www.ktemia.com/blog/amadeus-api-vs-skyscanner-api/) \u00b7 [Kiwi Tequila API documentation](https://www.ktemia.com/blog/kiwi-tequila-api/) \u00b7 [Flight price comparison data: 1,703 flights across 57 booking sites](https://www.ktemia.com/blog/flight-price-spread/)",
      "externalDocs": {
        "description": "Flights reference",
        "url": "https://www.ktemia.com/docs/api/flights/search/"
      }
    },
    {
      "name": "Hotels",
      "description": "Find a location, search hotels, then read results, every booking site's price and guest reviews.\n\nFurther reading: [Hotel price API: every booking site in one call](https://www.ktemia.com/blog/hotel-price-api/) \u00b7 [Booking.com API: search is not the reservation](https://www.ktemia.com/blog/booking-com-api/) \u00b7 [Expedia API alternative](https://www.ktemia.com/blog/expedia-api-alternative/)",
      "externalDocs": {
        "description": "Hotels reference",
        "url": "https://www.ktemia.com/docs/api/hotels/search/"
      }
    },
    {
      "name": "Cars",
      "description": "Find a pickup location, search rental cars, then read results and each seller's price.\n\nFurther reading: [Car rental API: compare vehicles and prices](https://www.ktemia.com/blog/car-rental-api/) \u00b7 [Car rental aggregator API](https://www.ktemia.com/blog/car-rental-aggregator-api/)",
      "externalDocs": {
        "description": "Cars reference",
        "url": "https://www.ktemia.com/docs/api/cars/search/"
      }
    },
    {
      "name": "Account",
      "description": "Read the plan, rate limits and remaining monthly quota for your key. Not metered.\n\nPlans and limits: [pricing](https://www.ktemia.com/pricing/)",
      "externalDocs": {
        "description": "Key status reference",
        "url": "https://www.ktemia.com/docs/api/key/"
      }
    }
  ],
  "paths": {
    "/flights/airports": {
      "get": {
        "tags": [
          "Flights"
        ],
        "summary": "Search airports and cities by name",
        "description": "Look up an airport or city code by name. Use the code as origin or destination on a flight search.\n\nFind the airport and city codes a flight search accepts.\n\nOrigins and destinations on a flight search are airport or city codes, not names. This call turns a name or a code into the `code` you send as `origin` or `destination`.\n\nSend `X-API-Key` the same way as on every other call. `query` is required. `country` and `locale` are optional and default to US and `en`.\n\n### Which code to send\n\nUse `airports[].code`. When `allAirports` is true, the code covers every airport in that city: `LON` is London, `NYC` is New York. A false value is one airport, such as `LHR` or `JFK`.\n\nA query that matches nothing returns `200` with an empty `airports` list. A missing `query`, a blank `query`, a bad `locale`, or an unsupported `country` returns `400`. If the lookup itself fails, the response is `502 AIRPORTS_UNAVAILABLE`.\n\nAirline codes for the `airlines` filter come from [Search airlines](https://www.ktemia.com/docs/api/flights/airlines/). Send `code` from that response. A name is rejected on the search.\n\n### Read more\n\nWhy an agent should ask when a name matches several cities: [flights MCP](https://www.ktemia.com/blog/flights-mcp/). The lookup as the first step of a full search: [flight search API](https://www.ktemia.com/blog/flight-search-api/).\n\n### Response fields\n\n- `query` (string, required): The query you sent, with surrounding spaces removed.\n- `airports` (array of objects, required): Matching airports, best match first. Empty when nothing matches.\n  - `code` (string, required): IATA airport or city code. Send this as `origin` or `destination` on [Search flights](https://www.ktemia.com/docs/api/flights/search/).\n  - `name` (string, optional): Airport name. For a city code this is `All airports`.\n  - `city` (string, optional): City the airport serves.\n  - `region` (string, optional): State, province, or region. Null when the place has none.\n  - `country` (string, optional): Country name.\n  - `countryCode` (string, optional): ISO 3166-1 alpha-2 country code.\n  - `timezone` (string, optional): IANA timezone, for example `America/Chicago`.\n  - `allAirports` (boolean, optional): True when `code` is a city code that covers every airport in that city, such as `NYC` or `LON`.\n\nFull reference, parameters and examples: [Flights airports reference on ktemia.com](https://www.ktemia.com/docs/api/flights/airports/)",
        "operationId": "searchAirports",
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 80,
              "description": "Airport or city name, or a code.",
              "title": "Query"
            },
            "description": "Airport name, city name, or code. 1 to 80 characters. A blank value is rejected.",
            "example": "london"
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Market country. Omit for US.",
              "title": "Country"
            },
            "description": "ISO 3166-1 alpha-2 market. Omit it for US. Any other value is rejected. Same set as on a flight search."
          },
          {
            "name": "locale",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 2,
              "maxLength": 2,
              "description": "Language, for example en.",
              "default": "en",
              "title": "Locale"
            },
            "description": "2-letter language code. Omit it for `en`. Anything that is not two letters is rejected."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {},
                "examples": {
                  "london": {
                    "summary": "London",
                    "value": {
                      "query": "london",
                      "airports": [
                        {
                          "code": "LON",
                          "name": "All airports",
                          "city": "London",
                          "region": "England",
                          "country": "United Kingdom",
                          "countryCode": "GB",
                          "timezone": "Europe/London",
                          "allAirports": true
                        },
                        {
                          "code": "LHR",
                          "name": "Heathrow",
                          "city": "London",
                          "region": "England",
                          "country": "United Kingdom",
                          "countryCode": "GB",
                          "timezone": "Europe/London",
                          "allAirports": false
                        },
                        {
                          "code": "LGW",
                          "name": "Gatwick",
                          "city": "London",
                          "region": "England",
                          "country": "United Kingdom",
                          "countryCode": "GB",
                          "timezone": "Europe/London",
                          "allAirports": false
                        }
                      ]
                    }
                  },
                  "austin": {
                    "summary": "Austin",
                    "value": {
                      "query": "austin",
                      "airports": [
                        {
                          "code": "AUS",
                          "name": "Austin Bergstrom",
                          "city": "Austin",
                          "region": "Texas",
                          "country": "United States",
                          "countryCode": "US",
                          "timezone": "America/Chicago",
                          "allAirports": false
                        },
                        {
                          "code": "ASQ",
                          "name": "Austin",
                          "city": "Austin",
                          "region": "Nevada",
                          "country": "United States",
                          "countryCode": "US",
                          "timezone": "America/Los_Angeles",
                          "allAirports": false
                        },
                        {
                          "code": "GRB",
                          "name": "Austin-Straubel",
                          "city": "Green Bay",
                          "region": "Wisconsin",
                          "country": "United States",
                          "countryCode": "US",
                          "timezone": "America/Chicago",
                          "allAirports": false
                        }
                      ]
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Quota-Limit": {
                "$ref": "#/components/headers/X-Quota-Limit"
              },
              "X-Quota-Used": {
                "$ref": "#/components/headers/X-Quota-Used"
              }
            }
          },
          "401": {
            "description": "The API key is missing or not valid. Send a valid key as the `X-API-Key` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "missing_api_key": {
                    "summary": "MISSING_API_KEY",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "MISSING_API_KEY",
                        "message": "API key is required. Pass X-API-Key header."
                      },
                      "data": null
                    }
                  },
                  "invalid_api_key": {
                    "summary": "INVALID_API_KEY",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "INVALID_API_KEY",
                        "message": "Invalid API key."
                      },
                      "data": null
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit (`RATE_LIMIT_EXCEEDED`) or monthly quota (`QUOTA_EXCEEDED`) reached, or a temporary block after repeated failed authentication. Wait for `Retry-After` seconds before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "rate_limit_exceeded": {
                    "summary": "RATE_LIMIT_EXCEEDED",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "RATE_LIMIT_EXCEEDED",
                        "message": "Too many requests. Retry after 2s."
                      },
                      "data": null
                    }
                  },
                  "quota_exceeded": {
                    "summary": "QUOTA_EXCEEDED",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "QUOTA_EXCEEDED",
                        "message": "Monthly quota of 100 requests exhausted for the free plan. The quota is shared across every key on the account. Upgrade or wait for the next cycle."
                      },
                      "data": null
                    }
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              }
            }
          },
          "502": {
            "description": "A temporary upstream failure. Retry the same request after a short back-off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "airports_unavailable": {
                    "summary": "AIRPORTS_UNAVAILABLE",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "AIRPORTS_UNAVAILABLE",
                        "message": "Airport search is temporarily unavailable."
                      },
                      "data": null
                    }
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Full reference on ktemia.com",
          "url": "https://www.ktemia.com/docs/api/flights/airports/"
        }
      }
    },
    "/flights/airlines": {
      "get": {
        "tags": [
          "Flights"
        ],
        "summary": "Search airlines by name",
        "description": "Look up an airline code by name. Use the code on airlines when you search flights.\n\nFind the airline codes a flight search accepts on airlines.\n\nThe `airlines` field on a flight search takes 2-character codes, not names. This call turns \u201cDelta\u201d or `DL` into the `code` you send.\n\nSend `X-API-Key` the same way as on every other call. `query` is required. `country` and `locale` are optional and default to US and `en`.\n\n### Which code to send\n\nUse `airlines[].code` on [Search flights](https://www.ktemia.com/docs/api/flights/search/), inside `airlines`. `DL` is Delta. `LH` is Lufthansa. Codes longer than two characters are left out, because the search rejects them.\n\nA query that matches nothing returns `200` with an empty `airlines` list. A missing `query`, a blank `query`, a bad `locale`, or an unsupported `country` returns `400`. If the lookup itself fails, the response is `502 AIRLINES_UNAVAILABLE`.\n\n### Response fields\n\n- `query` (string, required): The query you sent, with surrounding spaces removed.\n- `airlines` (array of objects, required): Matching airlines, best match first. Empty when nothing matches. Only codes a flight search accepts are included.\n  - `code` (string, required): 2-character IATA airline code. Send this in `airlines` on a flight search.\n  - `name` (string, required): Airline name.\n  - `logo` (string, optional): Logo image URL, when one is available.\n\nFull reference, parameters and examples: [Flights airlines reference on ktemia.com](https://www.ktemia.com/docs/api/flights/airlines/)",
        "operationId": "searchAirlines",
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 80,
              "description": "Airline name or a 2-character code.",
              "title": "Query"
            },
            "description": "Airline name or code. 1 to 80 characters. A blank value is rejected.",
            "example": "delta"
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Market country. Omit for US.",
              "title": "Country"
            },
            "description": "ISO 3166-1 alpha-2 market. Omit it for US. Any other value is rejected. Same set as on a flight search."
          },
          {
            "name": "locale",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 2,
              "maxLength": 2,
              "description": "Language, for example en.",
              "default": "en",
              "title": "Locale"
            },
            "description": "2-letter language code. Omit it for `en`. Anything that is not two letters is rejected."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {},
                "examples": {
                  "delta": {
                    "summary": "Delta",
                    "value": {
                      "query": "delta",
                      "airlines": [
                        {
                          "code": "DL",
                          "name": "Delta",
                          "logo": "https://content.r9cdn.net/rimg/provider-logos/airlines/h/DL.png?\u2026"
                        }
                      ]
                    }
                  },
                  "lufthansa": {
                    "summary": "Lufthansa",
                    "value": {
                      "query": "lufthansa",
                      "airlines": [
                        {
                          "code": "LH",
                          "name": "Lufthansa",
                          "logo": "https://content.r9cdn.net/rimg/provider-logos/airlines/h/LH.png?\u2026"
                        },
                        {
                          "code": "CL",
                          "name": "Lufthansa CityLine",
                          "logo": "https://content.r9cdn.net/rimg/provider-logos/airlines/h/CL.png?\u2026"
                        }
                      ]
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Quota-Limit": {
                "$ref": "#/components/headers/X-Quota-Limit"
              },
              "X-Quota-Used": {
                "$ref": "#/components/headers/X-Quota-Used"
              }
            }
          },
          "401": {
            "description": "The API key is missing or not valid. Send a valid key as the `X-API-Key` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "missing_api_key": {
                    "summary": "MISSING_API_KEY",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "MISSING_API_KEY",
                        "message": "API key is required. Pass X-API-Key header."
                      },
                      "data": null
                    }
                  },
                  "invalid_api_key": {
                    "summary": "INVALID_API_KEY",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "INVALID_API_KEY",
                        "message": "Invalid API key."
                      },
                      "data": null
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit (`RATE_LIMIT_EXCEEDED`) or monthly quota (`QUOTA_EXCEEDED`) reached, or a temporary block after repeated failed authentication. Wait for `Retry-After` seconds before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "rate_limit_exceeded": {
                    "summary": "RATE_LIMIT_EXCEEDED",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "RATE_LIMIT_EXCEEDED",
                        "message": "Too many requests. Retry after 2s."
                      },
                      "data": null
                    }
                  },
                  "quota_exceeded": {
                    "summary": "QUOTA_EXCEEDED",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "QUOTA_EXCEEDED",
                        "message": "Monthly quota of 100 requests exhausted for the free plan. The quota is shared across every key on the account. Upgrade or wait for the next cycle."
                      },
                      "data": null
                    }
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              }
            }
          },
          "502": {
            "description": "A temporary upstream failure. Retry the same request after a short back-off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "airlines_unavailable": {
                    "summary": "AIRLINES_UNAVAILABLE",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "AIRLINES_UNAVAILABLE",
                        "message": "Airline search is temporarily unavailable."
                      },
                      "data": null
                    }
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Full reference on ktemia.com",
          "url": "https://www.ktemia.com/docs/api/flights/airlines/"
        }
      }
    },
    "/flights/search": {
      "post": {
        "tags": [
          "Flights"
        ],
        "summary": "Start a flight search",
        "description": "Start a flight search: one-way, round trip, or multi-city. Returns a token, not results.\n\nStart a search. Returns a token, not results.\n\nThis call returns a `searchToken`. It does not return flights. A domestic one-way usually answers in 2\u20135 seconds; a long-haul can take longer.\n\n### Country and currency\n\nSend `country` to pick the market. Prices come back in that country\u2019s native currency. `GB` returns GBP, `DE` returns EUR, `US` returns USD. Omit `country` and the market is the US, so prices are USD.\n\nThere is no `currency` field on this call. Sending one is rejected. You cannot ask for US prices in GBP, or UK prices in USD - the country decides the currency.\n\n### One-way, round trip, multi-city\n\nSend `origin`, `destination`, and `departureDate` for a one-way. Add `returnDate` for a round trip. Send `legs` instead for multi-city. Mixing the two forms answers `400 TRIP_CONFLICT`. A `legs` array of length 1 answers `400 TOO_FEW_LEGS` - use the flat form.\n\nOrigin and destination are codes, not names. Look them up with [Search airports](https://www.ktemia.com/docs/api/flights/airports/) and send `code`. A code with `allAirports` true (`NYC`, `LON`) covers every airport in that city. Origin and destination on a single leg must differ.\n\n### When there is nothing to page\n\nIf there are no flights, the call returns `404 NO_RESULTS` and no token. Schedules are usually published under a year ahead, so a date further out is the usual cause.\n\n### Flights from one airline\n\nSend `airlines` with 2-letter IATA codes, for example `[\"UA\"]` for United. Every itinerary in the results then uses only those airlines. Find a code with [Search airlines](https://www.ktemia.com/docs/api/flights/airlines/), or pick an airline on [Providers](https://www.ktemia.com/providers/#airlines) to open this page with the filter already in the examples.\n\n### Read more\n\nWhat a flight search API does, and what it does not: [flight search API](https://www.ktemia.com/blog/flight-search-api/). Moving from another provider: [Kiwi Tequila API](https://www.ktemia.com/blog/kiwi-tequila-api/), [Amadeus API vs Skyscanner API](https://www.ktemia.com/blog/amadeus-api-vs-skyscanner-api/), and why there is no [Google Flights API](https://www.ktemia.com/blog/google-flights-api/). Every flight API you can get a key for, compared: [best flight and travel APIs in 2026](https://www.ktemia.com/blog/best-travel-api/). Claude Code skill: [Ktemiaa/ktemia-skills](https://github.com/Ktemiaa/ktemia-skills).\n\n### Response fields\n\n- `searchToken` (string, required): Opaque handle for this search. Pass it to `/flights/results` for page 1, and to `/flights/details` with a flight `id`. Valid for 60 minutes.\n- `expiresIn` (integer, required): Seconds remaining until the token expires, starting at `3600`.\n\n### Retries\n\nRetrying this request is safe: a search creates no booking, reservation or other record. A retried `POST` starts a new search and returns a new `searchToken`; the earlier token stays valid until it expires. Each attempt counts as one API request against your quota. There is no `Idempotency-Key` header, because none is needed. Retry on `429` (after `Retry-After`) and `502`; do not retry `400` unchanged.\n\nFull reference, parameters and examples: [Flights search reference on ktemia.com](https://www.ktemia.com/docs/api/flights/search/)",
        "operationId": "searchFlights",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FlightSearchBody"
              },
              "examples": {
                "one-way": {
                  "summary": "One-way",
                  "value": {
                    "origin": "JFK",
                    "destination": "LAX",
                    "departureDate": "2026-12-03",
                    "cabin": "economy",
                    "passengers": {
                      "adults": 1,
                      "children": 0,
                      "infantsOnLap": 0
                    },
                    "sortBy": "bestValue",
                    "sortOrder": "asc"
                  }
                },
                "round-trip": {
                  "summary": "Round trip",
                  "value": {
                    "origin": "JFK",
                    "destination": "LHR",
                    "departureDate": "2026-12-03",
                    "returnDate": "2026-12-10",
                    "cabin": "economy",
                    "passengers": {
                      "adults": 2,
                      "children": 0,
                      "infantsOnLap": 0
                    },
                    "maxStops": 0,
                    "sortBy": "bestValue",
                    "sortOrder": "asc"
                  }
                },
                "multi-city": {
                  "summary": "Multi-city",
                  "value": {
                    "legs": [
                      {
                        "origin": "JFK",
                        "destination": "LAX",
                        "date": "2026-12-03"
                      },
                      {
                        "origin": "LAX",
                        "destination": "SFO",
                        "date": "2026-12-10"
                      },
                      {
                        "origin": "SFO",
                        "destination": "JFK",
                        "date": "2026-12-17"
                      }
                    ],
                    "cabin": "economy",
                    "passengers": {
                      "adults": 1,
                      "children": 0,
                      "infantsOnLap": 0
                    },
                    "sortBy": "price",
                    "sortOrder": "asc"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {},
                "examples": {
                  "one-way": {
                    "summary": "One-way",
                    "value": {
                      "searchToken": "eyJwIjoxLCJzIjoiNDk1NGMzNmY2ZWY1NDdiYWI4NTI3YzA3ZTBlOWNjZjMiLCJ2IjoxfQ",
                      "expiresIn": 3600
                    }
                  },
                  "round-trip": {
                    "summary": "Round trip",
                    "value": {
                      "searchToken": "eyJwIjoxLCJzIjoiODRiZjZlYzU3ZGQyNDJkZDk4NmZhNzAzM2JhY2I3ODkiLCJ2IjoxfQ",
                      "expiresIn": 3600
                    }
                  },
                  "multi-city": {
                    "summary": "Multi-city",
                    "value": {
                      "searchToken": "eyJwIjoxLCJzIjoiZjVmZDc1YzM4NTM5NDhkZGE2ZjAyZjE3MDQ3ZjNmM2EiLCJ2IjoxfQ",
                      "expiresIn": 3600
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Quota-Limit": {
                "$ref": "#/components/headers/X-Quota-Limit"
              },
              "X-Quota-Used": {
                "$ref": "#/components/headers/X-Quota-Used"
              }
            }
          },
          "401": {
            "description": "The API key is missing or not valid. Send a valid key as the `X-API-Key` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "missing_api_key": {
                    "summary": "MISSING_API_KEY",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "MISSING_API_KEY",
                        "message": "API key is required. Pass X-API-Key header."
                      },
                      "data": null
                    }
                  },
                  "invalid_api_key": {
                    "summary": "INVALID_API_KEY",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "INVALID_API_KEY",
                        "message": "Invalid API key."
                      },
                      "data": null
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit (`RATE_LIMIT_EXCEEDED`) or monthly quota (`QUOTA_EXCEEDED`) reached, or a temporary block after repeated failed authentication. Wait for `Retry-After` seconds before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "rate_limit_exceeded": {
                    "summary": "RATE_LIMIT_EXCEEDED",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "RATE_LIMIT_EXCEEDED",
                        "message": "Too many requests. Retry after 2s."
                      },
                      "data": null
                    }
                  },
                  "quota_exceeded": {
                    "summary": "QUOTA_EXCEEDED",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "QUOTA_EXCEEDED",
                        "message": "Monthly quota of 100 requests exhausted for the free plan. The quota is shared across every key on the account. Upgrade or wait for the next cycle."
                      },
                      "data": null
                    }
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              }
            }
          },
          "400": {
            "description": "The request is malformed. `error.code` says why and `error.param` names the field to fix. Fix the request; retrying it unchanged will fail again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "missing_field": {
                    "summary": "MISSING_FIELD",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "MISSING_FIELD",
                        "message": "departureDate is required. For a multi-city trip, send legs instead.",
                        "param": "departureDate"
                      },
                      "data": null
                    }
                  },
                  "trip_conflict": {
                    "summary": "TRIP_CONFLICT",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "TRIP_CONFLICT",
                        "message": "Send either origin, destination and departureDate, or legs for a multi-city trip -- not both."
                      },
                      "data": null
                    }
                  },
                  "date_in_past": {
                    "summary": "DATE_IN_PAST",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "DATE_IN_PAST",
                        "message": "departureDate '2020-01-01' is in the past.",
                        "param": "departureDate"
                      },
                      "data": null
                    }
                  },
                  "invalid_origin": {
                    "summary": "INVALID_ORIGIN",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "INVALID_ORIGIN",
                        "message": "origin must be an IATA airport or city code, e.g. 'JFK' or 'NYC'.",
                        "param": "origin"
                      },
                      "data": null
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "`NO_RESULTS`: the request is valid but nothing is published for it (no token is returned). `NO_MORE_RESULTS`: the page is past the last one.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "502": {
            "description": "A temporary upstream failure. Retry the same request after a short back-off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "search_failed": {
                    "summary": "SEARCH_FAILED",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "SEARCH_FAILED",
                        "message": "Flight search failed. Please try again."
                      },
                      "data": null
                    }
                  },
                  "upstream_error": {
                    "summary": "UPSTREAM_ERROR",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "UPSTREAM_ERROR",
                        "message": "Flight data is temporarily unavailable."
                      },
                      "data": null
                    }
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Full reference on ktemia.com",
          "url": "https://www.ktemia.com/docs/api/flights/search/"
        }
      }
    },
    "/flights/results": {
      "get": {
        "tags": [
          "Flights"
        ],
        "summary": "List flight search results",
        "description": "Fetch a page of flight data for a search: 20 itineraries, a nextToken, an exact total.\n\nRead a page of a search identified by its token.\n\nPass the `searchToken` from `/flights/search` as the `token` query parameter to get page 1. Each response that has another page includes `nextToken`. This call usually answers in 1\u20132 seconds.\n\n### What is in a page\n\n`flights` is at most 20 itineraries. `availableFilters` describes this search; every `value` in it is a valid input on a new `/flights/search`. `providers` maps the seller codes on this page to display names.\n\nThe `id` on a flight is what `/flights/details` wants as `resultId`. Keep the token - details needs it too.\n\n### Read more\n\nWhy one search lists several providers for the same flight: [flight aggregator API](https://www.ktemia.com/blog/flight-aggregator-api/). How far apart those prices can be: [we compared 1,703 flights across 57 booking sites](https://www.ktemia.com/blog/flight-price-spread/).\n\n### Response fields\n\n- `flights` (array of objects, required): Up to 20 itineraries.\n  - `id` (string, required): Opaque identifier of this itinerary. Pass it as `resultId` to `/flights/details`.\n  - `legs` (array of objects, optional): One entry per takeoff-to-landing journey. A one-way has one, a round trip two, a multi-city one per `legs` item you sent.\n  - `bookingOptions` (array of objects, optional): Fares on this itinerary. Details expands each option with a booking URL, bags, and cabin amenities.\n  - `totalProviders` (integer, optional): How many sellers offered this itinerary.\n  - `isBest` (boolean, optional): True when this is the recommended option.\n  - `isCheapest` (boolean, optional): True when this is the lowest fare on the page.\n- `page` (integer, required): 1-based page number for the token you sent.\n- `hasMore` (boolean, required): True when another page exists.\n- `expiresIn` (integer, required): Seconds remaining on this search.\n- `totalResults` (integer, optional): How many itineraries this search contains.\n- `nextToken` (string, optional): Present when `hasMore` is true. Send it as `token` on the next `/flights/results` call.\n- `availableFilters` (object, optional): Facets of this result set. Each `value` is a valid input on a new `/flights/search`.\n  - `price` (object, optional): Observed price range of the search, in the country\u2019s native currency.\n  - `stops` (array of objects, optional): `value` is `0`, `1`, or `2`. Send it back as `maxStops`.\n  - `cabins` (array of objects, optional): Feed `value` back as `cabin`.\n  - `airlines` (array of objects, optional): Feed `value` back as `airlines`.\n  - `alliances` (array of objects, optional): Feed `value` back as `alliances`.\n- `providers` (object, optional): Map of provider code to `{ name }` for the sellers on this page.\n\n### Pagination\n\nCursor-based. Pass the `searchToken` from the search as `token` for page 1. Each page that is not the last includes `nextToken`: send it as `token` for the next page. Flights and cars return 20 results per page; hotels up to 30. `totalResults` is the size of the whole search and `hasMore` is true when another page exists. There are no page numbers. A token is valid for 60 minutes (`410 SEARCH_EXPIRED` after that); a page after the last returns `404 NO_MORE_RESULTS`.\n\nFull reference, parameters and examples: [Flights results reference on ktemia.com](https://www.ktemia.com/docs/api/flights/results/)",
        "operationId": "listFlightResults",
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "A searchToken or nextToken.",
              "title": "Token"
            },
            "description": "A `searchToken` from `/flights/search` for page 1, or a `nextToken` from the previous page. There is no page number to set.",
            "example": "eyJwIjoxLCJzIjoiNDk1NGMzNmY2ZWY1NDdiYWI4NTI3YzA3ZTBlOWNjZjMiLCJ2IjoxfQ"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {},
                "examples": {
                  "page-1": {
                    "summary": "Page 1",
                    "value": {
                      "flights": [
                        {
                          "id": "31a71cd28ef337786fe1b368caf96730",
                          "legs": [
                            {
                              "departure": "2026-12-03T13:59:00",
                              "arrival": "2026-12-03T17:17:00",
                              "duration": 378,
                              "stops": 0,
                              "segments": [
                                {
                                  "airline": "B6",
                                  "flightNumber": "723",
                                  "origin": "JFK",
                                  "destination": "LAX",
                                  "departure": "2026-12-03T13:59:00",
                                  "arrival": "2026-12-03T17:17:00",
                                  "duration": 378,
                                  "aircraft": "Airbus A318/A319/A320/A321"
                                }
                              ]
                            }
                          ],
                          "bookingOptions": [
                            {
                              "providerCode": "B6",
                              "price": 159,
                              "currency": "USD",
                              "formattedPrice": "$159",
                              "totalPrice": 159,
                              "formattedTotalPrice": "$159",
                              "isDirect": true,
                              "isFreeCancellation": true
                            },
                            {
                              "providerCode": "B6",
                              "price": 214,
                              "currency": "USD",
                              "formattedPrice": "$214",
                              "totalPrice": 214,
                              "formattedTotalPrice": "$214",
                              "isDirect": true,
                              "isFreeCancellation": true
                            },
                            {
                              "providerCode": "B6",
                              "price": 294,
                              "currency": "USD",
                              "formattedPrice": "$294",
                              "totalPrice": 294,
                              "formattedTotalPrice": "$294",
                              "isDirect": true,
                              "isFreeCancellation": true
                            }
                          ],
                          "totalProviders": 1,
                          "isBest": true,
                          "isCheapest": false
                        },
                        {
                          "id": "d4cd86dc2bb25a56b4f3874981b4ca11",
                          "legs": [
                            {
                              "departure": "2026-12-03T10:00:00",
                              "arrival": "2026-12-03T13:19:00",
                              "duration": 379,
                              "stops": 0,
                              "segments": [
                                {
                                  "airline": "B6",
                                  "flightNumber": "223",
                                  "origin": "JFK",
                                  "destination": "LAX",
                                  "departure": "2026-12-03T10:00:00",
                                  "arrival": "2026-12-03T13:19:00",
                                  "duration": 379,
                                  "aircraft": "Airbus A318/A319/A320/A321"
                                }
                              ]
                            }
                          ],
                          "bookingOptions": [
                            {
                              "providerCode": "B6",
                              "price": 159,
                              "currency": "USD",
                              "formattedPrice": "$159",
                              "totalPrice": 159,
                              "formattedTotalPrice": "$159",
                              "isDirect": true,
                              "isFreeCancellation": true
                            },
                            {
                              "providerCode": "B6",
                              "price": 214,
                              "currency": "USD",
                              "formattedPrice": "$214",
                              "totalPrice": 214,
                              "formattedTotalPrice": "$214",
                              "isDirect": true,
                              "isFreeCancellation": true
                            },
                            {
                              "providerCode": "B6",
                              "price": 294,
                              "currency": "USD",
                              "formattedPrice": "$294",
                              "totalPrice": 294,
                              "formattedTotalPrice": "$294",
                              "isDirect": true,
                              "isFreeCancellation": true
                            }
                          ],
                          "totalProviders": 1,
                          "isBest": false,
                          "isCheapest": false
                        },
                        {
                          "id": "bb25bbda9781fe7333bc3b33f49e2e13",
                          "legs": [
                            {
                              "departure": "2026-12-03T12:00:00",
                              "arrival": "2026-12-03T15:04:00",
                              "duration": 364,
                              "stops": 0,
                              "segments": [
                                {
                                  "airline": "DL",
                                  "flightNumber": "1788",
                                  "origin": "JFK",
                                  "destination": "LAX",
                                  "departure": "2026-12-03T12:00:00",
                                  "arrival": "2026-12-03T15:04:00",
                                  "duration": 364,
                                  "aircraft": "Airbus A330-300"
                                }
                              ]
                            }
                          ],
                          "bookingOptions": [
                            {
                              "providerCode": "DL",
                              "price": 215,
                              "currency": "USD",
                              "formattedPrice": "$215",
                              "totalPrice": 215,
                              "formattedTotalPrice": "$215",
                              "isDirect": true,
                              "isFreeCancellation": true
                            },
                            {
                              "providerCode": "DL",
                              "price": 270,
                              "currency": "USD",
                              "formattedPrice": "$270",
                              "totalPrice": 270,
                              "formattedTotalPrice": "$270",
                              "isDirect": true,
                              "isFreeCancellation": true
                            },
                            {
                              "providerCode": "DL",
                              "price": 305,
                              "currency": "USD",
                              "formattedPrice": "$305",
                              "totalPrice": 305,
                              "formattedTotalPrice": "$305",
                              "isDirect": true,
                              "isFreeCancellation": true
                            }
                          ],
                          "totalProviders": 1,
                          "isBest": false,
                          "isCheapest": false
                        }
                      ],
                      "page": 1,
                      "hasMore": true,
                      "expiresIn": 3599,
                      "totalResults": 152,
                      "nextToken": "eyJwIjoyLCJzIjoiNDk1NGMzNmY2ZWY1NDdiYWI4NTI3YzA3ZTBlOWNjZjMiLCJ2IjoxfQ",
                      "availableFilters": {
                        "price": {
                          "min": 159,
                          "max": 13111,
                          "average": 543,
                          "currency": "USD"
                        },
                        "stops": [
                          {
                            "value": 0,
                            "label": "Nonstop",
                            "minPrice": 159,
                            "count": 32
                          },
                          {
                            "value": 1,
                            "label": "1 stop",
                            "minPrice": 225,
                            "count": 87
                          },
                          {
                            "value": 2,
                            "label": "2+ stops",
                            "minPrice": 237,
                            "count": 33
                          }
                        ],
                        "cabins": [
                          {
                            "value": "economy",
                            "label": "Economy",
                            "minPrice": 159,
                            "count": 149
                          },
                          {
                            "value": "premiumEconomy",
                            "label": "Premium Economy",
                            "minPrice": 375,
                            "count": 20
                          },
                          {
                            "value": "business",
                            "label": "Business",
                            "minPrice": 988,
                            "count": 45
                          }
                        ],
                        "airlines": [
                          {
                            "value": "AS",
                            "label": "Alaska Airlines",
                            "minPrice": 225,
                            "count": 59
                          },
                          {
                            "value": "AA",
                            "label": "American Airlines",
                            "minPrice": 215,
                            "count": 33
                          },
                          {
                            "value": "DL",
                            "label": "Delta",
                            "minPrice": 215,
                            "count": 40
                          }
                        ],
                        "alliances": [
                          {
                            "value": "oneworld",
                            "label": "oneworld",
                            "minPrice": 215,
                            "count": 92
                          },
                          {
                            "value": "skyteam",
                            "label": "SkyTeam",
                            "minPrice": 215,
                            "count": 40
                          },
                          {
                            "value": "starAlliance",
                            "label": "Star Alliance",
                            "minPrice": null,
                            "count": 107
                          }
                        ]
                      },
                      "providers": {
                        "AA": {
                          "name": "American Airlines"
                        },
                        "B6": {
                          "name": "JetBlue"
                        },
                        "DL": {
                          "name": "Delta"
                        }
                      }
                    }
                  },
                  "page-2": {
                    "summary": "Page 2",
                    "value": {
                      "flights": [
                        {
                          "id": "e07f78ca1625f1cf6ee283f5958ef947",
                          "legs": [
                            {
                              "departure": "2026-12-03T08:00:00",
                              "arrival": "2026-12-03T11:20:00",
                              "duration": 380,
                              "stops": 0,
                              "segments": [
                                {
                                  "airline": "DL",
                                  "flightNumber": "713",
                                  "origin": "JFK",
                                  "destination": "LAX",
                                  "departure": "2026-12-03T08:00:00",
                                  "arrival": "2026-12-03T11:20:00",
                                  "duration": 380,
                                  "aircraft": "Airbus A330-900neo"
                                }
                              ]
                            }
                          ],
                          "bookingOptions": [
                            {
                              "providerCode": "DL",
                              "price": 215,
                              "currency": "USD",
                              "formattedPrice": "$215",
                              "totalPrice": 215,
                              "formattedTotalPrice": "$215",
                              "isDirect": true,
                              "isFreeCancellation": true
                            },
                            {
                              "providerCode": "DL",
                              "price": 270,
                              "currency": "USD",
                              "formattedPrice": "$270",
                              "totalPrice": 270,
                              "formattedTotalPrice": "$270",
                              "isDirect": true,
                              "isFreeCancellation": true
                            },
                            {
                              "providerCode": "DL",
                              "price": 275,
                              "currency": "USD",
                              "formattedPrice": "$275",
                              "totalPrice": 275,
                              "formattedTotalPrice": "$275",
                              "isDirect": true,
                              "isFreeCancellation": true
                            }
                          ],
                          "totalProviders": 1,
                          "isBest": false,
                          "isCheapest": false
                        },
                        {
                          "id": "72756ddbbfc9b80bd819f89a1f9956c2",
                          "legs": [
                            {
                              "departure": "2026-12-03T16:30:00",
                              "arrival": "2026-12-03T19:56:00",
                              "duration": 386,
                              "stops": 0,
                              "segments": [
                                {
                                  "airline": "AA",
                                  "flightNumber": "306",
                                  "origin": "JFK",
                                  "destination": "LAX",
                                  "departure": "2026-12-03T16:30:00",
                                  "arrival": "2026-12-03T19:56:00",
                                  "duration": 386,
                                  "aircraft": "Airbus A321 (sharklets)"
                                }
                              ]
                            }
                          ],
                          "bookingOptions": [
                            {
                              "providerCode": "AA",
                              "price": 215,
                              "currency": "USD",
                              "formattedPrice": "$215",
                              "totalPrice": 215,
                              "formattedTotalPrice": "$215",
                              "isDirect": true,
                              "isFreeCancellation": true
                            },
                            {
                              "providerCode": "AA",
                              "price": 270,
                              "currency": "USD",
                              "formattedPrice": "$270",
                              "totalPrice": 270,
                              "formattedTotalPrice": "$270",
                              "isDirect": true,
                              "isFreeCancellation": true
                            },
                            {
                              "providerCode": "AA",
                              "price": 366,
                              "currency": "USD",
                              "formattedPrice": "$366",
                              "totalPrice": 366,
                              "formattedTotalPrice": "$366",
                              "isDirect": true,
                              "isFreeCancellation": true
                            }
                          ],
                          "totalProviders": 1,
                          "isBest": false,
                          "isCheapest": false
                        },
                        {
                          "id": "0a31ca45d361aee2277c098194b215b8",
                          "legs": [
                            {
                              "departure": "2026-12-03T17:40:00",
                              "arrival": "2026-12-03T21:06:00",
                              "duration": 386,
                              "stops": 0,
                              "segments": [
                                {
                                  "airline": "AA",
                                  "flightNumber": "302",
                                  "origin": "JFK",
                                  "destination": "LAX",
                                  "departure": "2026-12-03T17:40:00",
                                  "arrival": "2026-12-03T21:06:00",
                                  "duration": 386,
                                  "aircraft": "Airbus A321neo"
                                }
                              ]
                            }
                          ],
                          "bookingOptions": [
                            {
                              "providerCode": "AA",
                              "price": 215,
                              "currency": "USD",
                              "formattedPrice": "$215",
                              "totalPrice": 215,
                              "formattedTotalPrice": "$215",
                              "isDirect": true,
                              "isFreeCancellation": true
                            },
                            {
                              "providerCode": "AA",
                              "price": 270,
                              "currency": "USD",
                              "formattedPrice": "$270",
                              "totalPrice": 270,
                              "formattedTotalPrice": "$270",
                              "isDirect": true,
                              "isFreeCancellation": true
                            },
                            {
                              "providerCode": "AA",
                              "price": 366,
                              "currency": "USD",
                              "formattedPrice": "$366",
                              "totalPrice": 366,
                              "formattedTotalPrice": "$366",
                              "isDirect": true,
                              "isFreeCancellation": true
                            }
                          ],
                          "totalProviders": 1,
                          "isBest": false,
                          "isCheapest": false
                        }
                      ],
                      "page": 2,
                      "hasMore": true,
                      "expiresIn": 3598,
                      "totalResults": 152,
                      "nextToken": "eyJwIjozLCJzIjoiNDk1NGMzNmY2ZWY1NDdiYWI4NTI3YzA3ZTBlOWNjZjMiLCJ2IjoxfQ",
                      "availableFilters": {
                        "price": {
                          "min": 159,
                          "max": 13111,
                          "average": 543,
                          "currency": "USD"
                        },
                        "stops": [
                          {
                            "value": 0,
                            "label": "Nonstop",
                            "minPrice": 159,
                            "count": 32
                          },
                          {
                            "value": 1,
                            "label": "1 stop",
                            "minPrice": 225,
                            "count": 87
                          },
                          {
                            "value": 2,
                            "label": "2+ stops",
                            "minPrice": 237,
                            "count": 33
                          }
                        ],
                        "cabins": [
                          {
                            "value": "economy",
                            "label": "Economy",
                            "minPrice": 159,
                            "count": 149
                          },
                          {
                            "value": "premiumEconomy",
                            "label": "Premium Economy",
                            "minPrice": 375,
                            "count": 20
                          },
                          {
                            "value": "business",
                            "label": "Business",
                            "minPrice": 988,
                            "count": 45
                          }
                        ],
                        "airlines": [
                          {
                            "value": "AS",
                            "label": "Alaska Airlines",
                            "minPrice": 225,
                            "count": 59
                          },
                          {
                            "value": "AA",
                            "label": "American Airlines",
                            "minPrice": 215,
                            "count": 33
                          },
                          {
                            "value": "DL",
                            "label": "Delta",
                            "minPrice": 215,
                            "count": 40
                          }
                        ],
                        "alliances": [
                          {
                            "value": "oneworld",
                            "label": "oneworld",
                            "minPrice": 215,
                            "count": 92
                          },
                          {
                            "value": "skyteam",
                            "label": "SkyTeam",
                            "minPrice": 215,
                            "count": 40
                          },
                          {
                            "value": "starAlliance",
                            "label": "Star Alliance",
                            "minPrice": null,
                            "count": 107
                          }
                        ]
                      },
                      "providers": {
                        "AA": {
                          "name": "American Airlines"
                        },
                        "AS": {
                          "name": "Alaska Airlines"
                        },
                        "DL": {
                          "name": "Delta"
                        },
                        "ASWHISKY": {
                          "name": "Alaska Airlines"
                        }
                      }
                    }
                  },
                  "round-trip-page-1": {
                    "summary": "Round trip, page 1",
                    "value": {
                      "flights": [
                        {
                          "id": "07804f9e1b83425f0e30951ae0c29a9a",
                          "legs": [
                            {
                              "departure": "2026-12-03T21:15:00",
                              "arrival": "2026-12-04T09:15:00",
                              "duration": 420,
                              "stops": 0,
                              "segments": [
                                {
                                  "airline": "AA",
                                  "flightNumber": "104",
                                  "origin": "JFK",
                                  "destination": "LHR",
                                  "departure": "2026-12-03T21:15:00",
                                  "arrival": "2026-12-04T09:15:00",
                                  "duration": 420,
                                  "aircraft": "Boeing 787-9 Dreamliner"
                                }
                              ]
                            },
                            {
                              "departure": "2026-12-10T19:20:00",
                              "arrival": "2026-12-10T22:25:00",
                              "duration": 485,
                              "stops": 0,
                              "segments": [
                                {
                                  "airline": "AA",
                                  "flightNumber": "6942",
                                  "origin": "LHR",
                                  "destination": "JFK",
                                  "departure": "2026-12-10T19:20:00",
                                  "arrival": "2026-12-10T22:25:00",
                                  "duration": 485,
                                  "aircraft": "Boeing 777"
                                }
                              ]
                            }
                          ],
                          "bookingOptions": [
                            {
                              "providerCode": "AA",
                              "price": 830,
                              "currency": "USD",
                              "formattedPrice": "$830",
                              "totalPrice": 1659,
                              "formattedTotalPrice": "$1,659",
                              "isDirect": true,
                              "isFreeCancellation": true
                            },
                            {
                              "providerCode": "AA",
                              "price": 1070,
                              "currency": "USD",
                              "formattedPrice": "$1,070",
                              "totalPrice": 2139,
                              "formattedTotalPrice": "$2,139",
                              "isDirect": true,
                              "isFreeCancellation": true
                            }
                          ],
                          "totalProviders": 1,
                          "isBest": true,
                          "isCheapest": false
                        },
                        {
                          "id": "26253ca87e823ccb9ef262c410c733c7",
                          "legs": [
                            {
                              "departure": "2026-12-03T08:05:00",
                              "arrival": "2026-12-03T20:00:00",
                              "duration": 415,
                              "stops": 0,
                              "segments": [
                                {
                                  "airline": "AA",
                                  "flightNumber": "6939",
                                  "origin": "JFK",
                                  "destination": "LHR",
                                  "departure": "2026-12-03T08:05:00",
                                  "arrival": "2026-12-03T20:00:00",
                                  "duration": 415,
                                  "aircraft": "Boeing 777"
                                }
                              ]
                            },
                            {
                              "departure": "2026-12-10T18:05:00",
                              "arrival": "2026-12-10T21:10:00",
                              "duration": 485,
                              "stops": 0,
                              "segments": [
                                {
                                  "airline": "AA",
                                  "flightNumber": "6940",
                                  "origin": "LHR",
                                  "destination": "JFK",
                                  "departure": "2026-12-10T18:05:00",
                                  "arrival": "2026-12-10T21:10:00",
                                  "duration": 485,
                                  "aircraft": "Boeing 777"
                                }
                              ]
                            }
                          ],
                          "bookingOptions": [
                            {
                              "providerCode": "AA",
                              "price": 830,
                              "currency": "USD",
                              "formattedPrice": "$830",
                              "totalPrice": 1659,
                              "formattedTotalPrice": "$1,659",
                              "isDirect": true,
                              "isFreeCancellation": true
                            },
                            {
                              "providerCode": "AA",
                              "price": 1070,
                              "currency": "USD",
                              "formattedPrice": "$1,070",
                              "totalPrice": 2139,
                              "formattedTotalPrice": "$2,139",
                              "isDirect": true,
                              "isFreeCancellation": true
                            }
                          ],
                          "totalProviders": 1,
                          "isBest": false,
                          "isCheapest": true
                        },
                        {
                          "id": "776442bf2801c050166cb6a027ef8bbd",
                          "legs": [
                            {
                              "departure": "2026-12-03T21:15:00",
                              "arrival": "2026-12-04T09:15:00",
                              "duration": 420,
                              "stops": 0,
                              "segments": [
                                {
                                  "airline": "AY",
                                  "flightNumber": "3774",
                                  "origin": "JFK",
                                  "destination": "LHR",
                                  "departure": "2026-12-03T21:15:00",
                                  "arrival": "2026-12-04T09:15:00",
                                  "duration": 420,
                                  "aircraft": "Boeing 787-9 Dreamliner"
                                }
                              ]
                            },
                            {
                              "departure": "2026-12-10T17:00:00",
                              "arrival": "2026-12-10T20:05:00",
                              "duration": 485,
                              "stops": 0,
                              "segments": [
                                {
                                  "airline": "AY",
                                  "flightNumber": "3786",
                                  "origin": "LHR",
                                  "destination": "JFK",
                                  "departure": "2026-12-10T17:00:00",
                                  "arrival": "2026-12-10T20:05:00",
                                  "duration": 485,
                                  "aircraft": "Boeing 777-200/200ER"
                                }
                              ]
                            }
                          ],
                          "bookingOptions": [
                            {
                              "providerCode": "AY",
                              "price": 830,
                              "currency": "USD",
                              "formattedPrice": "$830",
                              "totalPrice": 1659,
                              "formattedTotalPrice": "$1,659",
                              "isDirect": true,
                              "isFreeCancellation": true
                            },
                            {
                              "providerCode": "AY",
                              "price": 1070,
                              "currency": "USD",
                              "formattedPrice": "$1,070",
                              "totalPrice": 2139,
                              "formattedTotalPrice": "$2,139",
                              "isDirect": true,
                              "isFreeCancellation": true
                            },
                            {
                              "providerCode": "AY",
                              "price": 1295,
                              "currency": "USD",
                              "formattedPrice": "$1,295",
                              "totalPrice": 2589,
                              "formattedTotalPrice": "$2,589",
                              "isDirect": true,
                              "isFreeCancellation": true
                            }
                          ],
                          "totalProviders": 1,
                          "isBest": false,
                          "isCheapest": false
                        }
                      ],
                      "page": 1,
                      "hasMore": true,
                      "expiresIn": 3598,
                      "totalResults": 700,
                      "nextToken": "eyJwIjoyLCJzIjoiODRiZjZlYzU3ZGQyNDJkZDk4NmZhNzAzM2JhY2I3ODkiLCJ2IjoxfQ",
                      "availableFilters": {
                        "price": {
                          "min": 665,
                          "max": 13931,
                          "average": 1790,
                          "currency": "USD"
                        },
                        "stops": [
                          {
                            "value": 0,
                            "label": "Nonstop",
                            "minPrice": 830,
                            "count": 1139
                          },
                          {
                            "value": 1,
                            "label": "1 stop",
                            "minPrice": 665,
                            "count": 711
                          },
                          {
                            "value": 2,
                            "label": "2+ stops",
                            "minPrice": null,
                            "count": 11
                          }
                        ],
                        "cabins": [
                          {
                            "value": "economy",
                            "label": "Economy",
                            "minPrice": 830,
                            "count": 700
                          },
                          {
                            "value": "premiumEconomy",
                            "label": "Premium Economy",
                            "minPrice": 3626,
                            "count": 144
                          },
                          {
                            "value": "business",
                            "label": "Business",
                            "minPrice": 6388,
                            "count": 192
                          }
                        ],
                        "airlines": [
                          {
                            "value": "EI",
                            "label": "Aer Lingus",
                            "minPrice": null,
                            "count": 71
                          },
                          {
                            "value": "AM",
                            "label": "Aeromexico",
                            "minPrice": null,
                            "count": 4
                          },
                          {
                            "value": "UX",
                            "label": "Air Europa",
                            "minPrice": null,
                            "count": 3
                          }
                        ],
                        "alliances": [
                          {
                            "value": "oneworld",
                            "label": "oneworld",
                            "minPrice": 830,
                            "count": 552
                          },
                          {
                            "value": "skyteam",
                            "label": "SkyTeam",
                            "minPrice": 830,
                            "count": 144
                          },
                          {
                            "value": "starAlliance",
                            "label": "Star Alliance",
                            "minPrice": null,
                            "count": 601
                          }
                        ]
                      },
                      "providers": {
                        "AA": {
                          "name": "American Airlines"
                        },
                        "DL": {
                          "name": "Delta"
                        },
                        "AY": {
                          "name": "Finnair"
                        },
                        "IB": {
                          "name": "Iberia"
                        }
                      }
                    }
                  },
                  "multi-city-page-1": {
                    "summary": "Multi-city, page 1",
                    "value": {
                      "flights": [
                        {
                          "id": "84604222a90ff5883c97f139be649c27",
                          "legs": [
                            {
                              "departure": "2026-12-03T17:29:00",
                              "arrival": "2026-12-03T23:12:00",
                              "duration": 523,
                              "stops": 1,
                              "segments": [
                                {
                                  "airline": "AS",
                                  "flightNumber": "41",
                                  "origin": "JFK",
                                  "destination": "SFO",
                                  "departure": "2026-12-03T17:29:00",
                                  "arrival": "2026-12-03T21:05:00",
                                  "duration": 396,
                                  "aircraft": "Boeing 737 MAX 9"
                                },
                                {
                                  "airline": "AS",
                                  "flightNumber": "661",
                                  "origin": "SFO",
                                  "destination": "LAX",
                                  "departure": "2026-12-03T21:45:00",
                                  "arrival": "2026-12-03T23:12:00",
                                  "duration": 87,
                                  "aircraft": "Boeing 737-900 (winglets)"
                                }
                              ]
                            },
                            {
                              "departure": "2026-12-10T13:50:00",
                              "arrival": "2026-12-10T15:16:00",
                              "duration": 86,
                              "stops": 0,
                              "segments": [
                                {
                                  "airline": "AS",
                                  "flightNumber": "465",
                                  "origin": "LAX",
                                  "destination": "SFO",
                                  "departure": "2026-12-10T13:50:00",
                                  "arrival": "2026-12-10T15:16:00",
                                  "duration": 86,
                                  "aircraft": "Boeing 737 MAX 9"
                                }
                              ]
                            },
                            {
                              "departure": "2026-12-17T09:10:00",
                              "arrival": "2026-12-17T22:29:00",
                              "duration": 619,
                              "stops": 1,
                              "segments": [
                                {
                                  "airline": "AS",
                                  "flightNumber": "3178",
                                  "origin": "SFO",
                                  "destination": "PSP",
                                  "departure": "2026-12-17T09:10:00",
                                  "arrival": "2026-12-17T10:51:00",
                                  "duration": 101,
                                  "aircraft": "Embraer 175"
                                },
                                {
                                  "airline": "AS",
                                  "flightNumber": "242",
                                  "origin": "PSP",
                                  "destination": "JFK",
                                  "departure": "2026-12-17T14:14:00",
                                  "arrival": "2026-12-17T22:29:00",
                                  "duration": 315,
                                  "aircraft": "Boeing 737-800 (winglets)"
                                }
                              ]
                            }
                          ],
                          "bookingOptions": [
                            {
                              "providerCode": "AS",
                              "price": 463,
                              "currency": "USD",
                              "formattedPrice": "$463",
                              "totalPrice": 463,
                              "formattedTotalPrice": "$463",
                              "isDirect": true,
                              "isFreeCancellation": true
                            },
                            {
                              "providerCode": "AS",
                              "price": 628,
                              "currency": "USD",
                              "formattedPrice": "$628",
                              "totalPrice": 628,
                              "formattedTotalPrice": "$628",
                              "isDirect": true,
                              "isFreeCancellation": true
                            }
                          ],
                          "totalProviders": 1,
                          "isBest": false,
                          "isCheapest": true
                        },
                        {
                          "id": "07b8838a3b0cabc4c7e90a358f0d4238",
                          "legs": [
                            {
                              "departure": "2026-12-03T17:29:00",
                              "arrival": "2026-12-03T23:12:00",
                              "duration": 523,
                              "stops": 1,
                              "segments": [
                                {
                                  "airline": "AS",
                                  "flightNumber": "41",
                                  "origin": "JFK",
                                  "destination": "SFO",
                                  "departure": "2026-12-03T17:29:00",
                                  "arrival": "2026-12-03T21:05:00",
                                  "duration": 396,
                                  "aircraft": "Boeing 737 MAX 9"
                                },
                                {
                                  "airline": "AS",
                                  "flightNumber": "661",
                                  "origin": "SFO",
                                  "destination": "LAX",
                                  "departure": "2026-12-03T21:45:00",
                                  "arrival": "2026-12-03T23:12:00",
                                  "duration": 87,
                                  "aircraft": "Boeing 737-900 (winglets)"
                                }
                              ]
                            },
                            {
                              "departure": "2026-12-10T15:44:00",
                              "arrival": "2026-12-10T17:10:00",
                              "duration": 86,
                              "stops": 0,
                              "segments": [
                                {
                                  "airline": "AS",
                                  "flightNumber": "91",
                                  "origin": "LAX",
                                  "destination": "SFO",
                                  "departure": "2026-12-10T15:44:00",
                                  "arrival": "2026-12-10T17:10:00",
                                  "duration": 86,
                                  "aircraft": "Boeing 737-900 (winglets)"
                                }
                              ]
                            },
                            {
                              "departure": "2026-12-17T09:10:00",
                              "arrival": "2026-12-17T22:29:00",
                              "duration": 619,
                              "stops": 1,
                              "segments": [
                                {
                                  "airline": "AS",
                                  "flightNumber": "3178",
                                  "origin": "SFO",
                                  "destination": "PSP",
                                  "departure": "2026-12-17T09:10:00",
                                  "arrival": "2026-12-17T10:51:00",
                                  "duration": 101,
                                  "aircraft": "Embraer 175"
                                },
                                {
                                  "airline": "AS",
                                  "flightNumber": "242",
                                  "origin": "PSP",
                                  "destination": "JFK",
                                  "departure": "2026-12-17T14:14:00",
                                  "arrival": "2026-12-17T22:29:00",
                                  "duration": 315,
                                  "aircraft": "Boeing 737-800 (winglets)"
                                }
                              ]
                            }
                          ],
                          "bookingOptions": [
                            {
                              "providerCode": "AS",
                              "price": 463,
                              "currency": "USD",
                              "formattedPrice": "$463",
                              "totalPrice": 463,
                              "formattedTotalPrice": "$463",
                              "isDirect": true,
                              "isFreeCancellation": true
                            },
                            {
                              "providerCode": "AS",
                              "price": 628,
                              "currency": "USD",
                              "formattedPrice": "$628",
                              "totalPrice": 628,
                              "formattedTotalPrice": "$628",
                              "isDirect": true,
                              "isFreeCancellation": true
                            }
                          ],
                          "totalProviders": 1,
                          "isBest": false,
                          "isCheapest": false
                        },
                        {
                          "id": "fdd9cbb6d1ebf89d459ab7b636c5404f",
                          "legs": [
                            {
                              "departure": "2026-12-03T17:29:00",
                              "arrival": "2026-12-03T23:12:00",
                              "duration": 523,
                              "stops": 1,
                              "segments": [
                                {
                                  "airline": "AS",
                                  "flightNumber": "41",
                                  "origin": "JFK",
                                  "destination": "SFO",
                                  "departure": "2026-12-03T17:29:00",
                                  "arrival": "2026-12-03T21:05:00",
                                  "duration": 396,
                                  "aircraft": "Boeing 737 MAX 9"
                                },
                                {
                                  "airline": "AS",
                                  "flightNumber": "661",
                                  "origin": "SFO",
                                  "destination": "LAX",
                                  "departure": "2026-12-03T21:45:00",
                                  "arrival": "2026-12-03T23:12:00",
                                  "duration": 87,
                                  "aircraft": "Boeing 737-900 (winglets)"
                                }
                              ]
                            },
                            {
                              "departure": "2026-12-10T12:43:00",
                              "arrival": "2026-12-10T14:09:00",
                              "duration": 86,
                              "stops": 0,
                              "segments": [
                                {
                                  "airline": "AS",
                                  "flightNumber": "640",
                                  "origin": "LAX",
                                  "destination": "SFO",
                                  "departure": "2026-12-10T12:43:00",
                                  "arrival": "2026-12-10T14:09:00",
                                  "duration": 86,
                                  "aircraft": "Boeing 737-900 (winglets)"
                                }
                              ]
                            },
                            {
                              "departure": "2026-12-17T09:10:00",
                              "arrival": "2026-12-17T22:29:00",
                              "duration": 619,
                              "stops": 1,
                              "segments": [
                                {
                                  "airline": "AS",
                                  "flightNumber": "3178",
                                  "origin": "SFO",
                                  "destination": "PSP",
                                  "departure": "2026-12-17T09:10:00",
                                  "arrival": "2026-12-17T10:51:00",
                                  "duration": 101,
                                  "aircraft": "Embraer 175"
                                },
                                {
                                  "airline": "AS",
                                  "flightNumber": "242",
                                  "origin": "PSP",
                                  "destination": "JFK",
                                  "departure": "2026-12-17T14:14:00",
                                  "arrival": "2026-12-17T22:29:00",
                                  "duration": 315,
                                  "aircraft": "Boeing 737-800 (winglets)"
                                }
                              ]
                            }
                          ],
                          "bookingOptions": [
                            {
                              "providerCode": "AS",
                              "price": 463,
                              "currency": "USD",
                              "formattedPrice": "$463",
                              "totalPrice": 463,
                              "formattedTotalPrice": "$463",
                              "isDirect": true,
                              "isFreeCancellation": true
                            },
                            {
                              "providerCode": "AS",
                              "price": 628,
                              "currency": "USD",
                              "formattedPrice": "$628",
                              "totalPrice": 628,
                              "formattedTotalPrice": "$628",
                              "isDirect": true,
                              "isFreeCancellation": true
                            }
                          ],
                          "totalProviders": 1,
                          "isBest": false,
                          "isCheapest": false
                        }
                      ],
                      "page": 1,
                      "hasMore": true,
                      "expiresIn": 3598,
                      "totalResults": 829,
                      "nextToken": "eyJwIjoyLCJzIjoiZjVmZDc1YzM4NTM5NDhkZGE2ZjAyZjE3MDQ3ZjNmM2EiLCJ2IjoxfQ",
                      "availableFilters": {
                        "price": {
                          "min": 402,
                          "max": 4481,
                          "average": 1202,
                          "currency": "USD"
                        },
                        "stops": [
                          {
                            "value": 0,
                            "label": "Nonstop",
                            "minPrice": 587,
                            "count": 829
                          },
                          {
                            "value": 1,
                            "label": "1 stop",
                            "minPrice": null,
                            "count": 445
                          },
                          {
                            "value": 2,
                            "label": "2+ stops",
                            "minPrice": null,
                            "count": 0
                          }
                        ],
                        "cabins": [
                          {
                            "value": "economy",
                            "label": "Economy",
                            "minPrice": 463,
                            "count": 582
                          },
                          {
                            "value": "premiumEconomy",
                            "label": "Premium Economy",
                            "minPrice": null,
                            "count": 29
                          },
                          {
                            "value": "business",
                            "label": "Business",
                            "minPrice": 2046,
                            "count": 63
                          }
                        ],
                        "airlines": [
                          {
                            "value": "AS",
                            "label": "Alaska Airlines",
                            "minPrice": 463,
                            "count": 91
                          },
                          {
                            "value": "AA",
                            "label": "American Airlines",
                            "minPrice": 466,
                            "count": 200
                          },
                          {
                            "value": "DL",
                            "label": "Delta",
                            "minPrice": 596,
                            "count": 538
                          }
                        ],
                        "alliances": [
                          {
                            "value": "oneworld",
                            "label": "oneworld",
                            "minPrice": 463,
                            "count": 291
                          },
                          {
                            "value": "skyteam",
                            "label": "SkyTeam",
                            "minPrice": 596,
                            "count": 487
                          }
                        ]
                      },
                      "providers": {
                        "AS": {
                          "name": "Alaska Airlines"
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Quota-Limit": {
                "$ref": "#/components/headers/X-Quota-Limit"
              },
              "X-Quota-Used": {
                "$ref": "#/components/headers/X-Quota-Used"
              }
            }
          },
          "401": {
            "description": "The API key is missing or not valid. Send a valid key as the `X-API-Key` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "missing_api_key": {
                    "summary": "MISSING_API_KEY",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "MISSING_API_KEY",
                        "message": "API key is required. Pass X-API-Key header."
                      },
                      "data": null
                    }
                  },
                  "invalid_api_key": {
                    "summary": "INVALID_API_KEY",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "INVALID_API_KEY",
                        "message": "Invalid API key."
                      },
                      "data": null
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit (`RATE_LIMIT_EXCEEDED`) or monthly quota (`QUOTA_EXCEEDED`) reached, or a temporary block after repeated failed authentication. Wait for `Retry-After` seconds before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "rate_limit_exceeded": {
                    "summary": "RATE_LIMIT_EXCEEDED",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "RATE_LIMIT_EXCEEDED",
                        "message": "Too many requests. Retry after 2s."
                      },
                      "data": null
                    }
                  },
                  "quota_exceeded": {
                    "summary": "QUOTA_EXCEEDED",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "QUOTA_EXCEEDED",
                        "message": "Monthly quota of 100 requests exhausted for the free plan. The quota is shared across every key on the account. Upgrade or wait for the next cycle."
                      },
                      "data": null
                    }
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              }
            }
          },
          "400": {
            "description": "The request is malformed. `error.code` says why and `error.param` names the field to fix. Fix the request; retrying it unchanged will fail again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "invalid_search_token": {
                    "summary": "INVALID_SEARCH_TOKEN",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "INVALID_SEARCH_TOKEN",
                        "message": "The pagination token is not valid. Use the nextToken returned by a search.",
                        "param": "token"
                      },
                      "data": null
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "`NO_RESULTS`: the request is valid but nothing is published for it (no token is returned). `NO_MORE_RESULTS`: the page is past the last one.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "no_more_results": {
                    "summary": "NO_MORE_RESULTS",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "NO_MORE_RESULTS",
                        "message": "There are no more results for this search."
                      },
                      "data": null
                    }
                  }
                }
              }
            }
          },
          "410": {
            "description": "`SEARCH_EXPIRED`: the search token was valid and has expired (60 minutes). Start a new search; retrying this one will not help.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "search_expired": {
                    "summary": "SEARCH_EXPIRED",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "SEARCH_EXPIRED",
                        "message": "This search has expired. Start a new search to get current results."
                      },
                      "data": null
                    }
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Full reference on ktemia.com",
          "url": "https://www.ktemia.com/docs/api/flights/results/"
        },
        "x-pagination": {
          "type": "cursor",
          "cursorParam": "token",
          "nextCursorField": "nextToken",
          "hasMoreField": "hasMore",
          "totalField": "totalResults"
        }
      }
    },
    "/flights/details": {
      "get": {
        "tags": [
          "Flights"
        ],
        "summary": "Get every fare and booking link for one flight",
        "description": "Expand one itinerary into every fare, with a URL that opens the seller\u2019s booking page.\n\nExpand one itinerary into booking options with provider URLs.\n\nQuery parameters are `token` and `resultId`. You do not send the route, dates, cabin, or sort again. This call usually answers in 3\u20134 seconds and includes a booking link for each fare.\n\n### The booking URL\n\n`bookingOptions[].providerUrl` opens the seller\u2019s site with the trip filled in. Open it in a new tab and leave the query string as returned.\n\n### Read more\n\nWhy details hands off to the seller instead of booking: [GDS vs booking engine vs a search API](https://www.ktemia.com/blog/search-api-vs-gds-booking-engine/). Connecting search to an agent in Cursor or Claude: [flights MCP](https://www.ktemia.com/blog/flights-mcp/).\n\n### Response fields\n\n- `resultId` (string, required): The `id` you asked about.\n- `tripInfo` (object, optional): Classification of the trip.\n  - `tripType` (string, optional): `oneWay`, `roundTrip`, or `multiCity`.\n  - `isDomestic` (boolean, optional): True when every airport is in the same country.\n  - `isMultiAirport` (boolean, optional): True when a city pair uses more than one airport.\n- `legs` (array of objects, optional): Same shape as on the flight object.\n  - `departure` (string, optional): Local departure time of the first segment.\n  - `arrival` (string, optional): Local arrival time of the last segment.\n  - `duration` (integer, optional): Total elapsed time in minutes, including layovers.\n  - `stops` (integer, optional): Number of stops. `0` is nonstop.\n  - `segments` (array of objects, optional): The individual flights that make up this leg.\n- `bookingOptions` (array of objects, optional): Every fare class on this itinerary, with a provider URL.\n  - `providerCode` (string, optional): IATA code of the seller.\n  - `providerUrl` (string, optional): Booking link on the seller\u2019s site. Open it as returned.\n  - `providerDomain` (string, optional): Host of `providerUrl`.\n  - `price` (number, optional): Per-person fare in the country\u2019s native currency.\n  - `currency` (string, optional): ISO 4217 code of that country\u2019s native currency.\n  - `formattedPrice` (string, optional): Per-person fare, formatted.\n  - `totalPrice` (number, optional): Fare for the whole party.\n  - `formattedTotalPrice` (string, optional): Whole-party fare, formatted.\n  - `bagFees` (object, optional): Carry-on and checked-bag policy for this fare.\n  - `segmentFares` (array of objects, optional): Cabin and onboard amenities per segment.\n  - `badges` (array of strings, optional): Highlights such as `direct` or `freeCancellation`.\n- `fareFamilies` (array of objects, optional): Named branded fares with amenity matrices.\n  - `id` (string, optional): Carrier fare-family code.\n  - `name` (string, optional): Display name, e.g. `Main Base`.\n  - `cabin` (string, optional): `economy`, `premiumEconomy`, `business`, or `first`.\n  - `price` (number, optional): Starting fare for this family.\n  - `formattedPrice` (string, optional): Same fare, formatted.\n  - `amenities` (array of objects, optional): `type` is camelCase (`carryOnBag`, `checkedBag`, `seatSelection`, \u2026). `restriction` is `included`, `fee`, or `unavailable`.\n- `airlines` (object, optional): Map of airline code to `{ name, feePageUrl }`.\n- `airports` (object, optional): Map of airport code to `{ name, city, cityCode, utcOffsetHours }`.\n- `providers` (object, optional): Map of provider code to `{ name, type }`.\n\nFull reference, parameters and examples: [Flights details reference on ktemia.com](https://www.ktemia.com/docs/api/flights/details/)",
        "operationId": "getFlightDetails",
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "A searchToken or nextToken.",
              "title": "Token"
            },
            "description": "Any token of the search that produced the flight - the original `searchToken` or a later `nextToken`.",
            "example": "eyJwIjoxLCJzIjoiNDk1NGMzNmY2ZWY1NDdiYWI4NTI3YzA3ZTBlOWNjZjMiLCJ2IjoxfQ"
          },
          {
            "name": "resultId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "The id of a flight from /flights/results.",
              "title": "Resultid"
            },
            "description": "The `id` of a flight from `/flights/results` for this same token.",
            "example": "31a71cd28ef337786fe1b368caf96730"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {},
                "examples": {
                  "one-way-itinerary": {
                    "summary": "One-way itinerary",
                    "value": {
                      "resultId": "31a71cd28ef337786fe1b368caf96730",
                      "tripInfo": {
                        "tripType": "oneWay",
                        "isDomestic": true,
                        "isMultiAirport": false
                      },
                      "legs": [
                        {
                          "departure": "2026-12-03T13:59:00",
                          "arrival": "2026-12-03T17:17:00",
                          "duration": 378,
                          "stops": 0,
                          "segments": [
                            {
                              "airline": "B6",
                              "flightNumber": "723",
                              "origin": "JFK",
                              "destination": "LAX",
                              "departure": "2026-12-03T13:59:00",
                              "arrival": "2026-12-03T17:17:00",
                              "duration": 378,
                              "aircraft": "Airbus A318/A319/A320/A321"
                            }
                          ]
                        }
                      ],
                      "bookingOptions": [
                        {
                          "providerCode": "B6",
                          "providerUrl": "https://www.jetblue.com/booking/trip-summary?\u2026",
                          "providerDomain": "www.jetblue.com",
                          "price": 159,
                          "currency": "USD",
                          "formattedPrice": "$159",
                          "totalPrice": 159,
                          "formattedTotalPrice": "$159",
                          "bagFees": {
                            "carryOn": {
                              "status": "included",
                              "price": 0,
                              "label": "Included"
                            },
                            "checked": {
                              "firstBag": {
                                "status": "fee",
                                "price": 49
                              },
                              "secondBag": {
                                "status": "fee",
                                "price": 69
                              }
                            },
                            "disclosures": [
                              "Up to 62in total"
                            ],
                            "policy": [
                              {
                                "type": "personalItem",
                                "restrictions": {
                                  "dimensions": "Up to 16 x 12 x 7in"
                                }
                              },
                              {
                                "type": "carryOn",
                                "restrictions": {
                                  "dimensions": "Up to 21 x 13 x 8in"
                                }
                              },
                              {
                                "type": "checked",
                                "restrictions": {
                                  "dimensions": "Up to 62in total"
                                }
                              }
                            ]
                          },
                          "segmentFares": [
                            {
                              "cabin": "economy",
                              "quality": [
                                {
                                  "type": "aircraft",
                                  "label": "Airbus A318/A319/A320/A321 (Narrow-body jet)"
                                },
                                {
                                  "type": "wifi",
                                  "label": "Streaming capable Wi-Fi"
                                },
                                {
                                  "type": "entertainment",
                                  "label": "Seatback on-demand & live TV"
                                }
                              ]
                            }
                          ],
                          "badges": [
                            "direct",
                            "freeCancellation"
                          ]
                        },
                        {
                          "providerCode": "B6",
                          "providerUrl": "https://www.jetblue.com/booking/trip-summary?\u2026",
                          "providerDomain": "www.jetblue.com",
                          "price": 214,
                          "currency": "USD",
                          "formattedPrice": "$214",
                          "totalPrice": 214,
                          "formattedTotalPrice": "$214",
                          "bagFees": {
                            "carryOn": {
                              "status": "included",
                              "price": 0,
                              "label": "Included"
                            },
                            "checked": {
                              "firstBag": {
                                "status": "fee",
                                "price": 49
                              },
                              "secondBag": {
                                "status": "fee",
                                "price": 69
                              }
                            },
                            "disclosures": [
                              "Up to 62in total"
                            ],
                            "policy": [
                              {
                                "type": "personalItem",
                                "restrictions": {
                                  "dimensions": "Up to 16 x 12 x 7in"
                                }
                              },
                              {
                                "type": "carryOn",
                                "restrictions": {
                                  "dimensions": "Up to 21 x 13 x 8in"
                                }
                              },
                              {
                                "type": "checked",
                                "restrictions": {
                                  "dimensions": "Up to 62in total"
                                }
                              }
                            ]
                          },
                          "segmentFares": [
                            {
                              "cabin": "economy",
                              "quality": [
                                {
                                  "type": "aircraft",
                                  "label": "Airbus A318/A319/A320/A321 (Narrow-body jet)"
                                },
                                {
                                  "type": "wifi",
                                  "label": "Streaming capable Wi-Fi"
                                },
                                {
                                  "type": "entertainment",
                                  "label": "Seatback on-demand & live TV"
                                }
                              ]
                            }
                          ],
                          "badges": [
                            "direct",
                            "freeCancellation"
                          ]
                        },
                        {
                          "providerCode": "B6",
                          "providerUrl": "https://www.jetblue.com/booking/trip-summary?\u2026",
                          "providerDomain": "www.jetblue.com",
                          "price": 294,
                          "currency": "USD",
                          "formattedPrice": "$294",
                          "totalPrice": 294,
                          "formattedTotalPrice": "$294",
                          "bagFees": {
                            "carryOn": {
                              "status": "included",
                              "price": 0,
                              "label": "Included"
                            },
                            "checked": {
                              "firstBag": {
                                "status": "unknown",
                                "price": null
                              },
                              "secondBag": {
                                "status": "unknown",
                                "price": null
                              }
                            },
                            "disclosures": [
                              "Up to 50lbs per bag",
                              "Up to 62in total"
                            ],
                            "policy": [
                              {
                                "type": "personalItem",
                                "restrictions": {
                                  "dimensions": "Up to 16 x 12 x 7in"
                                }
                              },
                              {
                                "type": "carryOn",
                                "restrictions": {
                                  "dimensions": "Up to 21 x 13 x 8in"
                                }
                              },
                              {
                                "type": "checked",
                                "restrictions": {
                                  "weight": "Up to 50lbs per bag"
                                }
                              }
                            ]
                          },
                          "segmentFares": [
                            {
                              "cabin": "economy",
                              "quality": [
                                {
                                  "type": "aircraft",
                                  "label": "Airbus A318/A319/A320/A321 (Narrow-body jet)"
                                },
                                {
                                  "type": "wifi",
                                  "label": "Streaming capable Wi-Fi"
                                },
                                {
                                  "type": "entertainment",
                                  "label": "Seatback on-demand & live TV"
                                }
                              ]
                            }
                          ],
                          "badges": [
                            "direct",
                            "freeCancellation"
                          ]
                        }
                      ],
                      "fareFamilies": [
                        {
                          "id": "DN",
                          "name": "Main Base",
                          "cabin": "economy",
                          "price": 159,
                          "formattedPrice": "$159",
                          "amenities": [
                            {
                              "type": "carryOnBag",
                              "restriction": "included",
                              "prices": {
                                "firstBag": 0
                              }
                            },
                            {
                              "type": "checkedBag",
                              "restriction": "fee",
                              "prices": {
                                "firstBag": 49,
                                "secondBag": 69
                              }
                            },
                            {
                              "type": "seatSelection",
                              "restriction": "fee",
                              "prices": null
                            }
                          ]
                        },
                        {
                          "id": "AN",
                          "name": "Main",
                          "cabin": "economy",
                          "price": 214,
                          "formattedPrice": "$214",
                          "amenities": [
                            {
                              "type": "carryOnBag",
                              "restriction": "included",
                              "prices": {
                                "firstBag": 0
                              }
                            },
                            {
                              "type": "checkedBag",
                              "restriction": "fee",
                              "prices": {
                                "firstBag": 49,
                                "secondBag": 69
                              }
                            },
                            {
                              "type": "seatSelection",
                              "restriction": "included",
                              "prices": null
                            }
                          ]
                        },
                        {
                          "id": "GR",
                          "name": "Main Flex",
                          "cabin": "economy",
                          "price": 294,
                          "formattedPrice": "$294",
                          "amenities": [
                            {
                              "type": "carryOnBag",
                              "restriction": "included",
                              "prices": {
                                "firstBag": 0
                              }
                            },
                            {
                              "type": "checkedBag",
                              "restriction": "fee",
                              "prices": null
                            },
                            {
                              "type": "seatSelection",
                              "restriction": "included",
                              "prices": null
                            }
                          ]
                        }
                      ],
                      "airports": {
                        "LAX": {
                          "name": "Los Angeles",
                          "city": "Los Angeles",
                          "cityCode": "LAX",
                          "utcOffsetHours": -8
                        },
                        "JFK": {
                          "name": "John F Kennedy Intl",
                          "city": "New York",
                          "cityCode": "NYC",
                          "utcOffsetHours": -5
                        }
                      },
                      "airlines": {
                        "B6": {
                          "name": "JetBlue",
                          "feePageUrl": "https://www.jetblue.com/at-the-airport/baggage-information"
                        }
                      },
                      "providers": {
                        "B6": {
                          "name": "JetBlue",
                          "type": "Airline"
                        }
                      }
                    }
                  },
                  "round-trip-itinerary": {
                    "summary": "Round-trip itinerary",
                    "value": {
                      "resultId": "07804f9e1b83425f0e30951ae0c29a9a",
                      "tripInfo": {
                        "tripType": "roundTrip",
                        "isDomestic": false,
                        "isMultiAirport": false
                      },
                      "legs": [
                        {
                          "departure": "2026-12-03T21:15:00",
                          "arrival": "2026-12-04T09:15:00",
                          "duration": 420,
                          "stops": 0,
                          "segments": [
                            {
                              "airline": "AA",
                              "flightNumber": "104",
                              "origin": "JFK",
                              "destination": "LHR",
                              "departure": "2026-12-03T21:15:00",
                              "arrival": "2026-12-04T09:15:00",
                              "duration": 420,
                              "aircraft": "Boeing 787-9 Dreamliner"
                            }
                          ]
                        },
                        {
                          "departure": "2026-12-10T19:20:00",
                          "arrival": "2026-12-10T22:25:00",
                          "duration": 485,
                          "stops": 0,
                          "segments": [
                            {
                              "airline": "AA",
                              "flightNumber": "6942",
                              "origin": "LHR",
                              "destination": "JFK",
                              "departure": "2026-12-10T19:20:00",
                              "arrival": "2026-12-10T22:25:00",
                              "duration": 485,
                              "aircraft": "Boeing 777"
                            }
                          ]
                        }
                      ],
                      "bookingOptions": [
                        {
                          "providerCode": "AA",
                          "providerUrl": "https://www.aa.com/goto/metasearch?\u2026",
                          "providerDomain": "www.aa.com",
                          "price": 830,
                          "currency": "USD",
                          "formattedPrice": "$830",
                          "totalPrice": 1659,
                          "formattedTotalPrice": "$1,659",
                          "bagFees": {
                            "carryOn": {
                              "status": "included",
                              "price": 0,
                              "label": "Included"
                            },
                            "checked": {
                              "firstBag": {
                                "status": "unknown",
                                "price": null
                              },
                              "secondBag": {
                                "status": "unknown",
                                "price": null
                              }
                            },
                            "disclosures": [
                              "Up to 50lbs per bag",
                              "Up to 62in total",
                              "Up to 50lbs per bag"
                            ],
                            "policy": [
                              {
                                "type": "personalItem",
                                "restrictions": {
                                  "dimensions": "Up to 17 x 13 x 7in"
                                }
                              },
                              {
                                "type": "carryOn",
                                "restrictions": {
                                  "dimensions": "Up to 22 x 14 x 9in"
                                }
                              },
                              {
                                "type": "checked",
                                "restrictions": {
                                  "weight": "Up to 50lbs per bag"
                                }
                              }
                            ]
                          },
                          "segmentFares": [
                            {
                              "cabin": "economy",
                              "quality": [
                                {
                                  "type": "aircraft",
                                  "label": "Boeing 787-9 Dreamliner (Wide-body jet)"
                                },
                                {
                                  "type": "wifi",
                                  "label": "Streaming capable Wi-Fi"
                                },
                                {
                                  "type": "entertainment",
                                  "label": "Seatback on-demand video"
                                }
                              ]
                            },
                            {
                              "cabin": "economy",
                              "quality": [
                                {
                                  "type": "aircraft",
                                  "label": "Boeing 777 (Wide-body jet)"
                                },
                                {
                                  "type": "wifi",
                                  "label": "Streaming capable Wi-Fi (fee)"
                                },
                                {
                                  "type": "entertainment",
                                  "label": "Seatback on-demand video"
                                }
                              ]
                            }
                          ],
                          "badges": [
                            "direct",
                            "freeCancellation"
                          ]
                        },
                        {
                          "providerCode": "AA",
                          "providerUrl": "https://www.aa.com/goto/metasearch?\u2026",
                          "providerDomain": "www.aa.com",
                          "price": 1070,
                          "currency": "USD",
                          "formattedPrice": "$1,070",
                          "totalPrice": 2139,
                          "formattedTotalPrice": "$2,139",
                          "bagFees": {
                            "carryOn": {
                              "status": "included",
                              "price": 0,
                              "label": "Included"
                            },
                            "checked": {
                              "firstBag": {
                                "status": "unknown",
                                "price": null
                              },
                              "secondBag": {
                                "status": "unknown",
                                "price": null
                              }
                            },
                            "disclosures": [
                              "Up to 50lbs per bag",
                              "Up to 62in total",
                              "Up to 50lbs per bag"
                            ],
                            "policy": [
                              {
                                "type": "personalItem",
                                "restrictions": {
                                  "dimensions": "Up to 17 x 13 x 7in"
                                }
                              },
                              {
                                "type": "carryOn",
                                "restrictions": {
                                  "dimensions": "Up to 22 x 14 x 9in"
                                }
                              },
                              {
                                "type": "checked",
                                "restrictions": {
                                  "weight": "Up to 50lbs per bag"
                                }
                              }
                            ]
                          },
                          "segmentFares": [
                            {
                              "cabin": "economy",
                              "quality": [
                                {
                                  "type": "aircraft",
                                  "label": "Boeing 787-9 Dreamliner (Wide-body jet)"
                                },
                                {
                                  "type": "wifi",
                                  "label": "Streaming capable Wi-Fi"
                                },
                                {
                                  "type": "entertainment",
                                  "label": "Seatback on-demand video"
                                }
                              ]
                            },
                            {
                              "cabin": "economy",
                              "quality": [
                                {
                                  "type": "aircraft",
                                  "label": "Boeing 777 (Wide-body jet)"
                                },
                                {
                                  "type": "wifi",
                                  "label": "Streaming capable Wi-Fi (fee)"
                                },
                                {
                                  "type": "entertainment",
                                  "label": "Seatback on-demand video"
                                }
                              ]
                            }
                          ],
                          "badges": [
                            "direct",
                            "freeCancellation"
                          ]
                        }
                      ],
                      "fareFamilies": [
                        {
                          "id": "BASIC",
                          "name": "Basic Economy",
                          "cabin": "economy",
                          "price": 830,
                          "formattedPrice": "$830",
                          "amenities": [
                            {
                              "type": "carryOnBag",
                              "restriction": "included",
                              "prices": {
                                "firstBag": 0
                              }
                            },
                            {
                              "type": "checkedBag",
                              "restriction": "fee",
                              "prices": null
                            },
                            {
                              "type": "seatSelection",
                              "restriction": "fee",
                              "prices": null
                            }
                          ]
                        },
                        {
                          "id": "MAIN",
                          "name": "Main Cabin",
                          "cabin": "economy",
                          "price": 1070,
                          "formattedPrice": "$1,070",
                          "amenities": [
                            {
                              "type": "carryOnBag",
                              "restriction": "included",
                              "prices": {
                                "firstBag": 0
                              }
                            },
                            {
                              "type": "checkedBag",
                              "restriction": "unknown",
                              "prices": null
                            },
                            {
                              "type": "seatSelection",
                              "restriction": "included",
                              "prices": null
                            }
                          ]
                        }
                      ],
                      "airports": {
                        "LHR": {
                          "name": "Heathrow",
                          "city": "London",
                          "cityCode": "LON",
                          "utcOffsetHours": 0
                        },
                        "JFK": {
                          "name": "John F Kennedy Intl",
                          "city": "New York",
                          "cityCode": "NYC",
                          "utcOffsetHours": -5
                        }
                      },
                      "airlines": {
                        "AA": {
                          "name": "American Airlines",
                          "feePageUrl": "https://www.aa.com/web/i18n/travel-info/baggage/checked-baggage-policy.html"
                        }
                      },
                      "providers": {
                        "AA": {
                          "name": "American Airlines",
                          "type": "Airline"
                        },
                        "AS": {
                          "name": "Alaska Airlines",
                          "type": "Airline"
                        },
                        "AY": {
                          "name": "Finnair",
                          "type": "Airline"
                        },
                        "IB": {
                          "name": "Iberia",
                          "type": "Airline"
                        },
                        "ASWHISKY": {
                          "name": "Alaska Airlines",
                          "type": "Airline"
                        },
                        "BA": {
                          "name": "British Airways",
                          "type": "Airline"
                        }
                      }
                    }
                  },
                  "multi-city-itinerary": {
                    "summary": "Multi-city itinerary",
                    "value": {
                      "resultId": "84604222a90ff5883c97f139be649c27",
                      "tripInfo": {
                        "tripType": "multiCity",
                        "isDomestic": true,
                        "isMultiAirport": false
                      },
                      "legs": [
                        {
                          "departure": "2026-12-03T17:29:00",
                          "arrival": "2026-12-03T23:12:00",
                          "duration": 523,
                          "stops": 1,
                          "segments": [
                            {
                              "airline": "AS",
                              "flightNumber": "41",
                              "origin": "JFK",
                              "destination": "SFO",
                              "departure": "2026-12-03T17:29:00",
                              "arrival": "2026-12-03T21:05:00",
                              "duration": 396,
                              "aircraft": "Boeing 737 MAX 9"
                            },
                            {
                              "airline": "AS",
                              "flightNumber": "661",
                              "origin": "SFO",
                              "destination": "LAX",
                              "departure": "2026-12-03T21:45:00",
                              "arrival": "2026-12-03T23:12:00",
                              "duration": 87,
                              "aircraft": "Boeing 737-900 (winglets)"
                            }
                          ]
                        },
                        {
                          "departure": "2026-12-10T13:50:00",
                          "arrival": "2026-12-10T15:16:00",
                          "duration": 86,
                          "stops": 0,
                          "segments": [
                            {
                              "airline": "AS",
                              "flightNumber": "465",
                              "origin": "LAX",
                              "destination": "SFO",
                              "departure": "2026-12-10T13:50:00",
                              "arrival": "2026-12-10T15:16:00",
                              "duration": 86,
                              "aircraft": "Boeing 737 MAX 9"
                            }
                          ]
                        },
                        {
                          "departure": "2026-12-17T09:10:00",
                          "arrival": "2026-12-17T22:29:00",
                          "duration": 619,
                          "stops": 1,
                          "segments": [
                            {
                              "airline": "AS",
                              "flightNumber": "3178",
                              "origin": "SFO",
                              "destination": "PSP",
                              "departure": "2026-12-17T09:10:00",
                              "arrival": "2026-12-17T10:51:00",
                              "duration": 101,
                              "aircraft": "Embraer 175"
                            },
                            {
                              "airline": "AS",
                              "flightNumber": "242",
                              "origin": "PSP",
                              "destination": "JFK",
                              "departure": "2026-12-17T14:14:00",
                              "arrival": "2026-12-17T22:29:00",
                              "duration": 315,
                              "aircraft": "Boeing 737-800 (winglets)"
                            }
                          ]
                        }
                      ],
                      "bookingOptions": [
                        {
                          "providerCode": "AS",
                          "providerUrl": "https://www.alaskaair.com/search/cart?\u2026",
                          "providerDomain": "www.alaskaair.com",
                          "price": 463,
                          "currency": "USD",
                          "formattedPrice": "$463",
                          "totalPrice": 463,
                          "formattedTotalPrice": "$463",
                          "bagFees": {
                            "policy": [
                              {
                                "type": "personalItem",
                                "restrictions": {}
                              },
                              {
                                "type": "carryOn",
                                "restrictions": {
                                  "dimensions": "Up to 21 x 13 x 8in"
                                }
                              },
                              {
                                "type": "checked",
                                "restrictions": {
                                  "dimensions": "Up to 62in total"
                                }
                              }
                            ]
                          },
                          "segmentFares": [
                            {
                              "cabin": "economy",
                              "quality": [
                                {
                                  "type": "aircraft",
                                  "label": "Boeing 737 MAX 9 (Narrow-body jet)"
                                },
                                {
                                  "type": "wifi",
                                  "label": "Streaming capable Wi-Fi (fee)"
                                },
                                {
                                  "type": "entertainment",
                                  "label": "Streaming entertainment"
                                }
                              ]
                            },
                            {
                              "cabin": "economy",
                              "quality": [
                                {
                                  "type": "aircraft",
                                  "label": "Boeing 737-900 (winglets) (Narrow-body jet)"
                                },
                                {
                                  "type": "wifi",
                                  "label": "Streaming capable Wi-Fi (fee)"
                                },
                                {
                                  "type": "entertainment",
                                  "label": "Streaming entertainment"
                                }
                              ]
                            },
                            {
                              "cabin": "economy",
                              "quality": [
                                {
                                  "type": "aircraft",
                                  "label": "Boeing 737 MAX 9 (Narrow-body jet)"
                                },
                                {
                                  "type": "wifi",
                                  "label": "Streaming capable Wi-Fi (fee)"
                                },
                                {
                                  "type": "entertainment",
                                  "label": "Streaming entertainment"
                                }
                              ]
                            }
                          ],
                          "badges": [
                            "direct",
                            "freeCancellation"
                          ]
                        },
                        {
                          "providerCode": "AS",
                          "providerUrl": "https://www.alaskaair.com/search/cart?\u2026",
                          "providerDomain": "www.alaskaair.com",
                          "price": 628,
                          "currency": "USD",
                          "formattedPrice": "$628",
                          "totalPrice": 628,
                          "formattedTotalPrice": "$628",
                          "bagFees": {
                            "policy": [
                              {
                                "type": "personalItem",
                                "restrictions": {}
                              },
                              {
                                "type": "carryOn",
                                "restrictions": {
                                  "dimensions": "Up to 21 x 13 x 8in"
                                }
                              },
                              {
                                "type": "checked",
                                "restrictions": {
                                  "dimensions": "Up to 62in total"
                                }
                              }
                            ]
                          },
                          "segmentFares": [
                            {
                              "cabin": "economy",
                              "quality": [
                                {
                                  "type": "aircraft",
                                  "label": "Boeing 737 MAX 9 (Narrow-body jet)"
                                },
                                {
                                  "type": "wifi",
                                  "label": "Wi-Fi available"
                                }
                              ]
                            },
                            {
                              "cabin": "economy",
                              "quality": [
                                {
                                  "type": "aircraft",
                                  "label": "Boeing 737-900 (winglets) (Narrow-body jet)"
                                },
                                {
                                  "type": "wifi",
                                  "label": "Wi-Fi available"
                                }
                              ]
                            },
                            {
                              "cabin": "economy",
                              "quality": [
                                {
                                  "type": "aircraft",
                                  "label": "Boeing 737 MAX 9 (Narrow-body jet)"
                                },
                                {
                                  "type": "wifi",
                                  "label": "Wi-Fi available"
                                }
                              ]
                            }
                          ],
                          "badges": [
                            "direct",
                            "freeCancellation"
                          ]
                        }
                      ],
                      "fareFamilies": [
                        {
                          "id": "SV",
                          "name": "Saver",
                          "cabin": "economy",
                          "price": 463,
                          "formattedPrice": "$463",
                          "amenities": [
                            {
                              "type": "carryOnBag",
                              "restriction": "included",
                              "prices": {
                                "firstBag": 0
                              }
                            },
                            {
                              "type": "checkedBag",
                              "restriction": "fee",
                              "prices": null
                            },
                            {
                              "type": "seatSelection",
                              "restriction": "unavailable",
                              "prices": null
                            }
                          ]
                        },
                        {
                          "id": "MA",
                          "name": "Main",
                          "cabin": "economy",
                          "price": 628,
                          "formattedPrice": "$628",
                          "amenities": [
                            {
                              "type": "carryOnBag",
                              "restriction": "included",
                              "prices": {
                                "firstBag": 0
                              }
                            },
                            {
                              "type": "checkedBag",
                              "restriction": "fee",
                              "prices": null
                            },
                            {
                              "type": "seatSelection",
                              "restriction": "included",
                              "prices": null
                            }
                          ]
                        }
                      ],
                      "airports": {
                        "LAX": {
                          "name": "Los Angeles",
                          "city": "Los Angeles",
                          "cityCode": "LAX",
                          "utcOffsetHours": -8
                        },
                        "PSP": {
                          "name": "Palm Springs",
                          "city": "Palm Springs",
                          "cityCode": "PSP"
                        },
                        "SFO": {
                          "name": "San Francisco",
                          "city": "San Francisco",
                          "cityCode": "SFO",
                          "utcOffsetHours": -8
                        },
                        "JFK": {
                          "name": "John F Kennedy Intl",
                          "city": "New York",
                          "cityCode": "NYC",
                          "utcOffsetHours": -5
                        }
                      },
                      "airlines": {
                        "AS": {
                          "name": "Alaska Airlines",
                          "feePageUrl": "https://www.alaskaair.com/content/travel-info/policies/baggage-checked.aspx?\u2026"
                        }
                      },
                      "providers": {
                        "AS": {
                          "name": "Alaska Airlines",
                          "type": "Airline"
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Quota-Limit": {
                "$ref": "#/components/headers/X-Quota-Limit"
              },
              "X-Quota-Used": {
                "$ref": "#/components/headers/X-Quota-Used"
              }
            }
          },
          "401": {
            "description": "The API key is missing or not valid. Send a valid key as the `X-API-Key` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "missing_api_key": {
                    "summary": "MISSING_API_KEY",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "MISSING_API_KEY",
                        "message": "API key is required. Pass X-API-Key header."
                      },
                      "data": null
                    }
                  },
                  "invalid_api_key": {
                    "summary": "INVALID_API_KEY",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "INVALID_API_KEY",
                        "message": "Invalid API key."
                      },
                      "data": null
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit (`RATE_LIMIT_EXCEEDED`) or monthly quota (`QUOTA_EXCEEDED`) reached, or a temporary block after repeated failed authentication. Wait for `Retry-After` seconds before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "rate_limit_exceeded": {
                    "summary": "RATE_LIMIT_EXCEEDED",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "RATE_LIMIT_EXCEEDED",
                        "message": "Too many requests. Retry after 2s."
                      },
                      "data": null
                    }
                  },
                  "quota_exceeded": {
                    "summary": "QUOTA_EXCEEDED",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "QUOTA_EXCEEDED",
                        "message": "Monthly quota of 100 requests exhausted for the free plan. The quota is shared across every key on the account. Upgrade or wait for the next cycle."
                      },
                      "data": null
                    }
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              }
            }
          },
          "400": {
            "description": "The request is malformed. `error.code` says why and `error.param` names the field to fix. Fix the request; retrying it unchanged will fail again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "invalid_search_token": {
                    "summary": "INVALID_SEARCH_TOKEN",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "INVALID_SEARCH_TOKEN",
                        "message": "The pagination token is not valid. Use the nextToken returned by a search.",
                        "param": "token"
                      },
                      "data": null
                    }
                  }
                }
              }
            }
          },
          "410": {
            "description": "`SEARCH_EXPIRED`: the search token was valid and has expired (60 minutes). Start a new search; retrying this one will not help.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "search_expired": {
                    "summary": "SEARCH_EXPIRED",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "SEARCH_EXPIRED",
                        "message": "This search has expired. Start a new search to get current results."
                      },
                      "data": null
                    }
                  }
                }
              }
            }
          },
          "502": {
            "description": "A temporary upstream failure. Retry the same request after a short back-off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "details_failed": {
                    "summary": "DETAILS_FAILED",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "DETAILS_FAILED",
                        "message": "Failed to get flight details. Please try again."
                      },
                      "data": null
                    }
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Full reference on ktemia.com",
          "url": "https://www.ktemia.com/docs/api/flights/details/"
        }
      }
    },
    "/hotels/locations": {
      "get": {
        "tags": [
          "Hotels"
        ],
        "summary": "Search hotel locations by name",
        "description": "Hotel API location lookup in Python, JavaScript, Go, Ruby, Java, and PHP. Turn a city, neighbourhood, or property name into the id a hotel search accepts. cURL included.\n\nFind the location ids a hotel search accepts.\n\nA hotel search takes a location id, not a name. This call turns a city, neighbourhood, landmark, airport, or property name into that id.\n\nSend `X-API-Key` the same way as on every other call. `query` is required. `country` and `locale` default to US and `en`.\n\n### Which id to send\n\nUse `locations[].locationId` as `location` on [Search hotels](https://www.ktemia.com/docs/api/hotels/search/). `29230` is London. A neighbourhood and an airport in the same city have their own ids.\n\nA row with `locationType: hotel` is a specific property. Its `locationId` is still the city, so a search for that id returns the city. Its `hotelId` is what [Hotel reviews](https://www.ktemia.com/docs/api/hotels/reviews/) takes, and it matches `id` on a result from that city.\n\nA query that matches nothing returns `200` with an empty `locations` list. A missing `query`, a blank `query`, a bad `locale`, or an unsupported `country` returns `400`. If the lookup itself fails, the response is `502 LOCATIONS_UNAVAILABLE`.\n\n### Response fields\n\n- `query` (string, required): The query you sent, with surrounding spaces removed.\n- `locations` (array of objects, required): Matching places, best match first. Empty when nothing matches.\n  - `locationId` (string, required): Id to send as `location` on [Search hotels](https://www.ktemia.com/docs/api/hotels/search/). A city, airport, neighbourhood, and a named hotel in that city share this id.\n  - `name` (string, optional): Full display name.\n  - `city` (string, optional): City.\n  - `region` (string, optional): Region or state when the place has one.\n  - `country` (string, optional): Country name.\n  - `countryCode` (string, optional): ISO 3166-1 alpha-2 country code.\n  - `locationType` (string, optional): What this row is: `city`, `airport`, `neighborhood`, `landmark`, or `hotel`.\n  - `lat` (number, optional): Latitude.\n  - `lng` (number, optional): Longitude.\n  - `hotelId` (string, optional): Present when `locationType` is `hotel`. This is the id [Hotel reviews](https://www.ktemia.com/docs/api/hotels/reviews/) takes. It is not a search location.\n\nFull reference, parameters and examples: [Hotels locations reference on ktemia.com](https://www.ktemia.com/docs/api/hotels/locations/)",
        "operationId": "searchHotelLocations",
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 80,
              "description": "City, neighbourhood, landmark, or property name.",
              "title": "Query"
            },
            "description": "City, neighbourhood, landmark, airport, or property name. 1 to 80 characters. A blank value is rejected.",
            "example": "London"
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Market country. Omit for US.",
              "title": "Country"
            },
            "description": "ISO 3166-1 alpha-2 market. Omit it for US. Any other value is rejected. Same set as on a hotel search."
          },
          {
            "name": "locale",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 2,
              "maxLength": 2,
              "description": "Language, for example en.",
              "default": "en",
              "title": "Locale"
            },
            "description": "2-letter language code. Omit it for `en`. Anything that is not two letters is rejected."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {},
                "examples": {
                  "london": {
                    "summary": "London",
                    "value": {
                      "query": "London",
                      "locations": [
                        {
                          "locationId": "29230",
                          "name": "London, England, United Kingdom",
                          "city": "London",
                          "region": "England",
                          "country": "United Kingdom",
                          "countryCode": "GB",
                          "locationType": "city",
                          "lat": 51.49916450106749,
                          "lng": -0.12525865742190945
                        },
                        {
                          "locationId": "174457",
                          "name": "Heathrow, London, England, United Kingdom, (LHR)",
                          "city": "London",
                          "region": "England",
                          "country": "United Kingdom",
                          "countryCode": "GB",
                          "locationType": "airport",
                          "lat": 51.47115,
                          "lng": -0.4564899999999999
                        },
                        {
                          "locationId": "62830",
                          "name": "London, Ontario, Canada",
                          "city": "London",
                          "region": "Ontario",
                          "country": "Canada",
                          "countryCode": "CA",
                          "locationType": "city",
                          "lat": 42.98339,
                          "lng": -81.23304
                        }
                      ]
                    }
                  },
                  "a-named-hotel": {
                    "summary": "A named hotel",
                    "value": {
                      "query": "Hyatt Regency London Olympia",
                      "locations": [
                        {
                          "locationId": "29230",
                          "name": "Hyatt Regency London Olympia, London, England, United Kingdom",
                          "city": "London",
                          "region": "England",
                          "country": "United Kingdom",
                          "countryCode": "GB",
                          "locationType": "hotel",
                          "lat": 51.497593,
                          "lng": -0.210346,
                          "hotelId": "1072956080"
                        }
                      ]
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Quota-Limit": {
                "$ref": "#/components/headers/X-Quota-Limit"
              },
              "X-Quota-Used": {
                "$ref": "#/components/headers/X-Quota-Used"
              }
            }
          },
          "401": {
            "description": "The API key is missing or not valid. Send a valid key as the `X-API-Key` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "missing_api_key": {
                    "summary": "MISSING_API_KEY",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "MISSING_API_KEY",
                        "message": "API key is required. Pass X-API-Key header."
                      },
                      "data": null
                    }
                  },
                  "invalid_api_key": {
                    "summary": "INVALID_API_KEY",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "INVALID_API_KEY",
                        "message": "Invalid API key."
                      },
                      "data": null
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit (`RATE_LIMIT_EXCEEDED`) or monthly quota (`QUOTA_EXCEEDED`) reached, or a temporary block after repeated failed authentication. Wait for `Retry-After` seconds before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "rate_limit_exceeded": {
                    "summary": "RATE_LIMIT_EXCEEDED",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "RATE_LIMIT_EXCEEDED",
                        "message": "Too many requests. Retry after 2s."
                      },
                      "data": null
                    }
                  },
                  "quota_exceeded": {
                    "summary": "QUOTA_EXCEEDED",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "QUOTA_EXCEEDED",
                        "message": "Monthly quota of 100 requests exhausted for the free plan. The quota is shared across every key on the account. Upgrade or wait for the next cycle."
                      },
                      "data": null
                    }
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              }
            }
          },
          "502": {
            "description": "A temporary upstream failure. Retry the same request after a short back-off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "locations_unavailable": {
                    "summary": "LOCATIONS_UNAVAILABLE",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "LOCATIONS_UNAVAILABLE",
                        "message": "Location search is temporarily unavailable."
                      },
                      "data": null
                    }
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Full reference on ktemia.com",
          "url": "https://www.ktemia.com/docs/api/hotels/locations/"
        }
      }
    },
    "/hotels/search": {
      "post": {
        "tags": [
          "Hotels"
        ],
        "summary": "Start a hotel search",
        "description": "Hotel API and stays API in Python, JavaScript, Go, Ruby, Java, and PHP. Start a hotel search for a city and dates. Returns a token, not results. cURL included.\n\nStart a search. Returns a token, not results.\n\nThis call returns a `searchToken`. It does not return hotels. A London weekend usually answers in 8\u201316 seconds while the search settles.\n\n### Country and currency\n\nSend `country` to pick the market. Prices come back in that country\u2019s native currency. `GB` returns GBP, `DE` returns EUR, `US` returns USD. Omit `country` and the market is the US, so prices are USD.\n\nThere is no `currency` field on this call. Sending one is rejected. You cannot ask for US prices in GBP, or UK prices in USD - the country decides the currency.\n\n### Place, dates, guests\n\nSend `location`, `checkin`, and `checkout`. `adults` defaults to 2 and `rooms` defaults to 1. Add `childAges` when children are staying, one age per child.\n\n`location` is an id, not a name. Look it up with [Search locations](https://www.ktemia.com/docs/api/hotels/locations/) and send `locationId`. A stay longer than 30 nights is rejected.\n\n### When there is nothing to page\n\nIf there are no hotels, the call returns `404 NO_RESULTS` and no token. A date further than a year out, or an id that is not a place, is the usual cause.\n\nWhy a stay search is not a Booking.com reservation: [Booking.com API](https://www.ktemia.com/blog/booking-com-api/). The captured London example on this page is the response that post points at.\n\n### Prices from one booking site\n\nSend `providers` to keep only the prices one or more booking sites sell. The \"Only Booking.com\" example on this page is the same London weekend with `providers: [\"Booking.com\"]`. Page 1 came back with 27 hotels, 1,072 in total, and every price was from Booking.com.\n\nThe names to send come from the data, not from a fixed list. Run a search without `providers`, read `availableFilters.bookingSites` on [List results](https://www.ktemia.com/docs/api/hotels/results/), and send the `id` of each site you want. Up to 10. Each entry also has `count`, the number of hotels that site sells in this search.\n\nBooking sites that came back in all 10 cities we tested in November 2026: Booking.com, Expedia, Hotels.com, Priceline, Agoda.com, Trip.com, Super.com, HomeToGo, and Preferred Hotels. Smaller sites such as Homestay.com, Traveluro, Pricetravel, and Prestigia appear in some cities. Coverage changes by place and date, so read `availableFilters.bookingSites` instead of hard-coding the list. Every airline, booking site, and rental company we have seen is on [Providers](https://www.ktemia.com/providers/). Six sites compared on one London weekend, with code: [hotel price API](https://www.ktemia.com/blog/hotel-price-api/). Hotel APIs compared by access, including Booking.com Demand and Expedia Rapid: [best travel API in 2026](https://www.ktemia.com/blog/best-travel-api/).\n\nSeveral of these sites issue no developer key of their own. A **Hotels.com API** is the common one: Hotels.com is an Expedia Group brand and appears on Expedia's Lodging Listings API as a point of sale, where one key is mapped to one point of sale and one brand. Here it is a value you send - `providers: [\"Hotels.com\"]` - on the same search that can also price Booking.com, Agoda.com, or Priceline.\n\nTo compare two sites, send both, for example `[\"Booking.com\", \"Expedia\"]`. `bestOption` on each hotel is then the cheaper of the two, and [Retrieve hotel details](https://www.ktemia.com/docs/api/hotels/details/) lists only those sites, each with its price and booking URL. `availableFilters.bookingSites` still lists every site in the search, so you can switch sites with a new search.\n\n### Response fields\n\n- `searchToken` (string, required): Opaque handle for this search. Pass it to `/hotels/results` for page 1, and to `/hotels/details` with a hotel `id`. Valid for 60 minutes.\n- `expiresIn` (integer, required): Seconds remaining until the token expires, starting at `3600`.\n\n### Retries\n\nRetrying this request is safe: a search creates no booking, reservation or other record. A retried `POST` starts a new search and returns a new `searchToken`; the earlier token stays valid until it expires. Each attempt counts as one API request against your quota. There is no `Idempotency-Key` header, because none is needed. Retry on `429` (after `Retry-After`) and `502`; do not retry `400` unchanged.\n\nFull reference, parameters and examples: [Hotels search reference on ktemia.com](https://www.ktemia.com/docs/api/hotels/search/)",
        "operationId": "searchHotels",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/HotelSearchBody"
              },
              "examples": {
                "london": {
                  "summary": "London",
                  "value": {
                    "location": "29230",
                    "checkin": "2026-12-05",
                    "checkout": "2026-12-07",
                    "adults": 2,
                    "rooms": 1,
                    "childAges": [],
                    "freeCancellation": false,
                    "amenities": [],
                    "providers": [],
                    "sortBy": "bestValue",
                    "sortOrder": "asc"
                  }
                },
                "only-booking-com": {
                  "summary": "Only Booking.com",
                  "value": {
                    "location": "29230",
                    "checkin": "2026-12-05",
                    "checkout": "2026-12-07",
                    "adults": 2,
                    "rooms": 1,
                    "childAges": [],
                    "freeCancellation": false,
                    "amenities": [],
                    "providers": [
                      "Booking.com"
                    ],
                    "sortBy": "bestValue",
                    "sortOrder": "asc"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {},
                "examples": {
                  "london": {
                    "summary": "London",
                    "value": {
                      "searchToken": "eyJwIjoxLCJzIjoiNjgyMmZiMzMyMzA4NDZjNGFiZWRiM2Q2OTRiM2YyNjgiLCJ2IjoxfQ",
                      "expiresIn": 3600
                    }
                  },
                  "only-booking-com": {
                    "summary": "Only Booking.com",
                    "value": {
                      "searchToken": "eyJwIjoxLCJzIjoiNmE2ODZlY2IyMmQyNGFhNjkyOTcxZjZmODg5MjZiN2IiLCJ2IjoxfQ",
                      "expiresIn": 3600
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Quota-Limit": {
                "$ref": "#/components/headers/X-Quota-Limit"
              },
              "X-Quota-Used": {
                "$ref": "#/components/headers/X-Quota-Used"
              }
            }
          },
          "401": {
            "description": "The API key is missing or not valid. Send a valid key as the `X-API-Key` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "missing_api_key": {
                    "summary": "MISSING_API_KEY",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "MISSING_API_KEY",
                        "message": "API key is required. Pass X-API-Key header."
                      },
                      "data": null
                    }
                  },
                  "invalid_api_key": {
                    "summary": "INVALID_API_KEY",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "INVALID_API_KEY",
                        "message": "Invalid API key."
                      },
                      "data": null
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit (`RATE_LIMIT_EXCEEDED`) or monthly quota (`QUOTA_EXCEEDED`) reached, or a temporary block after repeated failed authentication. Wait for `Retry-After` seconds before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "rate_limit_exceeded": {
                    "summary": "RATE_LIMIT_EXCEEDED",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "RATE_LIMIT_EXCEEDED",
                        "message": "Too many requests. Retry after 2s."
                      },
                      "data": null
                    }
                  },
                  "quota_exceeded": {
                    "summary": "QUOTA_EXCEEDED",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "QUOTA_EXCEEDED",
                        "message": "Monthly quota of 100 requests exhausted for the free plan. The quota is shared across every key on the account. Upgrade or wait for the next cycle."
                      },
                      "data": null
                    }
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              }
            }
          },
          "400": {
            "description": "The request is malformed. `error.code` says why and `error.param` names the field to fix. Fix the request; retrying it unchanged will fail again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "invalid_location": {
                    "summary": "INVALID_LOCATION",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "INVALID_LOCATION",
                        "message": "Invalid location. Use GET /hotels/locations to find a valid locationId.",
                        "param": "location"
                      },
                      "data": null
                    }
                  },
                  "checkout_before_checkin": {
                    "summary": "CHECKOUT_BEFORE_CHECKIN",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "CHECKOUT_BEFORE_CHECKIN",
                        "message": "checkout must be at least one night after checkin.",
                        "param": "checkout"
                      },
                      "data": null
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "`NO_RESULTS`: the request is valid but nothing is published for it (no token is returned). `NO_MORE_RESULTS`: the page is past the last one.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "no_results": {
                    "summary": "NO_RESULTS",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "NO_RESULTS",
                        "message": "No stays found for this location on the requested dates."
                      },
                      "data": null
                    }
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Full reference on ktemia.com",
          "url": "https://www.ktemia.com/docs/api/hotels/search/"
        }
      }
    },
    "/hotels/results": {
      "get": {
        "tags": [
          "Hotels"
        ],
        "summary": "List hotel search results",
        "description": "Hotel API results in Python, JavaScript, Go, Ruby, Java, and PHP. Fetch a page of up to 30 hotels, a nextToken, and an exact total. cURL included.\n\nRead a page of a search identified by its token.\n\nPass the `searchToken` from `/hotels/search` as the `token` query parameter to get page 1. Each response that has another page includes `nextToken`. This call usually answers in 2\u20135 seconds.\n\n### What is in a page\n\n`hotels` holds up to 30 properties. Page 1 is often a few short of 30. `bestOption` is the cheapest seller on the before-tax stay price, which is also what `sortBy=price` orders by. `totalPrice` on that option includes taxes.\n\n`availableFilters` describes this search. `minStars`, `minRating`, `maxPrice`, `freeCancellation`, amenity ids, and booking-site ids (as `providers`) can be sent on a new `/hotels/search`. The `id` on a hotel is what `/hotels/details` wants as `resultId`, and what `/hotels/reviews` wants as `hotelId`. Keep the token - details needs it too. Reviews do not.\n\n### Response fields\n\n- `hotels` (array of objects, required): Up to 30 hotels. The first page is often a few short of 30.\n  - `id` (string, required): Hotel id. Pass it as `resultId` to `/hotels/details`, and as `hotelId` to `/hotels/reviews`.\n  - `name` (string, optional): Property name.\n  - `description` (string, optional): Short description when the property publishes one.\n  - `propertyType` (object, optional): What kind of stay this is.\n  - `stars` (number, optional): Star rating. `0` means the property is unrated, not zero stars.\n  - `usesStarRating` (boolean, optional): True when `stars` is a star class rather than an unrated property.\n  - `rating` (object, optional): Guest score.\n  - `location` (object, optional): Where the property is.\n  - `phone` (string, optional): Phone number when the property publishes one.\n  - `image` (string, optional): Representative image URL.\n  - `imageCount` (integer, optional): How many images details can return.\n  - `amenities` (array of strings, optional): Amenity names. The ids you can filter on are in `availableFilters.amenities`.\n  - `badges` (array of objects, optional): Highlights on the property. Each has `type` and `label`.\n  - `highlight` (string, optional): A short callout when the property has one.\n  - `bestOption` (object, optional): The cheapest seller on the before-tax stay price. Details lists every seller.\n  - `optionCount` (integer, optional): How many sellers offered this property.\n  - `usualPrice` (object, optional): A recent higher price for the same stay, when one is published.\n  - `viewRank` (integer, optional): Position of this hotel in the current sort, starting at 0.\n- `page` (integer, required): 1-based page number for the token you sent.\n- `hasMore` (boolean, required): True when another page exists.\n- `expiresIn` (integer, required): Seconds remaining on this search.\n- `totalResults` (integer, optional): How many hotels this search contains.\n- `nextToken` (string, optional): Present when `hasMore` is true. Send it as `token` on the next `/hotels/results` call.\n- `destination` (object, optional): The place this search resolved to. For display. `cityId` here is not the `locationId` you send on a search.\n  - `name` (string, optional): Full place name.\n  - `shortName` (string, optional): Short place name.\n  - `cityId` (string, optional): Display id of the city. Do not send this as `location`.\n  - `country` (string, optional): Country name.\n  - `countryCode` (string, optional): ISO 3166-1 alpha-2 country code.\n- `availableFilters` (object, optional): Facets of this result set. `minStars`, `minRating`, `maxPrice`, `freeCancellation`, `amenities`, and `bookingSites` (as `providers`) can be sent on a new `/hotels/search`. The rest is for display.\n  - `price` (object, optional): Price buckets for the before-tax stay price, in the country\u2019s native currency.\n  - `stars` (object, optional): Star counts. `minStars` on a new search keeps that many stars and above.\n  - `rating` (object, optional): Guest-score buckets. `minRating` takes `6`, `7`, `8`, or `9`.\n  - `amenities` (object, optional): Amenity ids. Send them as `amenities` on a new search.\n  - `freebies` (object, optional): Included extras such as free cancellation.\n  - `propertyType` (object, optional): Property types in this result set. For display.\n  - `bookingSites` (object, optional): Booking sites selling stays in this result set. Send their ids as `providers` on a new search.\n\n### Pagination\n\nCursor-based. Pass the `searchToken` from the search as `token` for page 1. Each page that is not the last includes `nextToken`: send it as `token` for the next page. Flights and cars return 20 results per page; hotels up to 30. `totalResults` is the size of the whole search and `hasMore` is true when another page exists. There are no page numbers. A token is valid for 60 minutes (`410 SEARCH_EXPIRED` after that); a page after the last returns `404 NO_MORE_RESULTS`.\n\nFull reference, parameters and examples: [Hotels results reference on ktemia.com](https://www.ktemia.com/docs/api/hotels/results/)",
        "operationId": "listHotelResults",
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "A searchToken or nextToken.",
              "title": "Token"
            },
            "description": "A `searchToken` from `/hotels/search` for page 1, or a `nextToken` from the previous page. There is no page number to set.",
            "example": "eyJwIjoxLCJzIjoiNjgyMmZiMzMyMzA4NDZjNGFiZWRiM2Q2OTRiM2YyNjgiLCJ2IjoxfQ"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {},
                "examples": {
                  "page-1": {
                    "summary": "Page 1",
                    "value": {
                      "hotels": [
                        {
                          "id": "5782",
                          "name": "Threadneedles Autograph Collection",
                          "description": "Experience refined luxury combined with incredible convenience at our boutique hotel in London. Perfectly situated within the former Victorian City Bank, it features 5-star guest rooms and suites with distinctive, tim...",
                          "propertyType": {
                            "code": "hotel",
                            "name": "Hotel"
                          },
                          "stars": 5,
                          "usesStarRating": true,
                          "rating": {
                            "score": 8.9,
                            "label": "Very good",
                            "reviewCount": 504
                          },
                          "location": {
                            "city": "London",
                            "neighborhood": "City of London",
                            "distance": "2.0 mi",
                            "distanceFrom": "from city center",
                            "lat": 51.51415,
                            "lng": -0.085678
                          },
                          "phone": "+44 207 657 8080",
                          "image": "https://content.r9cdn.net/rimg/himg/1b/39/42/leonardo-5782-3599011-366479.jpg?\u2026",
                          "imageCount": 15,
                          "amenities": [
                            "24hr front desk",
                            "Air-conditioned",
                            "Airport shuttle"
                          ],
                          "badges": [
                            {
                              "type": "freeWifi",
                              "label": "Free WiFi"
                            }
                          ],
                          "highlight": "Near observatory, near station, complimentary mini-bar",
                          "bestOption": {
                            "provider": "Marriott Bonvoy",
                            "price": {
                              "amount": 753,
                              "currency": "USD",
                              "formatted": "$753"
                            },
                            "totalPrice": {
                              "amount": 753,
                              "currency": "USD",
                              "formatted": "$753"
                            },
                            "rateType": "memberOnly",
                            "freebies": null,
                            "taxEstimated": false,
                            "instantBooking": true,
                            "privateDeal": false
                          },
                          "optionCount": 8,
                          "usualPrice": {
                            "amount": 899.15,
                            "currency": "USD",
                            "formatted": "$899"
                          },
                          "viewRank": 0
                        },
                        {
                          "id": "2222365",
                          "name": "Montcalm East, Autograph Collection",
                          "description": "See life in a whole new light at Montcalm East, a standout luxury hotel in Shoreditch, central London. Just a short stroll from Old Street station and close to Liverpool Street, this innovative hotel brings East Londo...",
                          "propertyType": {
                            "code": "hotel",
                            "name": "Hotel"
                          },
                          "stars": 5,
                          "usesStarRating": true,
                          "rating": {
                            "score": 8.8,
                            "label": "Very good",
                            "reviewCount": 4264
                          },
                          "location": {
                            "city": "London",
                            "neighborhood": "Hackney",
                            "distance": "2.5 mi",
                            "distanceFrom": "from city center",
                            "lat": 51.527763,
                            "lng": -0.088972
                          },
                          "phone": "+44 203 837 3000",
                          "image": "https://content.r9cdn.net/rimg/himg/bb/01/77/leonardo-2222365-1447407-933236.jpg?\u2026",
                          "imageCount": 15,
                          "amenities": [
                            "24hr front desk",
                            "Air-conditioned",
                            "Airport shuttle"
                          ],
                          "badges": [
                            {
                              "type": "freeWifi",
                              "label": "Free WiFi"
                            }
                          ],
                          "highlight": "Near park, near station, great stay",
                          "bestOption": {
                            "provider": "Booking.com",
                            "price": {
                              "amount": 600,
                              "currency": "USD",
                              "formatted": "$600"
                            },
                            "totalPrice": {
                              "amount": 720,
                              "currency": "USD",
                              "formatted": "$720"
                            },
                            "rateType": "bestAvailable",
                            "freebies": [
                              "Free cancellation"
                            ],
                            "taxEstimated": false,
                            "instantBooking": true,
                            "privateDeal": false
                          },
                          "optionCount": 7,
                          "usualPrice": {
                            "amount": 622.82,
                            "currency": "USD",
                            "formatted": "$623"
                          },
                          "viewRank": 1
                        }
                      ],
                      "page": 1,
                      "hasMore": true,
                      "expiresIn": 3596,
                      "totalResults": 4687,
                      "nextToken": "eyJwIjoyLCJzIjoiNjgyMmZiMzMyMzA4NDZjNGFiZWRiM2Q2OTRiM2YyNjgiLCJ2IjoxfQ",
                      "destination": {
                        "name": "London, England, United Kingdom",
                        "shortName": "London",
                        "cityId": "28501",
                        "country": "United Kingdom",
                        "countryCode": "GB"
                      },
                      "availableFilters": {
                        "stars": {
                          "options": [
                            {
                              "id": "0",
                              "label": "0+",
                              "count": 4687
                            },
                            {
                              "id": "2",
                              "label": "2",
                              "count": 125
                            },
                            {
                              "id": "3",
                              "label": "3",
                              "count": 481
                            }
                          ],
                          "usesStarRatings": true
                        },
                        "rating": {
                          "options": [
                            {
                              "id": "awful",
                              "label": "0+",
                              "count": 4687
                            },
                            {
                              "id": "okay",
                              "label": "6+",
                              "count": 2783
                            },
                            {
                              "id": "good",
                              "label": "7+",
                              "count": 2390
                            }
                          ]
                        },
                        "freebies": {
                          "options": [
                            {
                              "id": "freeinternet",
                              "label": "Free internet",
                              "count": 3464,
                              "icon": "freeinternet"
                            },
                            {
                              "id": "freecancellation",
                              "label": "Free cancellation",
                              "count": 2239,
                              "icon": "freecancellation"
                            },
                            {
                              "id": "freeparking",
                              "label": "Free parking",
                              "count": 1027,
                              "icon": "freeparking"
                            }
                          ]
                        },
                        "propertyType": {
                          "options": [
                            {
                              "id": "apthotel",
                              "label": "Aparthotel",
                              "count": 76,
                              "parent": "hotels"
                            },
                            {
                              "id": "bb",
                              "label": "Bed & Breakfast",
                              "count": 35,
                              "parent": "hotels"
                            },
                            {
                              "id": "guesthouse",
                              "label": "Guest house",
                              "count": 176,
                              "parent": "hotels"
                            }
                          ]
                        },
                        "amenities": {
                          "options": [
                            {
                              "id": "nosmokerooms",
                              "label": "Non-smoking rooms",
                              "count": 4345,
                              "icon": "smoking-na",
                              "category": "general"
                            },
                            {
                              "id": "wifi",
                              "label": "Wi-Fi",
                              "count": 4116,
                              "icon": "wifi",
                              "category": "internet"
                            },
                            {
                              "id": "hairdryer",
                              "label": "Hairdryer",
                              "count": 3217,
                              "category": "general"
                            }
                          ]
                        },
                        "price": {
                          "values": [
                            30,
                            38,
                            49
                          ],
                          "formattedValues": [
                            "$30",
                            "$38",
                            "$49"
                          ]
                        }
                      }
                    }
                  },
                  "page-2": {
                    "summary": "Page 2",
                    "value": {
                      "hotels": [
                        {
                          "id": "54877",
                          "name": "Holiday Inn Express London - Stratford By IHG",
                          "description": "Welcome to Holiday Inn Express London - Stratford, where smart value meets East London energy. We're a 6-minute walk from Stratford Station, with the Elizabeth Line, DLR, and Central and Jubilee lines putting all of L...",
                          "propertyType": {
                            "code": "hotel",
                            "name": "Hotel"
                          },
                          "stars": 3,
                          "usesStarRating": true,
                          "rating": {
                            "score": 8.8,
                            "label": "Very good",
                            "reviewCount": 7872
                          },
                          "location": {
                            "city": "London",
                            "neighborhood": "Newham",
                            "distance": "5.8 mi",
                            "distanceFrom": "from city center",
                            "lat": 51.53633,
                            "lng": -0.004469
                          },
                          "phone": "+44 20 8536 8000",
                          "image": "https://content.r9cdn.net/rimg/himg/05/19/01/leonardo-54877-202966946-029789.jpg?\u2026",
                          "imageCount": 15,
                          "amenities": [
                            "24hr front desk",
                            "Air-conditioned",
                            "Business center"
                          ],
                          "badges": [
                            {
                              "type": "freeWifi",
                              "label": "Free WiFi"
                            }
                          ],
                          "highlight": "Near theater, good breakfast, good value",
                          "bestOption": {
                            "provider": "Super.com",
                            "price": {
                              "amount": 359,
                              "currency": "USD",
                              "formatted": "$359"
                            },
                            "totalPrice": {
                              "amount": 431,
                              "currency": "USD",
                              "formatted": "$431"
                            },
                            "rateType": "bestAvailable",
                            "freebies": [
                              "Free breakfast"
                            ],
                            "taxEstimated": false,
                            "instantBooking": true,
                            "privateDeal": false
                          },
                          "optionCount": 7,
                          "usualPrice": {
                            "amount": 252.54,
                            "currency": "USD",
                            "formatted": "$253"
                          },
                          "viewRank": 0
                        }
                      ],
                      "page": 2,
                      "hasMore": true,
                      "expiresIn": 3591,
                      "totalResults": 4687,
                      "nextToken": "eyJwIjozLCJzIjoiNjgyMmZiMzMyMzA4NDZjNGFiZWRiM2Q2OTRiM2YyNjgiLCJ2IjoxfQ"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Quota-Limit": {
                "$ref": "#/components/headers/X-Quota-Limit"
              },
              "X-Quota-Used": {
                "$ref": "#/components/headers/X-Quota-Used"
              }
            }
          },
          "401": {
            "description": "The API key is missing or not valid. Send a valid key as the `X-API-Key` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "missing_api_key": {
                    "summary": "MISSING_API_KEY",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "MISSING_API_KEY",
                        "message": "API key is required. Pass X-API-Key header."
                      },
                      "data": null
                    }
                  },
                  "invalid_api_key": {
                    "summary": "INVALID_API_KEY",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "INVALID_API_KEY",
                        "message": "Invalid API key."
                      },
                      "data": null
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit (`RATE_LIMIT_EXCEEDED`) or monthly quota (`QUOTA_EXCEEDED`) reached, or a temporary block after repeated failed authentication. Wait for `Retry-After` seconds before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "rate_limit_exceeded": {
                    "summary": "RATE_LIMIT_EXCEEDED",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "RATE_LIMIT_EXCEEDED",
                        "message": "Too many requests. Retry after 2s."
                      },
                      "data": null
                    }
                  },
                  "quota_exceeded": {
                    "summary": "QUOTA_EXCEEDED",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "QUOTA_EXCEEDED",
                        "message": "Monthly quota of 100 requests exhausted for the free plan. The quota is shared across every key on the account. Upgrade or wait for the next cycle."
                      },
                      "data": null
                    }
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              }
            }
          },
          "400": {
            "description": "The request is malformed. `error.code` says why and `error.param` names the field to fix. Fix the request; retrying it unchanged will fail again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "invalid_search_token": {
                    "summary": "INVALID_SEARCH_TOKEN",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "INVALID_SEARCH_TOKEN",
                        "message": "The pagination token is not valid. Use the nextToken returned by a search.",
                        "param": "token"
                      },
                      "data": null
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "`NO_RESULTS`: the request is valid but nothing is published for it (no token is returned). `NO_MORE_RESULTS`: the page is past the last one.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "no_more_results": {
                    "summary": "NO_MORE_RESULTS",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "NO_MORE_RESULTS",
                        "message": "There are no more results for this search."
                      },
                      "data": null
                    }
                  }
                }
              }
            }
          },
          "410": {
            "description": "`SEARCH_EXPIRED`: the search token was valid and has expired (60 minutes). Start a new search; retrying this one will not help.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "search_expired": {
                    "summary": "SEARCH_EXPIRED",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "SEARCH_EXPIRED",
                        "message": "This search has expired. Start a new search to get current results."
                      },
                      "data": null
                    }
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Full reference on ktemia.com",
          "url": "https://www.ktemia.com/docs/api/hotels/results/"
        },
        "x-pagination": {
          "type": "cursor",
          "cursorParam": "token",
          "nextCursorField": "nextToken",
          "hasMoreField": "hasMore",
          "totalField": "totalResults"
        }
      }
    },
    "/hotels/details": {
      "get": {
        "tags": [
          "Hotels"
        ],
        "summary": "Get every price and booking link for one hotel",
        "description": "Hotel API details in Python, JavaScript, Go, Ruby, Java, and PHP. Expand one hotel into every seller, with a URL that opens that booking site. cURL included.\n\nExpand one hotel into booking options with provider URLs.\n\nQuery parameters are `token` and `resultId`. You do not send the city, dates, or sort again. This call usually answers in 3\u20138 seconds and includes a booking link for each seller that resolved.\n\n### The booking URL\n\n`bookingOptions[].providerUrl` opens the seller\u2019s site with the stay filled in. Open it in a new tab and leave the query string as returned. A `null` URL means that seller did not resolve; the others on the same hotel are still usable.\n\n`reviews.recent` is up to five of the newest guest reviews, on the same 0\u201310 scale as the hotel score. Page through the rest with [Hotel reviews](https://www.ktemia.com/docs/api/hotels/reviews/).\n\n### Response fields\n\n- `resultId` (string, required): The `id` you asked about.\n- `property` (object, optional): The hotel: name, description, stars, rating, amenities, phone.\n  - `name` (string, optional): Property name.\n  - `description` (string, optional): Short description when the property publishes one.\n  - `propertyType` (object, optional): What kind of stay this is.\n  - `stars` (number, optional): Star rating. `0` means the property is unrated.\n  - `usesStarRating` (boolean, optional): True when `stars` is a star class.\n  - `phone` (string, optional): Phone number when the property publishes one.\n  - `rating` (object, optional): Guest score.\n  - `amenities` (array of objects, optional): Amenities, each with `code` and `name`. The `code` is what `amenities` on a new search accepts.\n  - `badges` (array of objects, optional): Highlights. Each has `type` and `label`.\n- `location` (object, optional): Where the property is.\n  - `city` (string, optional): City.\n  - `neighborhood` (string, optional): Neighbourhood when the property publishes one.\n  - `distance` (string, optional): Distance from the reference point, already formatted.\n  - `distanceFrom` (string, optional): What the distance is measured from, for example the city centre.\n  - `lat` (number, optional): Latitude.\n  - `lng` (number, optional): Longitude.\n- `images` (array of objects, optional): Photos. Each has `url`, `thumbnail`, and `category`.\n- `usualPrice` (object, optional): A recent higher price for the same stay, when one is published.\n  - `amount` (number, optional): Numeric amount in the country\u2019s native currency.\n  - `currency` (string, optional): ISO 4217 code of that country\u2019s native currency.\n  - `formatted` (string, optional): Same amount, already formatted for display.\n- `bookingOptions` (array of objects, optional): Every seller for this stay, with a provider URL when it resolved.\n  - `provider` (string, optional): Seller name.\n  - `price` (object, optional): Stay price before taxes.\n  - `totalPrice` (object, optional): Stay price with taxes included.\n  - `rateType` (string, optional): Rate label from the seller.\n  - `roomCode` (string, optional): Room code at the seller, when one is published.\n  - `freebies` (array of strings, optional): Included extras.\n  - `taxEstimated` (boolean, optional): True when the tax portion is an estimate.\n  - `instantBooking` (boolean, optional): True when the seller can confirm immediately.\n  - `directWithProperty` (boolean, optional): True when this option is booked with the property itself.\n  - `privateDeal` (boolean, optional): True when the rate is a private or member deal.\n  - `providerUrl` (string, optional): URL that opens this seller\u2019s site with the stay filled in. `null` when it did not resolve.\n  - `providerDomain` (string, optional): Host of `providerUrl`.\n- `reviews` (object, optional): Guest score plus up to 5 recent reviews. [Hotel reviews](https://www.ktemia.com/docs/api/hotels/reviews/) pages the rest. An empty `recent` means the review call failed; the booking options are still valid.\n  - `score` (number, optional): Guest score on a 0\u201310 scale.\n  - `label` (string, optional): Short label for the score.\n  - `count` (integer, optional): How many reviews the hotel has.\n  - `recent` (array of objects, optional): Up to 5 most recent reviews.\n\nFull reference, parameters and examples: [Hotels details reference on ktemia.com](https://www.ktemia.com/docs/api/hotels/details/)",
        "operationId": "getHotelDetails",
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "A searchToken or nextToken.",
              "title": "Token"
            },
            "description": "Any token of the search that produced the hotel - the original `searchToken` or a later `nextToken`.",
            "example": "eyJwIjoxLCJzIjoiNjgyMmZiMzMyMzA4NDZjNGFiZWRiM2Q2OTRiM2YyNjgiLCJ2IjoxfQ"
          },
          {
            "name": "resultId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 32,
              "description": "The id of a hotel from /hotels/results.",
              "title": "Resultid"
            },
            "description": "The `id` of a hotel from `/hotels/results` for this same token.",
            "example": "5782"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {},
                "examples": {
                  "london-stay": {
                    "summary": "London stay",
                    "value": {
                      "resultId": "5782",
                      "property": {
                        "name": "Threadneedles Autograph Collection",
                        "description": "Experience refined luxury combined with incredible convenience at our boutique hotel in London. Perfectly situated within the former Victorian City Bank, it features 5-star guest rooms and suites with distinctive, tim...",
                        "propertyType": {
                          "code": "hotel",
                          "name": "Hotel"
                        },
                        "stars": 5,
                        "usesStarRating": true,
                        "phone": "+44 207 657 8080",
                        "rating": {
                          "score": 8.9,
                          "label": "Very good",
                          "reviewCount": 504
                        },
                        "amenities": [
                          {
                            "code": "24hfrontdesk",
                            "name": "24hr front desk"
                          },
                          {
                            "code": "ac",
                            "name": "Air-conditioned"
                          },
                          {
                            "code": "shuttle",
                            "name": "Airport shuttle"
                          }
                        ],
                        "badges": [
                          {
                            "type": "freeWifi",
                            "label": "Free WiFi"
                          }
                        ]
                      },
                      "location": {
                        "city": "London",
                        "neighborhood": "City of London",
                        "distance": "2.0 mi",
                        "distanceFrom": "from city center",
                        "lat": 51.51415,
                        "lng": -0.085678
                      },
                      "images": [
                        {
                          "url": "https://content.r9cdn.net/rimg/himg/1b/39/42/leonardo-5782-3599011-366479.jpg?\u2026",
                          "thumbnail": "https://content.r9cdn.net/rimg/himg/1b/39/42/leonardo-5782-3599011-366479.jpg?\u2026",
                          "category": "Lounge"
                        },
                        {
                          "url": "https://content.r9cdn.net/rimg/himg/98/7c/97/leonardo-5782-3599012-556705.jpg?\u2026",
                          "thumbnail": "https://content.r9cdn.net/rimg/himg/98/7c/97/leonardo-5782-3599012-556705.jpg?\u2026",
                          "category": "Lounge"
                        }
                      ],
                      "usualPrice": {
                        "amount": 899.15,
                        "currency": "USD",
                        "formatted": "$899"
                      },
                      "bookingOptions": [
                        {
                          "provider": "Booking.com",
                          "price": {
                            "amount": 760,
                            "currency": "USD",
                            "formatted": "$760"
                          },
                          "totalPrice": {
                            "amount": 904,
                            "currency": "USD",
                            "formatted": "$904"
                          },
                          "rateType": "bestAvailable",
                          "roomCode": "36278308",
                          "freebies": null,
                          "taxEstimated": false,
                          "instantBooking": true,
                          "directWithProperty": false,
                          "privateDeal": false,
                          "providerUrl": "https://www.booking.com/hotel/gb/threadneedles-london.html?\u2026",
                          "providerDomain": "www.booking.com"
                        },
                        {
                          "provider": "Marriott Bonvoy",
                          "price": {
                            "amount": 753,
                            "currency": "USD",
                            "formatted": "$753"
                          },
                          "totalPrice": {
                            "amount": 753,
                            "currency": "USD",
                            "formatted": "$753"
                          },
                          "rateType": "memberOnly",
                          "roomCode": null,
                          "freebies": null,
                          "taxEstimated": false,
                          "instantBooking": true,
                          "directWithProperty": false,
                          "privateDeal": false,
                          "providerUrl": null,
                          "providerDomain": null
                        },
                        {
                          "provider": "Expedia",
                          "price": {
                            "amount": 753,
                            "currency": "USD",
                            "formatted": "$753"
                          },
                          "totalPrice": {
                            "amount": 904,
                            "currency": "USD",
                            "formatted": "$904"
                          },
                          "rateType": "bestAvailable",
                          "roomCode": "200290792",
                          "freebies": null,
                          "taxEstimated": false,
                          "instantBooking": true,
                          "directWithProperty": false,
                          "privateDeal": false,
                          "providerUrl": "https://www.expedia.com/Hotel-Search?\u2026",
                          "providerDomain": "www.expedia.com"
                        }
                      ],
                      "reviews": {
                        "score": 8.9,
                        "label": "Very good",
                        "count": 396,
                        "recent": [
                          {
                            "id": "r7tKjqEBLNjwf3gzyjSF",
                            "score": 10,
                            "label": "Excellent",
                            "date": "2026-10",
                            "author": "Terence",
                            "positive": "Staff went over and above and a beautiful pleace",
                            "negative": "Dining room was dusty and dirts where they sat us in the corner.",
                            "comment": null,
                            "source": "Booking.com",
                            "url": "https://www.booking.com/hotel/gb/threadneedles-london.en.html?\u2026"
                          },
                          {
                            "id": "PMAxRqEB3jszjc9nSern",
                            "score": 10,
                            "label": "Excellent",
                            "date": "2026-10",
                            "author": "Mark",
                            "positive": null,
                            "negative": "nothing",
                            "comment": null,
                            "source": "Booking.com",
                            "url": "https://www.booking.com/hotel/gb/threadneedles-london.en.html?\u2026"
                          }
                        ]
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Quota-Limit": {
                "$ref": "#/components/headers/X-Quota-Limit"
              },
              "X-Quota-Used": {
                "$ref": "#/components/headers/X-Quota-Used"
              }
            }
          },
          "401": {
            "description": "The API key is missing or not valid. Send a valid key as the `X-API-Key` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "missing_api_key": {
                    "summary": "MISSING_API_KEY",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "MISSING_API_KEY",
                        "message": "API key is required. Pass X-API-Key header."
                      },
                      "data": null
                    }
                  },
                  "invalid_api_key": {
                    "summary": "INVALID_API_KEY",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "INVALID_API_KEY",
                        "message": "Invalid API key."
                      },
                      "data": null
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit (`RATE_LIMIT_EXCEEDED`) or monthly quota (`QUOTA_EXCEEDED`) reached, or a temporary block after repeated failed authentication. Wait for `Retry-After` seconds before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "rate_limit_exceeded": {
                    "summary": "RATE_LIMIT_EXCEEDED",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "RATE_LIMIT_EXCEEDED",
                        "message": "Too many requests. Retry after 2s."
                      },
                      "data": null
                    }
                  },
                  "quota_exceeded": {
                    "summary": "QUOTA_EXCEEDED",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "QUOTA_EXCEEDED",
                        "message": "Monthly quota of 100 requests exhausted for the free plan. The quota is shared across every key on the account. Upgrade or wait for the next cycle."
                      },
                      "data": null
                    }
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              }
            }
          },
          "400": {
            "description": "The request is malformed. `error.code` says why and `error.param` names the field to fix. Fix the request; retrying it unchanged will fail again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "invalid_search_token": {
                    "summary": "INVALID_SEARCH_TOKEN",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "INVALID_SEARCH_TOKEN",
                        "message": "The pagination token is not valid. Use the nextToken returned by a search.",
                        "param": "token"
                      },
                      "data": null
                    }
                  }
                }
              }
            }
          },
          "410": {
            "description": "`SEARCH_EXPIRED`: the search token was valid and has expired (60 minutes). Start a new search; retrying this one will not help.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "search_expired": {
                    "summary": "SEARCH_EXPIRED",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "SEARCH_EXPIRED",
                        "message": "This search has expired. Start a new search to get current results."
                      },
                      "data": null
                    }
                  }
                }
              }
            }
          },
          "502": {
            "description": "A temporary upstream failure. Retry the same request after a short back-off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "hotel_details_failed": {
                    "summary": "HOTEL_DETAILS_FAILED",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "HOTEL_DETAILS_FAILED",
                        "message": "Failed to get hotel details. Please try again."
                      },
                      "data": null
                    }
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Full reference on ktemia.com",
          "url": "https://www.ktemia.com/docs/api/hotels/details/"
        }
      }
    },
    "/hotels/reviews": {
      "get": {
        "tags": [
          "Hotels"
        ],
        "summary": "List guest reviews for a hotel",
        "description": "Hotel reviews API in Python, JavaScript, Go, Ruby, Java, and PHP. Page guest reviews for one hotel by date, score, traveller, month, or source. cURL included.\n\nRead a page of guest reviews for one hotel.\n\nThis call needs a hotel id and no search token. The id is `id` on a result, or `hotelId` on a location whose type is `hotel`. Each page has 10 reviews. A hotel with thousands of reviews still answers in under a second.\n\n### Filters\n\n`sortBy` is `recent`, `oldest`, `highestScore`, or `lowestScore`. `travelerTypes` is a comma-separated list of `families`, `couples`, `solo`, `friends`, and `business`. `months` is a comma-separated list of month numbers, `1` through `12`. `sources` is `booking`, `agoda`, `priceline`, or a mix. `search` keeps reviews that mention the text.\n\nAn unknown hotel id returns `200` with `totalReviews: 0` and an empty `reviews` list. A non-numeric id, a bad sort, or a month outside 1\u201312 returns `400` and names the parameter. If the review service itself fails, the response is `502 REVIEWS_UNAVAILABLE`.\n\n### Response fields\n\n- `hotelId` (string, required): The hotel you asked about.\n- `totalReviews` (integer, required): How many reviews match these filters. `0` when the hotel has none, or the id is unknown.\n- `page` (integer, required): The page you asked for.\n- `hasMore` (boolean, required): True when another page of 10 exists.\n- `reviews` (array of objects, required): Up to 10 reviews.\n  - `id` (string, required): Review id.\n  - `score` (number, optional): Score on a 0\u201310 scale, the same scale as `rating.score` on a hotel.\n  - `label` (string, optional): Short label for the score, for example `Excellent`.\n  - `date` (string, optional): Month of the stay, `YYYY-MM`.\n  - `author` (string, optional): Reviewer name, or a generic label when the site withholds it.\n  - `positive` (string, optional): What the guest liked.\n  - `negative` (string, optional): What the guest disliked.\n  - `comment` (string, optional): A single comment when the review is not split into positive and negative.\n  - `source` (string, optional): Site the review was written on, for example `Booking.com`.\n  - `url` (string, optional): That review on the source site. `null` when the source did not publish a link.\n\n### Pagination\n\nPage-based: `page` selects the page, 10 reviews at a time. Reviews do not expire with a search.\n\nFull reference, parameters and examples: [Hotels reviews reference on ktemia.com](https://www.ktemia.com/docs/api/hotels/reviews/)",
        "operationId": "listHotelReviews",
        "parameters": [
          {
            "name": "hotelId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 20,
              "description": "The id of a hotel from /hotels/results.",
              "title": "Hotelid"
            },
            "description": "The `id` of a hotel from `/hotels/results`, or `hotelId` on a location whose `locationType` is `hotel`. Digits only. No search token.",
            "example": "5782"
          },
          {
            "name": "sortBy",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ReviewSort",
              "description": "recent, oldest, highestScore, or lowestScore.",
              "default": "recent"
            },
            "description": "How to order the reviews. Defaults to recent.\n\nAllowed values:\n- `recent`: Default. Newest stay first.\n- `oldest`: Oldest stay first.\n- `highestScore`: Highest score first.\n- `lowestScore`: Lowest score first.",
            "example": "recent"
          },
          {
            "name": "travelerTypes",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 80
                },
                {
                  "type": "null"
                }
              ],
              "description": "Comma-separated: families, couples, solo, friends, business.",
              "title": "Travelertypes"
            },
            "description": "Comma-separated. Keep reviews from these travellers. Any other value is rejected.\n\nAllowed values:\n- `families`: Families.\n- `couples`: Couples.\n- `solo`: Solo travellers.\n- `friends`: Friends.\n- `business`: Business travellers."
          },
          {
            "name": "months",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 40
                },
                {
                  "type": "null"
                }
              ],
              "description": "Comma-separated months of stay, 1-12.",
              "title": "Months"
            },
            "description": "Comma-separated months of the stay, `1` through `12`. `10,11` is October and November. Month names are rejected."
          },
          {
            "name": "sources",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 40
                },
                {
                  "type": "null"
                }
              ],
              "description": "Comma-separated: booking, agoda, priceline.",
              "title": "Sources"
            },
            "description": "Comma-separated sites to read reviews from. Omit it to read all three.\n\nAllowed values:\n- `booking`: Booking.com.\n- `agoda`: Agoda.\n- `priceline`: Priceline."
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 100
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only reviews mentioning this text.",
              "title": "Search"
            },
            "description": "Only reviews that mention this text. Up to 100 characters."
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 1000,
              "minimum": 1,
              "description": "1-based page of 10 reviews.",
              "default": 1,
              "title": "Page"
            },
            "description": "1-based page. Each page has 10 reviews. Defaults to 1."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {},
                "examples": {
                  "recent-reviews": {
                    "summary": "Recent reviews",
                    "value": {
                      "hotelId": "5782",
                      "totalReviews": 396,
                      "page": 1,
                      "hasMore": true,
                      "reviews": [
                        {
                          "id": "r7tKjqEBLNjwf3gzyjSF",
                          "score": 10,
                          "label": "Excellent",
                          "date": "2026-10",
                          "author": "Terence",
                          "positive": "Staff went over and above and a beautiful pleace",
                          "negative": "Dining room was dusty and dirts where they sat us in the corner.",
                          "comment": null,
                          "source": "Booking.com",
                          "url": "https://www.booking.com/hotel/gb/threadneedles-london.en.html?\u2026"
                        },
                        {
                          "id": "PMAxRqEB3jszjc9nSern",
                          "score": 10,
                          "label": "Excellent",
                          "date": "2026-10",
                          "author": "Mark",
                          "positive": null,
                          "negative": "nothing",
                          "comment": null,
                          "source": "Booking.com",
                          "url": "https://www.booking.com/hotel/gb/threadneedles-london.en.html?\u2026"
                        }
                      ]
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Quota-Limit": {
                "$ref": "#/components/headers/X-Quota-Limit"
              },
              "X-Quota-Used": {
                "$ref": "#/components/headers/X-Quota-Used"
              }
            }
          },
          "401": {
            "description": "The API key is missing or not valid. Send a valid key as the `X-API-Key` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "missing_api_key": {
                    "summary": "MISSING_API_KEY",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "MISSING_API_KEY",
                        "message": "API key is required. Pass X-API-Key header."
                      },
                      "data": null
                    }
                  },
                  "invalid_api_key": {
                    "summary": "INVALID_API_KEY",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "INVALID_API_KEY",
                        "message": "Invalid API key."
                      },
                      "data": null
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit (`RATE_LIMIT_EXCEEDED`) or monthly quota (`QUOTA_EXCEEDED`) reached, or a temporary block after repeated failed authentication. Wait for `Retry-After` seconds before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "rate_limit_exceeded": {
                    "summary": "RATE_LIMIT_EXCEEDED",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "RATE_LIMIT_EXCEEDED",
                        "message": "Too many requests. Retry after 2s."
                      },
                      "data": null
                    }
                  },
                  "quota_exceeded": {
                    "summary": "QUOTA_EXCEEDED",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "QUOTA_EXCEEDED",
                        "message": "Monthly quota of 100 requests exhausted for the free plan. The quota is shared across every key on the account. Upgrade or wait for the next cycle."
                      },
                      "data": null
                    }
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              }
            }
          },
          "400": {
            "description": "The request is malformed. `error.code` says why and `error.param` names the field to fix. Fix the request; retrying it unchanged will fail again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "invalid_hotel_id": {
                    "summary": "INVALID_HOTEL_ID",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "INVALID_HOTEL_ID",
                        "message": "hotelId must be the numeric id of a hotel from /hotels/results.",
                        "param": "hotelId"
                      },
                      "data": null
                    }
                  }
                }
              }
            }
          },
          "502": {
            "description": "A temporary upstream failure. Retry the same request after a short back-off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "reviews_unavailable": {
                    "summary": "REVIEWS_UNAVAILABLE",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "REVIEWS_UNAVAILABLE",
                        "message": "Hotel reviews are temporarily unavailable. Please try again."
                      },
                      "data": null
                    }
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Full reference on ktemia.com",
          "url": "https://www.ktemia.com/docs/api/hotels/reviews/"
        },
        "x-pagination": {
          "type": "page",
          "pageParam": "page",
          "pageSize": 10
        }
      }
    },
    "/cars/locations": {
      "get": {
        "tags": [
          "Cars"
        ],
        "summary": "Search car rental pickup locations by name",
        "description": "Car rental API location lookup in Python, JavaScript, Go, Ruby, Java, and PHP. Turn a city or airport name into the id a car hire search accepts. cURL included.\n\nFind the location ids a car search accepts.\n\nPickup and dropoff on a car search are location ids, not names. This call turns a name or a code into the `locationId` you send as `pickupLocation` or `dropoffLocation`.\n\nSend `X-API-Key` the same way as on every other call. `query` is required. `type` defaults to city. `country` and `locale` default to US and `en`.\n\n### Which id to send\n\nUse `locations[].locationId`. A city id is numeric (`22863` is Austin, Texas). An airport id is often the IATA code. The same place can appear twice - once as a city, once as an airport - with the same id.\n\nA query that matches nothing returns `200` with an empty `locations` list. A missing `query`, a blank `query`, a bad `locale`, or an unsupported `country` returns `400`. If the lookup itself fails, the response is `502 LOCATIONS_UNAVAILABLE`.\n\n### Read more\n\nWhat a car rental search API does, and what it does not: [car rental API](https://www.ktemia.com/blog/car-rental-api/). Why one search lists several sellers for the same car: [car rental aggregator API](https://www.ktemia.com/blog/car-rental-aggregator-api/). Car hire APIs, including CarTrawler, compared with the rest: [travel API comparison](https://www.ktemia.com/blog/best-travel-api/).\n\n### Response fields\n\n- `query` (string, required): The query you sent, with surrounding spaces removed.\n- `locations` (array of objects, required): Matching places, best match first. Empty when nothing matches.\n  - `locationId` (string, required): Id to send as `pickupLocation` or `dropoffLocation` on [Search cars](https://www.ktemia.com/docs/api/cars/search/). A city id is numeric. An airport id is often the IATA code.\n  - `name` (string, optional): Full display name.\n  - `city` (string, optional): City.\n  - `country` (string, optional): Country name.\n  - `countryCode` (string, optional): ISO 3166-1 alpha-2 country code.\n  - `locationType` (string, optional): `city` or `airport`.\n  - `airportCode` (string, optional): IATA airport code when this place is tied to an airport.\n  - `timezone` (string, optional): IANA timezone, for example `America/Chicago`.\n\nFull reference, parameters and examples: [Cars locations reference on ktemia.com](https://www.ktemia.com/docs/api/cars/locations/)",
        "operationId": "searchCarLocations",
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 80,
              "description": "City name, airport code, or keyword.",
              "title": "Query"
            },
            "description": "City name, airport name, or code. 1 to 80 characters. A blank value is rejected.",
            "example": "austin"
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/LocationType",
              "description": "city, airport, or all.",
              "default": "city"
            },
            "description": "Which places to return. Defaults to city.\n\nAllowed values:\n- `city`: Default. Cities, and city-level airport matches.\n- `airport`: Airports only.\n- `all`: Cities and airports."
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Market country. Omit for US.",
              "title": "Country"
            },
            "description": "ISO 3166-1 alpha-2 market. Omit it for US. Any other value is rejected. Same set as on a car search."
          },
          {
            "name": "locale",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 2,
              "maxLength": 2,
              "description": "Language, for example en.",
              "default": "en",
              "title": "Locale"
            },
            "description": "2-letter language code. Omit it for `en`. Anything that is not two letters is rejected."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {},
                "examples": {
                  "austin": {
                    "summary": "Austin",
                    "value": {
                      "query": "austin",
                      "locations": [
                        {
                          "locationId": "22863",
                          "name": "Austin, Texas, United States",
                          "city": "Austin",
                          "country": "United States",
                          "countryCode": "US",
                          "locationType": "city",
                          "airportCode": "AUS",
                          "timezone": "America/Chicago"
                        },
                        {
                          "locationId": "22863",
                          "name": "Austin Bergstrom, Austin, Texas, United States, (AUS)",
                          "city": "Austin",
                          "country": "United States",
                          "countryCode": "US",
                          "locationType": "airport",
                          "airportCode": "AUS",
                          "timezone": "America/Chicago"
                        },
                        {
                          "locationId": "34419",
                          "name": "Austin, Minnesota, United States",
                          "city": "Austin",
                          "country": "United States",
                          "countryCode": "US",
                          "locationType": "city",
                          "airportCode": "AUM",
                          "timezone": "America/Chicago"
                        }
                      ]
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Quota-Limit": {
                "$ref": "#/components/headers/X-Quota-Limit"
              },
              "X-Quota-Used": {
                "$ref": "#/components/headers/X-Quota-Used"
              }
            }
          },
          "401": {
            "description": "The API key is missing or not valid. Send a valid key as the `X-API-Key` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "missing_api_key": {
                    "summary": "MISSING_API_KEY",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "MISSING_API_KEY",
                        "message": "API key is required. Pass X-API-Key header."
                      },
                      "data": null
                    }
                  },
                  "invalid_api_key": {
                    "summary": "INVALID_API_KEY",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "INVALID_API_KEY",
                        "message": "Invalid API key."
                      },
                      "data": null
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit (`RATE_LIMIT_EXCEEDED`) or monthly quota (`QUOTA_EXCEEDED`) reached, or a temporary block after repeated failed authentication. Wait for `Retry-After` seconds before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "rate_limit_exceeded": {
                    "summary": "RATE_LIMIT_EXCEEDED",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "RATE_LIMIT_EXCEEDED",
                        "message": "Too many requests. Retry after 2s."
                      },
                      "data": null
                    }
                  },
                  "quota_exceeded": {
                    "summary": "QUOTA_EXCEEDED",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "QUOTA_EXCEEDED",
                        "message": "Monthly quota of 100 requests exhausted for the free plan. The quota is shared across every key on the account. Upgrade or wait for the next cycle."
                      },
                      "data": null
                    }
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              }
            }
          },
          "502": {
            "description": "A temporary upstream failure. Retry the same request after a short back-off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "locations_unavailable": {
                    "summary": "LOCATIONS_UNAVAILABLE",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "LOCATIONS_UNAVAILABLE",
                        "message": "Location search is temporarily unavailable."
                      },
                      "data": null
                    }
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Full reference on ktemia.com",
          "url": "https://www.ktemia.com/docs/api/cars/locations/"
        }
      }
    },
    "/cars/search": {
      "post": {
        "tags": [
          "Cars"
        ],
        "summary": "Start a rental car search",
        "description": "Car rental API, rentals API, and car hire API in Python, JavaScript, Go, Ruby, Java, and PHP. Start a rental cars search for a pickup and dates. Returns a token, not results. cURL included.\n\nStart a search. Returns a token, not results.\n\nThis call returns a `searchToken`. It does not return cars. An Austin week usually answers in 3\u201312 seconds while the search settles.\n\n### Country and currency\n\nSend `country` to pick the market. Prices come back in that country\u2019s native currency. `GB` returns GBP, `DE` returns EUR, `US` returns USD. Omit `country` and the market is the US, so prices are USD.\n\nThere is no `currency` field on this call. Sending one is rejected. You cannot ask for US prices in GBP, or UK prices in USD - the country decides the currency.\n\n### Pickup, dates, times\n\nSend `pickupLocation`, `pickupDate`, and `dropoffDate`. Add `dropoffLocation` only when the car is returned somewhere else. Times default to `12:00`; minutes must be `00` or `30`.\n\n`pickupLocation` is an id, not a name. Look it up with [Search locations](https://www.ktemia.com/docs/api/cars/locations/) and send `locationId`.\n\n### When there is nothing to page\n\nIf there are no cars, the call returns `404 NO_RESULTS` and no token. A date further than a year out, or an id that is not a pickup place, is the usual cause.\n\n### Cars from one booking site or rental company\n\nSend `providers` to keep only the prices one or more booking sites sell, for example `[\"Expedia\"]`. Send `agencies` to keep only the cars of one or more rental companies, for example `[\"avis\"]`, whichever site sells them. At Austin airport, both came back with 20 cars on page 1, every one from Expedia or Avis.\n\nThe ids come from the data. Run a search without a filter, then read `availableFilters.bookingSites` and `availableFilters.agency` on [List results](https://www.ktemia.com/docs/api/cars/results/). Agency ids are lowercase codes such as `hertz` or `enterprise`. Up to 10 of each. [Providers](https://www.ktemia.com/providers/#car-rental-companies) lists every booking site and rental company we have seen, and opens this page with the filter already in the examples.\n\n### Read more\n\nThe compare job for a pickup: [car rental API](https://www.ktemia.com/blog/car-rental-api/). How the same search covers several sellers: [car rental aggregator API](https://www.ktemia.com/blog/car-rental-aggregator-api/). Every car hire and travel API you can get a key for, including CarTrawler: [best car rental and travel APIs in 2026](https://www.ktemia.com/blog/best-travel-api/).\n\n### Response fields\n\n- `searchToken` (string, required): Opaque handle for this search. Pass it to `/cars/results` for page 1, and to `/cars/details` with a car `id`. Valid for 60 minutes.\n- `expiresIn` (integer, required): Seconds remaining until the token expires, starting at `3600`.\n\n### Retries\n\nRetrying this request is safe: a search creates no booking, reservation or other record. A retried `POST` starts a new search and returns a new `searchToken`; the earlier token stays valid until it expires. Each attempt counts as one API request against your quota. There is no `Idempotency-Key` header, because none is needed. Retry on `429` (after `Retry-After`) and `502`; do not retry `400` unchanged.\n\nFull reference, parameters and examples: [Cars search reference on ktemia.com](https://www.ktemia.com/docs/api/cars/search/)",
        "operationId": "searchCars",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CarSearchBody"
              },
              "examples": {
                "austin": {
                  "summary": "Austin",
                  "value": {
                    "pickupLocation": "22863",
                    "pickupDate": "2026-12-05",
                    "dropoffDate": "2026-12-12",
                    "pickupTime": "12:00",
                    "dropoffTime": "12:00",
                    "sortBy": "bestValue",
                    "sortOrder": "asc",
                    "priceMode": "total"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {},
                "examples": {
                  "austin": {
                    "summary": "Austin",
                    "value": {
                      "searchToken": "eyJwIjoxLCJzIjoiMzY5Yjc0Yzc0NDI1NGYxYThjMWIyNGQ3NjgxMmZjMWUiLCJ2IjoxfQ",
                      "expiresIn": 3600
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Quota-Limit": {
                "$ref": "#/components/headers/X-Quota-Limit"
              },
              "X-Quota-Used": {
                "$ref": "#/components/headers/X-Quota-Used"
              }
            }
          },
          "401": {
            "description": "The API key is missing or not valid. Send a valid key as the `X-API-Key` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "missing_api_key": {
                    "summary": "MISSING_API_KEY",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "MISSING_API_KEY",
                        "message": "API key is required. Pass X-API-Key header."
                      },
                      "data": null
                    }
                  },
                  "invalid_api_key": {
                    "summary": "INVALID_API_KEY",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "INVALID_API_KEY",
                        "message": "Invalid API key."
                      },
                      "data": null
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit (`RATE_LIMIT_EXCEEDED`) or monthly quota (`QUOTA_EXCEEDED`) reached, or a temporary block after repeated failed authentication. Wait for `Retry-After` seconds before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "rate_limit_exceeded": {
                    "summary": "RATE_LIMIT_EXCEEDED",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "RATE_LIMIT_EXCEEDED",
                        "message": "Too many requests. Retry after 2s."
                      },
                      "data": null
                    }
                  },
                  "quota_exceeded": {
                    "summary": "QUOTA_EXCEEDED",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "QUOTA_EXCEEDED",
                        "message": "Monthly quota of 100 requests exhausted for the free plan. The quota is shared across every key on the account. Upgrade or wait for the next cycle."
                      },
                      "data": null
                    }
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              }
            }
          },
          "400": {
            "description": "The request is malformed. `error.code` says why and `error.param` names the field to fix. Fix the request; retrying it unchanged will fail again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "dropoff_before_pickup": {
                    "summary": "DROPOFF_BEFORE_PICKUP",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "DROPOFF_BEFORE_PICKUP",
                        "message": "dropoffDate cannot be before pickupDate.",
                        "param": "dropoffDate"
                      },
                      "data": null
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "`NO_RESULTS`: the request is valid but nothing is published for it (no token is returned). `NO_MORE_RESULTS`: the page is past the last one.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Full reference on ktemia.com",
          "url": "https://www.ktemia.com/docs/api/cars/search/"
        }
      }
    },
    "/cars/results": {
      "get": {
        "tags": [
          "Cars"
        ],
        "summary": "List rental car search results",
        "description": "Car rental API and rentals API results in Python, JavaScript, Go, Ruby, Java, and PHP. Fetch a page of 20 cars, a nextToken, and an exact total. cURL included.\n\nRead a page of a search identified by its token.\n\nPass the `searchToken` from `/cars/search` as the `token` query parameter to get page 1. Each response that has another page includes `nextToken`. This call usually answers in 1\u20134 seconds.\n\n### What is in a page\n\n`cars` is at most 20 vehicles. `bookingOptions` lists each seller and price. `availableFilters` describes this search; `carClass`, `transmission`, booking-site ids (as `providers`), and agency ids (as `agencies`) can be sent on a new `/cars/search`. `providers` and `agencies` map the codes on this page to display names.\n\nThe `id` on a car is what `/cars/details` wants as `resultId`. Keep the token - details needs it too.\n\n### Read more\n\nWhy one car lists several booking sites: [car rental aggregator API](https://www.ktemia.com/blog/car-rental-aggregator-api/).\n\n### Response fields\n\n- `cars` (array of objects, required): Up to 20 cars.\n  - `id` (string, required): Opaque identifier of this car. Pass it as `resultId` to `/cars/details`.\n  - `car` (object, optional): The vehicle.\n  - `agency` (object, optional): The rental company that owns the car.\n  - `pickup` (object, optional): The pickup desk.\n  - `price` (object, optional): Lowest total price on this car.\n  - `bestOption` (object, optional): The cheapest seller for this car. Details expands every seller.\n  - `bookingOptions` (array of objects, optional): Sellers for this car. Details fills in `providerUrl` on each one.\n  - `optionCount` (integer, optional): How many sellers offered this car.\n  - `badges` (array of objects, optional): Highlights such as a discount label.\n  - `discount` (object, optional): How this price compares with the class average, when published.\n  - `viewRank` (integer, optional): Rank of this car in the search.\n- `page` (integer, required): 1-based page number for the token you sent.\n- `hasMore` (boolean, required): True when another page exists.\n- `expiresIn` (integer, required): Seconds remaining on this search.\n- `totalResults` (integer, optional): How many cars this search contains.\n- `nextToken` (string, optional): Present when `hasMore` is true. Send it as `token` on the next `/cars/results` call.\n- `availableFilters` (object, optional): Facets of this result set. `carClass`, `transmission`, `bookingSites` (as `providers`), and `agency` (as `agencies`) can be sent on a new `/cars/search`. The rest is for display.\n  - `price` (object, optional): Observed price range of the search.\n  - `carClass` (array of objects, optional): Vehicle classes. Send the matching public value as `carClass` on a new search (`small`, `medium`, `large`, `suv`, `van`, `pickup`, `luxury`, `convertible`).\n  - `transmission` (array of objects, optional): Send `automatic` or `manual` as `transmission` on a new search.\n  - `bookingSites` (array of objects, optional): Booking sites selling cars in this search. Send their `id` as `providers` on a new search.\n  - `agency` (array of objects, optional): Rental companies in this search. Send their `id` (for example `avis`) as `agencies` on a new search.\n- `providers` (object, optional): Map of seller code to `{ name }` for the sellers on this page.\n- `agencies` (object, optional): Map of agency code to `{ name }` for the rental companies on this page.\n- `locations` (object, optional): Map of desk `locationId` to the pickup object used by cars on this page.\n\n### Pagination\n\nCursor-based. Pass the `searchToken` from the search as `token` for page 1. Each page that is not the last includes `nextToken`: send it as `token` for the next page. Flights and cars return 20 results per page; hotels up to 30. `totalResults` is the size of the whole search and `hasMore` is true when another page exists. There are no page numbers. A token is valid for 60 minutes (`410 SEARCH_EXPIRED` after that); a page after the last returns `404 NO_MORE_RESULTS`.\n\nFull reference, parameters and examples: [Cars results reference on ktemia.com](https://www.ktemia.com/docs/api/cars/results/)",
        "operationId": "listCarResults",
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "A searchToken or nextToken.",
              "title": "Token"
            },
            "description": "A `searchToken` from `/cars/search` for page 1, or a `nextToken` from the previous page. There is no page number to set.",
            "example": "eyJwIjoxLCJzIjoiMzY5Yjc0Yzc0NDI1NGYxYThjMWIyNGQ3NjgxMmZjMWUiLCJ2IjoxfQ"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {},
                "examples": {
                  "page-1": {
                    "summary": "Page 1",
                    "value": {
                      "cars": [
                        {
                          "id": "34dd91e8d2edaccb35063a37cacca7b4",
                          "car": {
                            "name": "Fiat 500",
                            "class": "Mini",
                            "classGroups": [
                              "small"
                            ],
                            "image": "https://images.turo.com/media/vehicle/images/O8c5O2cuQPGNOpcCRg0D5A.294x196.jpg",
                            "passengers": 4,
                            "bags": 1,
                            "doors": 2,
                            "transmission": "automatic",
                            "airConditioning": true,
                            "fuelType": "Fully electric",
                            "sipCode": "MBAE"
                          },
                          "agency": {
                            "code": "turo",
                            "name": "Turo"
                          },
                          "pickup": {
                            "locationId": "8e52fc9be190248c007d",
                            "type": "NON_AIRPORT",
                            "isAirport": false,
                            "airportCode": null,
                            "address": null,
                            "city": null,
                            "country": "US",
                            "distance": "1.0 mi from city center",
                            "lat": 30.275837633693175,
                            "lng": -97.72940115400951,
                            "rating": {
                              "overall": 4.897200107574463,
                              "label": "okay",
                              "count": 0,
                              "breakdowns": null
                            },
                            "operatingHours": null
                          },
                          "price": {
                            "amount": 184,
                            "currency": "USD",
                            "formatted": "$184"
                          },
                          "bestOption": {
                            "provider": "ITURO",
                            "price": {
                              "amount": 184,
                              "currency": "USD",
                              "formatted": "$184"
                            },
                            "perDay": {
                              "amount": 27,
                              "currency": "USD",
                              "formatted": "$27"
                            },
                            "paymentType": "PREPAY",
                            "freeCancellation": true,
                            "mileage": "1,400 total mi included",
                            "fuelPolicy": "same-to-same"
                          },
                          "bookingOptions": [
                            {
                              "provider": "ITURO",
                              "providerName": "Turo",
                              "price": {
                                "amount": 184,
                                "currency": "USD",
                                "formatted": "$184"
                              },
                              "perDay": {
                                "amount": 27,
                                "currency": "USD",
                                "formatted": "$27"
                              },
                              "paymentType": "PREPAY",
                              "freeCancellation": true
                            }
                          ],
                          "optionCount": 1,
                          "badges": [
                            {
                              "type": "discount",
                              "label": "16% off",
                              "description": null
                            }
                          ],
                          "discount": null,
                          "viewRank": 1
                        },
                        {
                          "id": "2b0173a66e41e77c3658adb6028886f7",
                          "car": {
                            "name": "Nissan Versa",
                            "class": "Compact",
                            "classGroups": [
                              "small"
                            ],
                            "image": "https://content.r9cdn.net/rimg/car-images/generic/34_sedan_gray.png?\u2026",
                            "passengers": 5,
                            "bags": 3,
                            "doors": 4,
                            "transmission": "automatic",
                            "airConditioning": true,
                            "fuelType": "Gas",
                            "sipCode": "CCAR"
                          },
                          "agency": {
                            "code": "europcar",
                            "name": "Europcar"
                          },
                          "pickup": {
                            "locationId": "20015907",
                            "type": "IN_TERMINAL",
                            "isAirport": true,
                            "airportCode": "AUS",
                            "address": "Please Go To Fox Counter",
                            "city": "Austin",
                            "country": "US",
                            "distance": "7.4 mi from city center",
                            "lat": 30.19453,
                            "lng": -97.66987,
                            "rating": {
                              "overall": 6,
                              "label": "good",
                              "count": 6,
                              "breakdowns": null
                            },
                            "operatingHours": null
                          },
                          "price": {
                            "amount": 189,
                            "currency": "USD",
                            "formatted": "$189"
                          },
                          "bestOption": {
                            "provider": "IEUROPCAR",
                            "price": {
                              "amount": 189,
                              "currency": "USD",
                              "formatted": "$189"
                            },
                            "perDay": {
                              "amount": 27,
                              "currency": "USD",
                              "formatted": "$27"
                            },
                            "paymentType": "PREPAY",
                            "freeCancellation": true,
                            "mileage": "Unlimited miles",
                            "fuelPolicy": "full-to-full"
                          },
                          "bookingOptions": [
                            {
                              "provider": "IEUROPCAR",
                              "providerName": "Europcar",
                              "price": {
                                "amount": 189,
                                "currency": "USD",
                                "formatted": "$189"
                              },
                              "perDay": {
                                "amount": 27,
                                "currency": "USD",
                                "formatted": "$27"
                              },
                              "paymentType": "PREPAY",
                              "freeCancellation": true
                            },
                            {
                              "provider": "IEXPEDIACARAPI",
                              "providerName": "Expedia",
                              "price": {
                                "amount": 256,
                                "currency": "USD",
                                "formatted": "$256"
                              },
                              "perDay": {
                                "amount": 37,
                                "currency": "USD",
                                "formatted": "$37"
                              },
                              "paymentType": "PREPAY",
                              "freeCancellation": true
                            },
                            {
                              "provider": "IEXPEDIACARAPI",
                              "providerName": "Expedia",
                              "price": {
                                "amount": 265,
                                "currency": "USD",
                                "formatted": "$265"
                              },
                              "perDay": {
                                "amount": 38,
                                "currency": "USD",
                                "formatted": "$38"
                              },
                              "paymentType": "PAY_AT_PICKUP",
                              "freeCancellation": true
                            }
                          ],
                          "optionCount": 5,
                          "badges": [
                            {
                              "type": "greatDeal",
                              "label": "38% cheaper",
                              "description": "This offer is 38% cheaper than the average small size car offer ($305)"
                            }
                          ],
                          "discount": {
                            "percent": 38,
                            "classType": "small",
                            "classAvgPrice": {
                              "amount": 304.98,
                              "currency": "USD",
                              "formatted": "$305"
                            }
                          },
                          "viewRank": 2
                        },
                        {
                          "id": "cd9d6ba5326148f167cee70439f61ea9",
                          "car": {
                            "name": "Ford EcoSport",
                            "class": "Intermediate SUV",
                            "classGroups": [
                              "suv"
                            ],
                            "image": "https://content.r9cdn.net/rimg/car-images/generic/05_suv-small_black.png?\u2026",
                            "passengers": 5,
                            "bags": 3,
                            "doors": 5,
                            "transmission": "automatic",
                            "airConditioning": true,
                            "fuelType": "Gas",
                            "sipCode": "IFAR"
                          },
                          "agency": {
                            "code": "fox",
                            "name": "Fox"
                          },
                          "pickup": {
                            "locationId": "56753",
                            "type": "IN_TERMINAL",
                            "isAirport": true,
                            "airportCode": "AUS",
                            "address": "3819 Presidential Boulevard",
                            "city": "Austin",
                            "country": "US",
                            "distance": "7.1 mi from city center",
                            "lat": 30.19453,
                            "lng": -97.66987,
                            "rating": {
                              "overall": 6.4,
                              "label": "good",
                              "count": 96,
                              "breakdowns": null
                            },
                            "operatingHours": [
                              {
                                "days": "Monday - Sunday",
                                "open": 700,
                                "close": 2359
                              }
                            ]
                          },
                          "price": {
                            "amount": 253,
                            "currency": "USD",
                            "formatted": "$253"
                          },
                          "bestOption": {
                            "provider": "IWISECARS",
                            "price": {
                              "amount": 253,
                              "currency": "USD",
                              "formatted": "$253"
                            },
                            "perDay": {
                              "amount": 37,
                              "currency": "USD",
                              "formatted": "$37"
                            },
                            "paymentType": "PREPAY",
                            "freeCancellation": true,
                            "mileage": "Unlimited miles",
                            "fuelPolicy": "full-to-full"
                          },
                          "bookingOptions": [
                            {
                              "provider": "IWISECARS",
                              "providerName": "Wisecars",
                              "price": {
                                "amount": 253,
                                "currency": "USD",
                                "formatted": "$253"
                              },
                              "perDay": {
                                "amount": 37,
                                "currency": "USD",
                                "formatted": "$37"
                              },
                              "paymentType": "PREPAY",
                              "freeCancellation": true
                            },
                            {
                              "provider": "IAUTOEUROPE",
                              "providerName": "Auto Europe",
                              "price": {
                                "amount": 274,
                                "currency": "USD",
                                "formatted": "$274"
                              },
                              "perDay": {
                                "amount": 40,
                                "currency": "USD",
                                "formatted": "$40"
                              },
                              "paymentType": "PREPAY",
                              "freeCancellation": true
                            },
                            {
                              "provider": "ICARRENTAL8",
                              "providerName": "Car Rental 8",
                              "price": {
                                "amount": 274,
                                "currency": "USD",
                                "formatted": "$274"
                              },
                              "perDay": {
                                "amount": 40,
                                "currency": "USD",
                                "formatted": "$40"
                              },
                              "paymentType": "PREPAY",
                              "freeCancellation": true
                            }
                          ],
                          "optionCount": 9,
                          "badges": null,
                          "discount": null,
                          "viewRank": 12
                        }
                      ],
                      "page": 1,
                      "hasMore": true,
                      "expiresIn": 3598,
                      "totalResults": 932,
                      "nextToken": "eyJwIjoyLCJzIjoiMzY5Yjc0Yzc0NDI1NGYxYThjMWIyNGQ3NjgxMmZjMWUiLCJ2IjoxfQ",
                      "availableFilters": {
                        "price": {
                          "min": 0,
                          "max": 424,
                          "average": {
                            "amount": 437,
                            "currency": "USD",
                            "formatted": "$437"
                          }
                        },
                        "carClass": [
                          {
                            "id": "SMALL",
                            "label": "Small",
                            "minPrice": 184,
                            "count": 131
                          },
                          {
                            "id": "MEDIUM",
                            "label": "Medium",
                            "minPrice": 186,
                            "count": 220
                          },
                          {
                            "id": "LARGE",
                            "label": "Large",
                            "minPrice": 204,
                            "count": 152
                          }
                        ],
                        "transmission": [
                          {
                            "id": "Automatic",
                            "label": "Automatic",
                            "minPrice": 184,
                            "count": 932
                          }
                        ]
                      },
                      "providers": {
                        "IWISECARS": {
                          "code": "IWISECARS",
                          "name": "Wisecars"
                        },
                        "ICARRENTAL8": {
                          "code": "ICARRENTAL8",
                          "name": "Car Rental 8"
                        },
                        "IAUTOEUROPE": {
                          "code": "IAUTOEUROPE",
                          "name": "Auto Europe"
                        },
                        "IEXPEDIACARAPI": {
                          "code": "IEXPEDIACARAPI",
                          "name": "Expedia"
                        },
                        "IAIRPORTRENTALCARS": {
                          "code": "IAIRPORTRENTALCARS",
                          "name": "AirportRentalCars"
                        },
                        "IPRICELINECAR": {
                          "code": "IPRICELINECAR",
                          "name": "Priceline"
                        },
                        "IBOOKINGGROUP": {
                          "code": "IBOOKINGGROUP",
                          "name": "EconomyBookings"
                        },
                        "ITURO": {
                          "code": "ITURO",
                          "name": "Turo"
                        },
                        "IEUROPCAR": {
                          "code": "IEUROPCAR",
                          "name": "Europcar"
                        },
                        "IBOOKINGDOTCOMCAR": {
                          "code": "IBOOKINGDOTCOMCAR",
                          "name": "Booking.com"
                        }
                      },
                      "agencies": {
                        "turo": {
                          "code": "turo",
                          "name": "Turo"
                        },
                        "fox": {
                          "code": "fox",
                          "name": "Fox"
                        },
                        "europcar": {
                          "code": "europcar",
                          "name": "Europcar"
                        }
                      },
                      "locations": {
                        "56753": {
                          "locationId": "56753",
                          "type": "IN_TERMINAL",
                          "isAirport": true,
                          "airportCode": "AUS",
                          "address": "3819 Presidential Boulevard",
                          "city": "Austin",
                          "country": "US",
                          "distance": "7.1 mi from city center",
                          "lat": 30.19453,
                          "lng": -97.66987,
                          "rating": {
                            "overall": 6.4,
                            "label": "good",
                            "count": 96,
                            "breakdowns": [
                              {
                                "type": "comfort",
                                "label": "Comfort",
                                "score": 7.3,
                                "rating": "good"
                              },
                              {
                                "type": "clean",
                                "label": "Cleanliness",
                                "score": 7,
                                "rating": "good"
                              },
                              {
                                "type": "pickupDropoff",
                                "label": "Pick-up/Drop-off",
                                "score": 6.6,
                                "rating": "good"
                              }
                            ]
                          },
                          "operatingHours": [
                            {
                              "days": "Monday - Sunday",
                              "open": 700,
                              "close": 2359
                            }
                          ]
                        },
                        "20015907": {
                          "locationId": "20015907",
                          "type": "IN_TERMINAL",
                          "isAirport": true,
                          "airportCode": "AUS",
                          "address": "Please Go To Fox Counter",
                          "city": "Austin",
                          "country": "US",
                          "distance": "7.4 mi from city center",
                          "lat": 30.19453,
                          "lng": -97.66987,
                          "rating": {
                            "overall": 6,
                            "label": "good",
                            "count": 6,
                            "breakdowns": [
                              {
                                "type": "comfort",
                                "label": "Comfort",
                                "score": 6.6,
                                "rating": "good"
                              },
                              {
                                "type": "clean",
                                "label": "Cleanliness",
                                "score": 7.3,
                                "rating": "good"
                              },
                              {
                                "type": "pickupDropoff",
                                "label": "Pick-up/Drop-off",
                                "score": 6,
                                "rating": "good"
                              }
                            ]
                          },
                          "operatingHours": null
                        },
                        "8e52fc9be190248c007d": {
                          "locationId": "8e52fc9be190248c007d",
                          "type": "NON_AIRPORT",
                          "isAirport": false,
                          "airportCode": null,
                          "address": null,
                          "city": null,
                          "country": "US",
                          "distance": "1.0 mi from city center",
                          "lat": 30.275837633693175,
                          "lng": -97.72940115400951,
                          "rating": {
                            "overall": 4.897200107574463,
                            "label": "okay",
                            "count": 0,
                            "breakdowns": null
                          },
                          "operatingHours": null
                        }
                      }
                    }
                  },
                  "page-2": {
                    "summary": "Page 2",
                    "value": {
                      "cars": [
                        {
                          "id": "7cfcc29dc94e3fcc97f65306e5a20776",
                          "car": {
                            "name": "Volkswagen Atlas",
                            "class": "Standard SUV",
                            "classGroups": [
                              "suv"
                            ],
                            "image": "https://content.r9cdn.net/rimg/car-images/generic/35_suv_large_blue.png?\u2026",
                            "passengers": 5,
                            "bags": 5,
                            "doors": 5,
                            "transmission": "automatic",
                            "airConditioning": true,
                            "fuelType": "Gas",
                            "sipCode": "SFAR"
                          },
                          "agency": {
                            "code": "fox",
                            "name": "Fox"
                          },
                          "pickup": {
                            "locationId": "56753",
                            "type": "IN_TERMINAL",
                            "isAirport": true,
                            "airportCode": "AUS",
                            "address": "3819 Presidential Boulevard",
                            "city": "Austin",
                            "country": "US",
                            "distance": "7.1 mi from city center",
                            "lat": 30.19453,
                            "lng": -97.66987,
                            "rating": {
                              "overall": 6.4,
                              "label": "good",
                              "count": 96,
                              "breakdowns": null
                            },
                            "operatingHours": [
                              {
                                "days": "Monday - Sunday",
                                "open": 700,
                                "close": 2359
                              }
                            ]
                          },
                          "price": {
                            "amount": 253,
                            "currency": "USD",
                            "formatted": "$253"
                          },
                          "bestOption": {
                            "provider": "IWISECARS",
                            "price": {
                              "amount": 253,
                              "currency": "USD",
                              "formatted": "$253"
                            },
                            "perDay": {
                              "amount": 37,
                              "currency": "USD",
                              "formatted": "$37"
                            },
                            "paymentType": "PREPAY",
                            "freeCancellation": true,
                            "mileage": "Unlimited miles",
                            "fuelPolicy": "full-to-full"
                          },
                          "bookingOptions": [
                            {
                              "provider": "IWISECARS",
                              "providerName": "Wisecars",
                              "price": {
                                "amount": 253,
                                "currency": "USD",
                                "formatted": "$253"
                              },
                              "perDay": {
                                "amount": 37,
                                "currency": "USD",
                                "formatted": "$37"
                              },
                              "paymentType": "PREPAY",
                              "freeCancellation": true
                            },
                            {
                              "provider": "IAUTOEUROPE",
                              "providerName": "Auto Europe",
                              "price": {
                                "amount": 274,
                                "currency": "USD",
                                "formatted": "$274"
                              },
                              "perDay": {
                                "amount": 40,
                                "currency": "USD",
                                "formatted": "$40"
                              },
                              "paymentType": "PREPAY",
                              "freeCancellation": true
                            },
                            {
                              "provider": "ICARRENTAL8",
                              "providerName": "Car Rental 8",
                              "price": {
                                "amount": 274,
                                "currency": "USD",
                                "formatted": "$274"
                              },
                              "perDay": {
                                "amount": 40,
                                "currency": "USD",
                                "formatted": "$40"
                              },
                              "paymentType": "PREPAY",
                              "freeCancellation": true
                            }
                          ],
                          "optionCount": 8,
                          "badges": null,
                          "discount": null,
                          "viewRank": 1
                        }
                      ],
                      "page": 2,
                      "hasMore": true,
                      "expiresIn": 3594,
                      "totalResults": 932,
                      "nextToken": "eyJwIjozLCJzIjoiMzY5Yjc0Yzc0NDI1NGYxYThjMWIyNGQ3NjgxMmZjMWUiLCJ2IjoxfQ",
                      "availableFilters": {
                        "price": {
                          "min": 0,
                          "max": 424,
                          "average": {
                            "amount": 437,
                            "currency": "USD",
                            "formatted": "$437"
                          }
                        },
                        "carClass": [
                          {
                            "id": "SMALL",
                            "label": "Small",
                            "minPrice": 184,
                            "count": 131
                          },
                          {
                            "id": "MEDIUM",
                            "label": "Medium",
                            "minPrice": 186,
                            "count": 220
                          },
                          {
                            "id": "LARGE",
                            "label": "Large",
                            "minPrice": 204,
                            "count": 152
                          }
                        ],
                        "transmission": [
                          {
                            "id": "Automatic",
                            "label": "Automatic",
                            "minPrice": 184,
                            "count": 932
                          }
                        ]
                      },
                      "providers": {
                        "IAIRPORTRENTALCARS": {
                          "code": "IAIRPORTRENTALCARS",
                          "name": "AirportRentalCars"
                        },
                        "IPRICELINECAR": {
                          "code": "IPRICELINECAR",
                          "name": "Priceline"
                        },
                        "IBOOKINGDOTCOMCAR": {
                          "code": "IBOOKINGDOTCOMCAR",
                          "name": "Booking.com"
                        },
                        "IWISECARS": {
                          "code": "IWISECARS",
                          "name": "Wisecars"
                        },
                        "ICARRENTAL8": {
                          "code": "ICARRENTAL8",
                          "name": "Car Rental 8"
                        },
                        "IAUTOEUROPE": {
                          "code": "IAUTOEUROPE",
                          "name": "Auto Europe"
                        },
                        "IEXPEDIACARAPI": {
                          "code": "IEXPEDIACARAPI",
                          "name": "Expedia"
                        }
                      },
                      "agencies": {
                        "fox": {
                          "code": "fox",
                          "name": "Fox"
                        }
                      },
                      "locations": {
                        "56753": {
                          "locationId": "56753",
                          "type": "IN_TERMINAL",
                          "isAirport": true,
                          "airportCode": "AUS",
                          "address": "3819 Presidential Boulevard",
                          "city": "Austin",
                          "country": "US",
                          "distance": "7.1 mi from city center",
                          "lat": 30.19453,
                          "lng": -97.66987,
                          "rating": {
                            "overall": 6.4,
                            "label": "good",
                            "count": 96,
                            "breakdowns": [
                              {
                                "type": "comfort",
                                "label": "Comfort",
                                "score": 7.3,
                                "rating": "good"
                              },
                              {
                                "type": "clean",
                                "label": "Cleanliness",
                                "score": 7,
                                "rating": "good"
                              },
                              {
                                "type": "pickupDropoff",
                                "label": "Pick-up/Drop-off",
                                "score": 6.6,
                                "rating": "good"
                              }
                            ]
                          },
                          "operatingHours": [
                            {
                              "days": "Monday - Sunday",
                              "open": 700,
                              "close": 2359
                            }
                          ]
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Quota-Limit": {
                "$ref": "#/components/headers/X-Quota-Limit"
              },
              "X-Quota-Used": {
                "$ref": "#/components/headers/X-Quota-Used"
              }
            }
          },
          "401": {
            "description": "The API key is missing or not valid. Send a valid key as the `X-API-Key` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "missing_api_key": {
                    "summary": "MISSING_API_KEY",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "MISSING_API_KEY",
                        "message": "API key is required. Pass X-API-Key header."
                      },
                      "data": null
                    }
                  },
                  "invalid_api_key": {
                    "summary": "INVALID_API_KEY",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "INVALID_API_KEY",
                        "message": "Invalid API key."
                      },
                      "data": null
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit (`RATE_LIMIT_EXCEEDED`) or monthly quota (`QUOTA_EXCEEDED`) reached, or a temporary block after repeated failed authentication. Wait for `Retry-After` seconds before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "rate_limit_exceeded": {
                    "summary": "RATE_LIMIT_EXCEEDED",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "RATE_LIMIT_EXCEEDED",
                        "message": "Too many requests. Retry after 2s."
                      },
                      "data": null
                    }
                  },
                  "quota_exceeded": {
                    "summary": "QUOTA_EXCEEDED",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "QUOTA_EXCEEDED",
                        "message": "Monthly quota of 100 requests exhausted for the free plan. The quota is shared across every key on the account. Upgrade or wait for the next cycle."
                      },
                      "data": null
                    }
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              }
            }
          },
          "400": {
            "description": "The request is malformed. `error.code` says why and `error.param` names the field to fix. Fix the request; retrying it unchanged will fail again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "invalid_search_token": {
                    "summary": "INVALID_SEARCH_TOKEN",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "INVALID_SEARCH_TOKEN",
                        "message": "The pagination token is not valid. Use the nextToken returned by a search.",
                        "param": "token"
                      },
                      "data": null
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "`NO_RESULTS`: the request is valid but nothing is published for it (no token is returned). `NO_MORE_RESULTS`: the page is past the last one.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "no_more_results": {
                    "summary": "NO_MORE_RESULTS",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "NO_MORE_RESULTS",
                        "message": "There are no more results for this search."
                      },
                      "data": null
                    }
                  }
                }
              }
            }
          },
          "410": {
            "description": "`SEARCH_EXPIRED`: the search token was valid and has expired (60 minutes). Start a new search; retrying this one will not help.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "search_expired": {
                    "summary": "SEARCH_EXPIRED",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "SEARCH_EXPIRED",
                        "message": "This search has expired. Start a new search to get current results."
                      },
                      "data": null
                    }
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Full reference on ktemia.com",
          "url": "https://www.ktemia.com/docs/api/cars/results/"
        },
        "x-pagination": {
          "type": "cursor",
          "cursorParam": "token",
          "nextCursorField": "nextToken",
          "hasMoreField": "hasMore",
          "totalField": "totalResults"
        }
      }
    },
    "/cars/details": {
      "get": {
        "tags": [
          "Cars"
        ],
        "summary": "Get every price and booking link for one rental car",
        "description": "Car hire API details in Python, JavaScript, Go, Ruby, Java, and PHP. Expand one car into every seller, with a URL that opens that booking site. cURL included.\n\nExpand one car into booking options with provider URLs.\n\nQuery parameters are `token` and `resultId`. You do not send the location, dates, or sort again. This call usually answers in 2\u20135 seconds and includes a booking link for each seller that resolved.\n\n### The booking URL\n\n`bookingOptions[].providerUrl` opens the seller\u2019s site with the hire filled in. Open it in a new tab and leave the query string as returned. A `null` URL means that seller did not resolve; the others on the same car are still usable.\n\n### Read more\n\nWhy details hands off to the seller instead of booking: [GDS vs booking engine vs a search API](https://www.ktemia.com/blog/search-api-vs-gds-booking-engine/). The compare job: [car rental API](https://www.ktemia.com/blog/car-rental-api/).\n\n### Response fields\n\n- `resultId` (string, required): The `id` you asked about.\n- `car` (object, optional): The vehicle.\n  - `name` (string, optional): Vehicle name as listed, for example `Nissan Versa`.\n  - `class` (string, optional): Display class, for example `Compact` or `Intermediate SUV`.\n  - `classGroups` (array of strings, optional): Groups this car belongs to, such as `small` or `suv`. Matches `carClass` on a new search.\n  - `image` (string, optional): Image URL.\n  - `passengers` (integer, optional): Seat count.\n  - `bags` (integer, optional): Bag count.\n  - `doors` (integer, optional): Door count.\n  - `transmission` (string, optional): `automatic` or `manual`.\n  - `airConditioning` (boolean, optional): True when the car has air conditioning.\n  - `fuelType` (string, optional): Fuel label, for example `Gas` or `Fully electric`.\n  - `sipCode` (string, optional): ACRISS / SIP code when the supplier publishes one.\n- `agency` (object, optional): The rental company.\n- `pickup` (object, optional): The pickup desk.\n  - `locationId` (string, optional): Desk id. Different from the city id you sent as `pickupLocation`.\n  - `type` (string, optional): Desk type, for example `IN_TERMINAL` or `NON_AIRPORT`.\n  - `isAirport` (boolean, optional): True when the desk is at an airport.\n  - `airportCode` (string, optional): IATA airport code when `isAirport` is true.\n  - `address` (string, optional): Street address when the supplier publishes one.\n  - `city` (string, optional): City of the desk.\n  - `country` (string, optional): ISO 3166-1 alpha-2 country code.\n  - `distance` (string, optional): Distance from the city centre, already formatted.\n  - `lat` (number, optional): Latitude.\n  - `lng` (number, optional): Longitude.\n  - `rating` (object, optional): Desk reviews.\n  - `operatingHours` (array of objects, optional): Opening hours. `open` and `close` are `HHMM` integers, for example `730` is 07:30.\n- `bookingOptions` (array of objects, optional): Every seller for this car, with a provider URL when it resolved.\n  - `provider` (object, optional): The seller.\n  - `providerUrl` (string, optional): Booking link on the seller\u2019s site. Open it as returned. Null when the seller did not resolve.\n  - `providerDomain` (string, optional): Host of `providerUrl`.\n  - `price` (object, optional): Displayed price.\n  - `perDay` (object, optional): Average daily price.\n  - `totalPrice` (object, optional): Total for the hire.\n  - `paymentType` (string, optional): `PREPAY` or `PAY_AT_PICKUP`.\n  - `requiresCreditCard` (boolean, optional): True when the seller asks for a card at booking.\n  - `cancellation` (object, optional): Cancellation terms.\n  - `mileage` (object, optional): Mileage allowance.\n  - `fuel` (object, optional): Fuel policy.\n  - `insurance` (array of objects, optional): Insurance extras when the seller lists them.\n  - `extras` (object, optional): Flags such as contactless pickup or a free additional driver.\n  - `knownFees` (array of objects, optional): Fees that are not in the total, such as a security deposit.\n  - `vehicle` (object, optional): The vehicle this seller is quoting.\n\nFull reference, parameters and examples: [Cars details reference on ktemia.com](https://www.ktemia.com/docs/api/cars/details/)",
        "operationId": "getCarDetails",
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "A searchToken or nextToken.",
              "title": "Token"
            },
            "description": "Any token of the search that produced the car - the original `searchToken` or a later `nextToken`.",
            "example": "eyJwIjoxLCJzIjoiMzY5Yjc0Yzc0NDI1NGYxYThjMWIyNGQ3NjgxMmZjMWUiLCJ2IjoxfQ"
          },
          {
            "name": "resultId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "The id of a car from /cars/results.",
              "title": "Resultid"
            },
            "description": "The `id` of a car from `/cars/results` for this same token.",
            "example": "cd9d6ba5326148f167cee70439f61ea9"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {},
                "examples": {
                  "austin-hire": {
                    "summary": "Austin hire",
                    "value": {
                      "resultId": "cd9d6ba5326148f167cee70439f61ea9",
                      "car": {
                        "name": "Ford EcoSport",
                        "class": "Intermediate SUV",
                        "classGroups": [
                          "suv"
                        ],
                        "image": "https://content.r9cdn.net/rimg/car-images/generic/05_suv-small_black.png?\u2026"
                      },
                      "agency": {
                        "code": "fox",
                        "name": "Fox"
                      },
                      "pickup": {
                        "locationId": "56753",
                        "type": "IN_TERMINAL",
                        "isAirport": true,
                        "airportCode": "AUS",
                        "address": "3819 Presidential Boulevard",
                        "city": "Austin",
                        "country": "US",
                        "distance": "7.1 mi from city center",
                        "lat": 30.19453,
                        "lng": -97.66987,
                        "rating": {
                          "overall": 6.4,
                          "label": "good",
                          "count": 96,
                          "breakdowns": null
                        },
                        "operatingHours": [
                          {
                            "days": "Monday - Sunday",
                            "open": 700,
                            "close": 2359
                          }
                        ]
                      },
                      "bookingOptions": [
                        {
                          "provider": {
                            "code": "IWISECARS",
                            "name": "Wisecars",
                            "site": "wisecars.com"
                          },
                          "price": {
                            "amount": 253,
                            "currency": "USD",
                            "formatted": "$253"
                          },
                          "perDay": {
                            "amount": 37,
                            "currency": "USD",
                            "formatted": "$37"
                          },
                          "totalPrice": {
                            "amount": 253,
                            "currency": "USD",
                            "formatted": "$253"
                          },
                          "paymentType": "PREPAY",
                          "requiresCreditCard": false,
                          "cancellation": {
                            "policyType": "FREE_POSSIBLE",
                            "free": true,
                            "limitHours": null,
                            "fee": null,
                            "summary": [
                              "Cancel for free up to 48 hours before pick-up.",
                              "If you cancel within 48 hours of pick-up, a fee applies."
                            ]
                          },
                          "mileage": {
                            "type": "unlimited",
                            "limit": "Unlimited miles",
                            "detail": "Your rental includes unlimited free miles"
                          },
                          "fuel": {
                            "code": "FULL_TO_FULL",
                            "name": "full-to-full",
                            "description": "Pick up and drop off the car with a full tank"
                          },
                          "insurance": null,
                          "extras": {
                            "contactless": false,
                            "enhancedCleaning": false,
                            "freeAdditionalDriver": false,
                            "hiddenCharges": false
                          },
                          "knownFees": [
                            {
                              "type": "securityDeposit",
                              "status": "amountKnown",
                              "amount": {
                                "amount": 150,
                                "currency": "USD",
                                "formatted": "$150"
                              },
                              "included": false
                            }
                          ],
                          "badges": [
                            {
                              "type": "freeCancellation",
                              "label": "Free Cancellation"
                            }
                          ],
                          "displayBadges": null,
                          "vehicle": {
                            "name": "Ford EcoSport",
                            "class": "Intermediate SUV",
                            "doors": 5,
                            "bags": 3,
                            "passengers": 5,
                            "transmission": "automatic",
                            "airConditioning": true,
                            "fuelType": "Gas",
                            "sipCode": "IFAR"
                          },
                          "providerUrl": "https://www.wisecars.com/en-us/results/?\u2026",
                          "providerDomain": "www.wisecars.com"
                        },
                        {
                          "provider": {
                            "code": "IAUTOEUROPE",
                            "name": "Auto Europe",
                            "site": "autoeurope.com"
                          },
                          "price": {
                            "amount": 274,
                            "currency": "USD",
                            "formatted": "$274"
                          },
                          "perDay": {
                            "amount": 40,
                            "currency": "USD",
                            "formatted": "$40"
                          },
                          "totalPrice": {
                            "amount": 274,
                            "currency": "USD",
                            "formatted": "$274"
                          },
                          "paymentType": "PREPAY",
                          "requiresCreditCard": false,
                          "cancellation": {
                            "policyType": "FREE_POSSIBLE",
                            "free": true,
                            "limitHours": null,
                            "fee": null,
                            "summary": [
                              "Cancel for free up to 48 hours before pick-up.",
                              "If you cancel within 48 hours of pick-up, a fee applies."
                            ]
                          },
                          "mileage": {
                            "type": "unlimited",
                            "limit": "Unlimited miles",
                            "detail": "Your rental includes unlimited free miles"
                          },
                          "fuel": {
                            "code": "FULL_TO_FULL",
                            "name": "full-to-full",
                            "description": "Pick up and drop off the car with a full tank"
                          },
                          "insurance": null,
                          "extras": {
                            "contactless": false,
                            "enhancedCleaning": false,
                            "freeAdditionalDriver": false,
                            "hiddenCharges": false
                          },
                          "knownFees": [
                            {
                              "type": "securityDeposit",
                              "status": "amountKnown",
                              "amount": {
                                "amount": 150,
                                "currency": "USD",
                                "formatted": "$150"
                              },
                              "included": false
                            }
                          ],
                          "badges": [
                            {
                              "type": "freeCancellation",
                              "label": "Free Cancellation"
                            }
                          ],
                          "displayBadges": null,
                          "vehicle": {
                            "name": "Ford EcoSport",
                            "class": "Intermediate SUV",
                            "doors": 5,
                            "bags": 3,
                            "passengers": 5,
                            "transmission": "automatic",
                            "airConditioning": true,
                            "fuelType": "Gas",
                            "sipCode": "IFAR"
                          },
                          "providerUrl": "https://book.autoeurope.com/en-us/options?\u2026",
                          "providerDomain": "book.autoeurope.com"
                        },
                        {
                          "provider": {
                            "code": "ICARRENTAL8",
                            "name": "Car Rental 8",
                            "site": "carrental8.com"
                          },
                          "price": {
                            "amount": 274,
                            "currency": "USD",
                            "formatted": "$274"
                          },
                          "perDay": {
                            "amount": 40,
                            "currency": "USD",
                            "formatted": "$40"
                          },
                          "totalPrice": {
                            "amount": 274,
                            "currency": "USD",
                            "formatted": "$274"
                          },
                          "paymentType": "PREPAY",
                          "requiresCreditCard": false,
                          "cancellation": {
                            "policyType": "FREE_POSSIBLE",
                            "free": true,
                            "limitHours": null,
                            "fee": null,
                            "summary": [
                              "Cancel for free up to 48 hours before pick-up.",
                              "If you cancel within 48 hours of pick-up, a fee applies."
                            ]
                          },
                          "mileage": {
                            "type": "unlimited",
                            "limit": "Unlimited miles",
                            "detail": "Your rental includes unlimited free miles"
                          },
                          "fuel": {
                            "code": "FULL_TO_FULL",
                            "name": "full-to-full",
                            "description": "Pick up and drop off the car with a full tank"
                          },
                          "insurance": null,
                          "extras": {
                            "contactless": false,
                            "enhancedCleaning": false,
                            "freeAdditionalDriver": false,
                            "hiddenCharges": false
                          },
                          "knownFees": [
                            {
                              "type": "securityDeposit",
                              "status": "amountKnown",
                              "amount": {
                                "amount": 150,
                                "currency": "USD",
                                "formatted": "$150"
                              },
                              "included": false
                            }
                          ],
                          "badges": [
                            {
                              "type": "freeCancellation",
                              "label": "Free Cancellation"
                            }
                          ],
                          "displayBadges": null,
                          "vehicle": {
                            "name": "Ford EcoSport",
                            "class": "Intermediate SUV",
                            "doors": 5,
                            "bags": 3,
                            "passengers": 5,
                            "transmission": "automatic",
                            "airConditioning": true,
                            "fuelType": "Gas",
                            "sipCode": "IFAR"
                          },
                          "providerUrl": "https://www.carrental8.com/en-us/bookings/create?\u2026",
                          "providerDomain": "www.carrental8.com"
                        }
                      ]
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Quota-Limit": {
                "$ref": "#/components/headers/X-Quota-Limit"
              },
              "X-Quota-Used": {
                "$ref": "#/components/headers/X-Quota-Used"
              }
            }
          },
          "401": {
            "description": "The API key is missing or not valid. Send a valid key as the `X-API-Key` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "missing_api_key": {
                    "summary": "MISSING_API_KEY",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "MISSING_API_KEY",
                        "message": "API key is required. Pass X-API-Key header."
                      },
                      "data": null
                    }
                  },
                  "invalid_api_key": {
                    "summary": "INVALID_API_KEY",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "INVALID_API_KEY",
                        "message": "Invalid API key."
                      },
                      "data": null
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit (`RATE_LIMIT_EXCEEDED`) or monthly quota (`QUOTA_EXCEEDED`) reached, or a temporary block after repeated failed authentication. Wait for `Retry-After` seconds before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "rate_limit_exceeded": {
                    "summary": "RATE_LIMIT_EXCEEDED",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "RATE_LIMIT_EXCEEDED",
                        "message": "Too many requests. Retry after 2s."
                      },
                      "data": null
                    }
                  },
                  "quota_exceeded": {
                    "summary": "QUOTA_EXCEEDED",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "QUOTA_EXCEEDED",
                        "message": "Monthly quota of 100 requests exhausted for the free plan. The quota is shared across every key on the account. Upgrade or wait for the next cycle."
                      },
                      "data": null
                    }
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              }
            }
          },
          "400": {
            "description": "The request is malformed. `error.code` says why and `error.param` names the field to fix. Fix the request; retrying it unchanged will fail again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "invalid_search_token": {
                    "summary": "INVALID_SEARCH_TOKEN",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "INVALID_SEARCH_TOKEN",
                        "message": "The pagination token is not valid. Use the nextToken returned by a search.",
                        "param": "token"
                      },
                      "data": null
                    }
                  }
                }
              }
            }
          },
          "410": {
            "description": "`SEARCH_EXPIRED`: the search token was valid and has expired (60 minutes). Start a new search; retrying this one will not help.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "search_expired": {
                    "summary": "SEARCH_EXPIRED",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "SEARCH_EXPIRED",
                        "message": "This search has expired. Start a new search to get current results."
                      },
                      "data": null
                    }
                  }
                }
              }
            }
          },
          "502": {
            "description": "A temporary upstream failure. Retry the same request after a short back-off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "car_details_failed": {
                    "summary": "CAR_DETAILS_FAILED",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "CAR_DETAILS_FAILED",
                        "message": "Failed to get car details. Please try again."
                      },
                      "data": null
                    }
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Full reference on ktemia.com",
          "url": "https://www.ktemia.com/docs/api/cars/details/"
        }
      }
    },
    "/key": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Get the plan, rate limits and remaining quota for your key",
        "description": "Read the plan, rate limits, and remaining monthly quota for an API key. Not metered, so checking costs nothing.\n\nRead the plan, limits, and remaining monthly allowance for your key.\n\nSend `X-API-Key` and nothing else. The response describes that key: its plan, its rate limits, and how much of this month\u2019s allowance is left.\n\nThis is the one endpoint that is **not metered**. Asking what is left does not spend it, and the call keeps working after the quota is gone.\n\n### Why it is free\n\nTwo reasons, both practical. A client that checks its budget before every search would otherwise double what it spends. And a key refused with `429 QUOTA_EXCEEDED` has to stay able to find out why - metering the diagnostic would make it unanswerable at exactly the moment it is needed.\n\nUnmetered is not unlimited. The call still takes a token from the same rate-limit bucket as any other, so polling it in a loop answers `429 RATE_LIMIT_EXCEEDED`. The two 429s mean opposite things: a rate limit is worth retrying after `Retry-After`, a spent quota is not worth retrying at all this month.\n\n### A shared allowance\n\nWhen `usage.scope` is `account`, the number is the whole account\u2019s. Every key you hold spends the same allowance, so minting another key does not buy more requests, and `remaining` is not this key\u2019s alone to spend.\n\n`key` means this key has its own counter, which applies to keys issued outside the dashboard.\n\nNothing is ever reset. The month is part of the record, so `usage.resetsAt` is when a new month starts counting rather than when a counter is cleared.\n\n### What it does not tell you\n\nA key describes itself, not its owner. Whoever holds a key is not necessarily the account holder, because keys get pasted into shared agent configs and CI, so the response carries no email address, no account id, and no list of your other keys.\n\n`key.fingerprint` is a short prefix for telling several keys apart in a log. The key cannot be reconstructed from it.\n\n### Every response carries the same numbers\n\nYou do not need this call to track usage. Every metered response already includes `X-Quota-Limit`, `X-Quota-Used`, `X-RateLimit-Limit`, and `X-RateLimit-Remaining`, so a client can read its budget from work it was doing anyway.\n\nThis endpoint covers the two cases headers cannot: before you have made any call, and after one was refused. Being unmetered, it sets `X-Quota-Limit` but no `X-Quota-Used` - the body carries the authoritative figure.\n\n### Read more\n\nWhat each plan includes: [pricing](https://www.ktemia.com/pricing/). What the error codes mean and which are worth retrying: [Errors](https://www.ktemia.com/docs/api/#errors). How to send the key in the first place: [Authentication](https://www.ktemia.com/docs/api/#authentication).\n\n### Response fields\n\n- `key` (object, optional): The key you authenticated with.\n  - `fingerprint` (string, optional): First 8 characters of the key\u2019s SHA-256 fingerprint. Enough to tell your keys apart in a log. Not a credential, and the key cannot be derived from it.\n  - `status` (string, optional): Always `active` on a successful call. A revoked key is refused with `403 KEY_REVOKED` before it reaches this endpoint.\n  - `createdAt` (string | null, optional): ISO 8601 timestamp of when the key was issued.\n- `plan` (object, optional): The limits this key is subject to.\n  - `name` (string, optional): Plan name: `free`, `pro`, `business`, or `enterprise`.\n  - `monthlyQuota` (integer, optional): Requests included per calendar month. Reflects any custom limit set on the key, so it can differ from the published plan.\n  - `requestsPerSecond` (number, optional): Sustained request rate. Exceeding it answers `429 RATE_LIMIT_EXCEEDED` with `Retry-After`.\n  - `burst` (integer, optional): How many requests can arrive at once before the per-second rate applies. This is the number in `X-RateLimit-Limit`.\n- `usage` (object, optional): Month-to-date consumption and what is left.\n  - `month` (string, optional): The month being reported, as `YYYY-MM` in UTC.\n  - `used` (integer, optional): Requests counted this month. Can exceed `monthlyQuota`, because the request that crosses the limit is itself counted.\n  - `remaining` (integer, optional): `monthlyQuota` minus `used`, floored at 0.\n  - `resetsAt` (string, optional): ISO 8601 timestamp of when the next month starts counting.\n  - `scope` (string, optional): Whose allowance `used` describes.\n- `metered` (boolean, optional): Always `false`. This call does not count against the quota.\n\nFull reference, parameters and examples: [Key status reference on ktemia.com](https://www.ktemia.com/docs/api/key/)",
        "operationId": "getKeyStatus",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {},
                "examples": {
                  "free-key-shared-allowance": {
                    "summary": "Free key, shared allowance",
                    "value": {
                      "key": {
                        "fingerprint": "63505517",
                        "status": "active",
                        "createdAt": "2026-11-02T09:14:00+00:00"
                      },
                      "plan": {
                        "name": "free",
                        "monthlyQuota": 100,
                        "requestsPerSecond": 2,
                        "burst": 5
                      },
                      "usage": {
                        "month": "2026-11",
                        "used": 37,
                        "remaining": 63,
                        "resetsAt": "2026-12-01T00:00:00+00:00",
                        "scope": "account"
                      },
                      "metered": false
                    }
                  },
                  "business-key-own-counter": {
                    "summary": "Business key, own counter",
                    "value": {
                      "key": {
                        "fingerprint": "61dae60c",
                        "status": "active",
                        "createdAt": "2026-09-20T11:03:00+00:00"
                      },
                      "plan": {
                        "name": "business",
                        "monthlyQuota": 250000,
                        "requestsPerSecond": 250,
                        "burst": 500
                      },
                      "usage": {
                        "month": "2026-11",
                        "used": 18402,
                        "remaining": 231598,
                        "resetsAt": "2026-12-01T00:00:00+00:00",
                        "scope": "key"
                      },
                      "metered": false
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Quota-Limit": {
                "$ref": "#/components/headers/X-Quota-Limit"
              }
            }
          },
          "401": {
            "description": "The API key is missing or not valid. Send a valid key as the `X-API-Key` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "missing_api_key": {
                    "summary": "MISSING_API_KEY",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "MISSING_API_KEY",
                        "message": "API key is required. Pass X-API-Key header."
                      },
                      "data": null
                    }
                  },
                  "invalid_api_key": {
                    "summary": "INVALID_API_KEY",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "INVALID_API_KEY",
                        "message": "Invalid API key."
                      },
                      "data": null
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit (`RATE_LIMIT_EXCEEDED`) or monthly quota (`QUOTA_EXCEEDED`) reached, or a temporary block after repeated failed authentication. Wait for `Retry-After` seconds before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "rate_limit_exceeded": {
                    "summary": "RATE_LIMIT_EXCEEDED",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "RATE_LIMIT_EXCEEDED",
                        "message": "Too many requests. Retry after 2s."
                      },
                      "data": null
                    }
                  },
                  "quota_exceeded": {
                    "summary": "QUOTA_EXCEEDED",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "QUOTA_EXCEEDED",
                        "message": "Monthly quota of 100 requests exhausted for the free plan. The quota is shared across every key on the account. Upgrade or wait for the next cycle."
                      },
                      "data": null
                    }
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              }
            }
          },
          "403": {
            "description": "`KEY_REVOKED`: the key exists but has been revoked. Create a new key in the dashboard.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "key_revoked": {
                    "summary": "KEY_REVOKED",
                    "value": {
                      "success": false,
                      "error": {
                        "code": "KEY_REVOKED",
                        "message": "This API key is revoked. Contact support."
                      },
                      "data": null
                    }
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Full reference on ktemia.com",
          "url": "https://www.ktemia.com/docs/api/key/"
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key",
        "description": "Your Ktemia API key. Create one at https://app.ktemia.com. Never send it from browser JavaScript."
      }
    },
    "schemas": {
      "Alliance": {
        "type": "string",
        "enum": [
          "oneworld",
          "skyteam",
          "starAlliance"
        ],
        "title": "Alliance"
      },
      "CabinClass": {
        "type": "string",
        "enum": [
          "economy",
          "premiumEconomy",
          "business",
          "first"
        ],
        "title": "CabinClass"
      },
      "CarClass": {
        "type": "string",
        "enum": [
          "small",
          "medium",
          "large",
          "suv",
          "van",
          "pickup",
          "luxury",
          "convertible"
        ],
        "title": "CarClass"
      },
      "CarSearchBody": {
        "properties": {
          "pickupLocation": {
            "type": "string",
            "maxLength": 32,
            "minLength": 1,
            "title": "Pickuplocation",
            "description": "A `locationId` from [Search locations](https://www.ktemia.com/docs/api/cars/locations/). A name is rejected."
          },
          "dropoffLocation": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 32,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Dropofflocation",
            "description": "A `locationId` when the car is dropped off somewhere else. Omit it for the same place."
          },
          "pickupDate": {
            "type": "string",
            "maxLength": 10,
            "title": "Pickupdate",
            "description": "Pickup date, YYYY-MM-DD. Cannot be in the past. Searches are usually published under a year ahead."
          },
          "dropoffDate": {
            "type": "string",
            "maxLength": 10,
            "title": "Dropoffdate",
            "description": "Dropoff date, YYYY-MM-DD. Cannot be before pickupDate."
          },
          "pickupTime": {
            "type": "string",
            "maxLength": 5,
            "title": "Pickuptime",
            "default": "12:00",
            "description": "Pickup time, `HH:MM`. Minutes must be `00` or `30`. Defaults to `12:00`."
          },
          "dropoffTime": {
            "type": "string",
            "maxLength": 5,
            "title": "Dropofftime",
            "default": "12:00",
            "description": "Dropoff time, `HH:MM`. Minutes must be `00` or `30`. Defaults to `12:00`."
          },
          "driverAge": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 99.0,
                "minimum": 18.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Driverage",
            "description": "Age of the driver, 18\u201399. Omit it to use the supplier default."
          },
          "carClass": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CarClass"
              },
              {
                "type": "null"
              }
            ],
            "description": "Keep only this class. Omit it to allow any class.\n\nAllowed values:\n- `small`: Mini and compact cars.\n- `medium`: Intermediate cars.\n- `large`: Full-size cars.\n- `suv`: SUVs.\n- `van`: Vans and people carriers.\n- `pickup`: Pickup trucks.\n- `luxury`: Luxury cars.\n- `convertible`: Convertibles."
          },
          "transmission": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Transmission"
              },
              {
                "type": "null"
              }
            ],
            "description": "Keep only this gearbox. Omit it to allow either.\n\nAllowed values:\n- `automatic`: Automatic only.\n- `manual`: Manual only."
          },
          "maxPrice": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Maxprice",
            "description": "Highest total price to return, as a whole number in the country\u2019s native currency. Minimum is 1. Omit it for no price cap."
          },
          "providers": {
            "items": {
              "type": "string",
              "maxLength": 512,
              "pattern": "^[^,;=]{1,64}$"
            },
            "type": "array",
            "maxItems": 10,
            "title": "Providers",
            "description": "Keep only prices from these booking sites, for example `[\"Expedia\"]`. Use the `id` values from `availableFilters.bookingSites` on a previous results page. Up to 10. Omit it to allow every seller."
          },
          "agencies": {
            "items": {
              "type": "string",
              "maxLength": 512,
              "pattern": "^[^,;=]{1,64}$"
            },
            "type": "array",
            "maxItems": 10,
            "title": "Agencies",
            "description": "Keep only cars from these rental companies, for example `[\"avis\"]`. Use the `id` values from `availableFilters.agency` on a previous results page. Up to 10. Omit it to allow every agency."
          },
          "sortBy": {
            "$ref": "#/components/schemas/app__cars__models__SortBy",
            "default": "bestValue",
            "description": "How to order the results. Defaults to bestValue.\n\nAllowed values:\n- `bestValue`: Default. Recommended order.\n- `price`: By total price.\n- `rating`: By desk score.\n- `distance`: By distance from the city centre."
          },
          "sortOrder": {
            "$ref": "#/components/schemas/SortOrder",
            "default": "asc",
            "description": "Direction for sortBy. Defaults to asc.\n\nAllowed values:\n- `asc`: Default. Lowest price, highest rating, or nearest desk first.\n- `desc`: The other direction."
          },
          "priceMode": {
            "$ref": "#/components/schemas/PriceMode",
            "default": "total",
            "description": "What `price` shows on each car and booking option. Defaults to total. Either way, every option also carries `perDay`. `maxPrice` always caps the total for the whole hire.\n\nAllowed values:\n- `total`: Default. Price for the whole hire.\n- `perDay`: Average daily price, the same figure as `perDay`."
          },
          "country": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 8
              },
              {
                "type": "null"
              }
            ],
            "title": "Country",
            "description": "ISO 3166-1 alpha-2 market. Prices come back in that country\u2019s native currency - GB returns GBP, DE returns EUR, US returns USD. There is no separate currency field; sending `currency` is rejected. Omit country for US. Any other value is rejected.\n\nAllowed values:\n- `US`: Prices in USD.\n- `GB`: Prices in GBP.\n- `DE`: Prices in EUR.\n- `FR`: Prices in EUR.\n- `ES`: Prices in EUR.\n- `IT`: Prices in EUR.\n- `NL`: Prices in EUR.\n- `BE`: Prices in EUR.\n- `AT`: Prices in EUR.\n- `CH`: Prices in CHF.\n- `IE`: Prices in EUR.\n- `PT`: Prices in EUR.\n- `GR`: Prices in EUR.\n- `PL`: Prices in PLN.\n- `CZ`: Prices in CZK.\n- `RO`: Prices in EUR.\n- `SE`: Prices in SEK.\n- `NO`: Prices in NOK.\n- `DK`: Prices in DKK.\n- `FI`: Prices in EUR.\n- `TR`: Prices in TRY.\n- `AE`: Prices in AED.\n- `SA`: Prices in SAR.\n- `IL`: Prices in ILS.\n- `IN`: Prices in INR.\n- `JP`: Prices in JPY.\n- `KR`: Prices in KRW.\n- `HK`: Prices in HKD.\n- `TW`: Prices in TWD.\n- `SG`: Prices in SGD.\n- `MY`: Prices in MYR.\n- `TH`: Prices in THB.\n- `ID`: Prices in IDR.\n- `PH`: Prices in PHP.\n- `VN`: Prices in VND.\n- `AU`: Prices in AUD.\n- `NZ`: Prices in NZD.\n- `CA`: Prices in CAD.\n- `MX`: Prices in MXN.\n- `BR`: Prices in BRL.\n- `AR`: Prices in ARS.\n- `CL`: Prices in CLP.\n- `CO`: Prices in COP.\n- `PE`: Prices in PEN.\n- `UY`: Prices in USD.\n- `PY`: Prices in USD.\n- `BO`: Prices in USD.\n- `EC`: Prices in USD.\n- `VE`: Prices in USD.\n- `CR`: Prices in USD.\n- `PA`: Prices in USD.\n- `GT`: Prices in USD.\n- `HN`: Prices in USD.\n- `NI`: Prices in USD.\n- `SV`: Prices in USD.\n- `DO`: Prices in USD.\n- `PR`: Prices in USD.\n- `ZA`: Prices in ZAR.\n- `UA`: Prices in UAH."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "pickupLocation",
          "pickupDate",
          "dropoffDate"
        ],
        "title": "CarSearchBody",
        "description": "Start a car search.\n\n``pickupLocation`` is a ``locationId`` from ``GET /cars/locations``, not a\ncity name. Unknown fields are rejected rather than ignored."
      },
      "FlightSearchBody": {
        "properties": {
          "origin": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 8
              },
              {
                "type": "null"
              }
            ],
            "title": "Origin",
            "description": "IATA airport or city code, 3 or 4 letters. Required for a one-way or round trip. Do not send it together with legs. Look the code up with [Search airports](https://www.ktemia.com/docs/api/flights/airports/) and send `code` from that response."
          },
          "destination": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 8
              },
              {
                "type": "null"
              }
            ],
            "title": "Destination",
            "description": "IATA airport or city code. Required when origin is set, and it must be different from origin. Look the code up with [Search airports](https://www.ktemia.com/docs/api/flights/airports/) and send `code` from that response."
          },
          "departureDate": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 10
              },
              {
                "type": "null"
              }
            ],
            "title": "Departuredate",
            "description": "Outbound date, YYYY-MM-DD. Required when origin is set. Cannot be in the past. Schedules are usually published under a year ahead."
          },
          "returnDate": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 10
              },
              {
                "type": "null"
              }
            ],
            "title": "Returndate",
            "description": "Return date, YYYY-MM-DD. Sending it makes the search a round trip. Cannot be before departureDate. Omit it for a one-way."
          },
          "legs": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/TripLeg"
                },
                "type": "array",
                "maxItems": 6
              },
              {
                "type": "null"
              }
            ],
            "title": "Legs",
            "description": "Multi-city trip. Send 2 to 6 legs, in travel order. Do not send origin, destination, departureDate, or returnDate in the same request. One leg is not enough - use the flat fields for a one-way."
          },
          "cabin": {
            "$ref": "#/components/schemas/CabinClass",
            "default": "economy",
            "description": "Which cabin to search. Defaults to economy.\n\nAllowed values:\n- `economy`: Default. Results can include every cabin.\n- `premiumEconomy`: Only premium economy fares.\n- `business`: Only business fares.\n- `first`: Only first fares."
          },
          "passengers": {
            "$ref": "#/components/schemas/Passengers",
            "description": "How many travellers of each fare type. Defaults to one adult. The counts added together must be at least 1 and at most 9."
          },
          "maxStops": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 2.0,
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Maxstops",
            "description": "How many stops to allow. Omit it to allow any number of stops.\n\nAllowed values:\n- `0`: Nonstop only.\n- `1`: At most one stop.\n- `2`: At most two stops."
          },
          "airlines": {
            "anyOf": [
              {
                "items": {
                  "type": "string",
                  "maxLength": 8
                },
                "type": "array",
                "maxItems": 20,
                "minItems": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Airlines",
            "description": "IATA airline codes to keep, 2 characters each, for example [\"B6\", \"DL\"]. Look a name up with [Search airlines](https://www.ktemia.com/docs/api/flights/airlines/) and send `code`. Send 1 to 20 codes. Every itinerary in the results uses only these airlines. Omit it to allow any airline."
          },
          "alliances": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Alliance"
                },
                "type": "array",
                "maxItems": 3,
                "minItems": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Alliances",
            "description": "Alliances to keep. Send one or more. Every itinerary in the results belongs to one of them.\n\nAllowed values:\n- `oneworld`: oneworld carriers only.\n- `skyteam`: SkyTeam carriers only.\n- `starAlliance`: Star Alliance carriers only."
          },
          "maxPrice": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Maxprice",
            "description": "Highest per-person fare to return, as a whole number in the country\u2019s native currency. Minimum is 1. Omit it for no price cap."
          },
          "sortBy": {
            "$ref": "#/components/schemas/app__flights__models__SortBy",
            "default": "bestValue",
            "description": "How to order the results. Defaults to bestValue.\n\nAllowed values:\n- `bestValue`: Default. Recommended order.\n- `price`: By fare.\n- `duration`: By total travel time.\n- `departure`: By departure time.\n- `arrival`: By arrival time."
          },
          "sortOrder": {
            "$ref": "#/components/schemas/SortOrder",
            "default": "asc",
            "description": "Direction for sortBy. Defaults to asc.\n\nAllowed values:\n- `asc`: Default. Lowest price, shortest time, or earliest time first.\n- `desc`: The other direction."
          },
          "country": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 8
              },
              {
                "type": "null"
              }
            ],
            "title": "Country",
            "description": "ISO 3166-1 alpha-2 market. Prices come back in that country\u2019s native currency - GB returns GBP, DE returns EUR, US returns USD. There is no separate currency field; sending `currency` is rejected. Omit country for US. Any other value is rejected.\n\nAllowed values:\n- `US`: Prices in USD.\n- `GB`: Prices in GBP.\n- `DE`: Prices in EUR.\n- `FR`: Prices in EUR.\n- `ES`: Prices in EUR.\n- `IT`: Prices in EUR.\n- `NL`: Prices in EUR.\n- `BE`: Prices in EUR.\n- `AT`: Prices in EUR.\n- `CH`: Prices in CHF.\n- `IE`: Prices in EUR.\n- `PT`: Prices in EUR.\n- `GR`: Prices in EUR.\n- `PL`: Prices in PLN.\n- `CZ`: Prices in CZK.\n- `RO`: Prices in EUR.\n- `SE`: Prices in SEK.\n- `NO`: Prices in NOK.\n- `DK`: Prices in DKK.\n- `FI`: Prices in EUR.\n- `TR`: Prices in TRY.\n- `AE`: Prices in AED.\n- `SA`: Prices in SAR.\n- `IL`: Prices in ILS.\n- `IN`: Prices in INR.\n- `JP`: Prices in JPY.\n- `KR`: Prices in KRW.\n- `HK`: Prices in HKD.\n- `TW`: Prices in TWD.\n- `SG`: Prices in SGD.\n- `MY`: Prices in MYR.\n- `TH`: Prices in THB.\n- `ID`: Prices in IDR.\n- `PH`: Prices in PHP.\n- `VN`: Prices in VND.\n- `AU`: Prices in AUD.\n- `NZ`: Prices in NZD.\n- `CA`: Prices in CAD.\n- `MX`: Prices in MXN.\n- `BR`: Prices in BRL.\n- `AR`: Prices in ARS.\n- `CL`: Prices in CLP.\n- `CO`: Prices in COP.\n- `PE`: Prices in PEN.\n- `UY`: Prices in USD.\n- `PY`: Prices in USD.\n- `BO`: Prices in USD.\n- `EC`: Prices in USD.\n- `VE`: Prices in USD.\n- `CR`: Prices in USD.\n- `PA`: Prices in USD.\n- `GT`: Prices in USD.\n- `HN`: Prices in USD.\n- `NI`: Prices in USD.\n- `SV`: Prices in USD.\n- `DO`: Prices in USD.\n- `PR`: Prices in USD.\n- `ZA`: Prices in ZAR.\n- `UA`: Prices in UAH."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "FlightSearchBody",
        "description": "Start a flight search.\n\nA trip is either flat -- ``origin``, ``destination``, ``departureDate`` and\noptionally ``returnDate`` -- or a ``legs`` list for multi-city. The two are\nmutually exclusive; that rule is checked in the route so it can answer\nwith a named error code rather than a generic validation failure.\n\nUnknown fields are rejected rather than ignored. The previous contract\nused snake_case dates and raw upstream dictionaries, and silently dropping\nthose would turn an old client's filtered search into an unfiltered one."
      },
      "HotelSearchBody": {
        "properties": {
          "location": {
            "type": "string",
            "maxLength": 32,
            "minLength": 1,
            "title": "Location",
            "description": "A `locationId` from [Search locations](https://www.ktemia.com/docs/api/hotels/locations/). A name is rejected. A named hotel\u2019s `locationId` is its city; use `hotelId` only for reviews."
          },
          "checkin": {
            "type": "string",
            "maxLength": 10,
            "title": "Checkin",
            "description": "Check-in date, YYYY-MM-DD. Cannot be in the past. Searches are usually published under a year ahead."
          },
          "checkout": {
            "type": "string",
            "maxLength": 10,
            "title": "Checkout",
            "description": "Check-out date, YYYY-MM-DD. Must be at least one night after check-in, and at most 30 nights later."
          },
          "adults": {
            "type": "integer",
            "maximum": 16.0,
            "minimum": 1.0,
            "title": "Adults",
            "default": 2,
            "description": "Adults, 1\u201316. Defaults to 2."
          },
          "rooms": {
            "type": "integer",
            "maximum": 8.0,
            "minimum": 1.0,
            "title": "Rooms",
            "default": 1,
            "description": "Rooms, 1\u20138. Defaults to 1."
          },
          "childAges": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "maxItems": 8,
            "title": "Childages",
            "description": "Age of each child, 0\u201317. At most 8. Omit it, or send `[]`, when there are no children."
          },
          "minStars": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 5.0,
                "minimum": 2.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Minstars",
            "description": "Keep hotels with at least this many stars. `2` through `5`. Unrated properties are left out."
          },
          "minRating": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 9.0,
                "minimum": 6.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Minrating",
            "description": "Keep hotels with at least this guest score. `6`, `7`, `8`, or `9`."
          },
          "maxPrice": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Maxprice",
            "description": "Highest before-tax stay price, as a whole number in the country\u2019s native currency. Minimum is 1."
          },
          "freeCancellation": {
            "type": "boolean",
            "title": "Freecancellation",
            "default": false,
            "description": "True to keep stays that can be cancelled without a fee. Defaults to false."
          },
          "amenities": {
            "items": {
              "type": "string",
              "maxLength": 512,
              "pattern": "^[A-Za-z0-9_-]{1,32}$"
            },
            "type": "array",
            "maxItems": 10,
            "title": "Amenities",
            "description": "Amenity ids from `availableFilters.amenities` on a previous results page, for example `pool`. Up to 10. Letters, digits, `_`, and `-`."
          },
          "providers": {
            "items": {
              "type": "string",
              "maxLength": 512,
              "pattern": "^[^,;=]{1,64}$"
            },
            "type": "array",
            "maxItems": 10,
            "title": "Providers",
            "description": "Keep only prices from these booking sites, for example `[\"Booking.com\"]`. Use the `id` values from `availableFilters.bookingSites` on a previous results page. Up to 10. Omit it to allow every seller."
          },
          "sortBy": {
            "$ref": "#/components/schemas/app__hotels__models__SortBy",
            "default": "bestValue",
            "description": "How to order the results. Defaults to bestValue.\n\nAllowed values:\n- `bestValue`: Default. Recommended order. `sortOrder` does not change it.\n- `price`: By the before-tax stay price. `asc` is cheapest first, `desc` is dearest first.\n- `rating`: Highest guest score first. `sortOrder` does not change it.\n- `stars`: By star class. `asc` is lowest first, `desc` is highest first.\n- `distance`: Nearest to the reference point first. `sortOrder` does not change it."
          },
          "sortOrder": {
            "$ref": "#/components/schemas/SortOrder",
            "default": "asc",
            "description": "Direction for `price` and `stars`. Defaults to asc. Other sorts ignore it.\n\nAllowed values:\n- `asc`: Default. Cheapest price, or fewest stars, first.\n- `desc`: Dearest price, or most stars, first."
          },
          "country": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 8
              },
              {
                "type": "null"
              }
            ],
            "title": "Country",
            "description": "ISO 3166-1 alpha-2 market. Prices come back in that country\u2019s native currency - GB returns GBP, DE returns EUR, US returns USD. There is no separate currency field; sending `currency` is rejected. Omit country for US. Any other value is rejected.\n\nAllowed values:\n- `US`: Prices in USD.\n- `GB`: Prices in GBP.\n- `DE`: Prices in EUR.\n- `FR`: Prices in EUR.\n- `ES`: Prices in EUR.\n- `IT`: Prices in EUR.\n- `NL`: Prices in EUR.\n- `BE`: Prices in EUR.\n- `AT`: Prices in EUR.\n- `CH`: Prices in CHF.\n- `IE`: Prices in EUR.\n- `PT`: Prices in EUR.\n- `GR`: Prices in EUR.\n- `PL`: Prices in PLN.\n- `CZ`: Prices in CZK.\n- `RO`: Prices in EUR.\n- `SE`: Prices in SEK.\n- `NO`: Prices in NOK.\n- `DK`: Prices in DKK.\n- `FI`: Prices in EUR.\n- `TR`: Prices in TRY.\n- `AE`: Prices in AED.\n- `SA`: Prices in SAR.\n- `IL`: Prices in ILS.\n- `IN`: Prices in INR.\n- `JP`: Prices in JPY.\n- `KR`: Prices in KRW.\n- `HK`: Prices in HKD.\n- `TW`: Prices in TWD.\n- `SG`: Prices in SGD.\n- `MY`: Prices in MYR.\n- `TH`: Prices in THB.\n- `ID`: Prices in IDR.\n- `PH`: Prices in PHP.\n- `VN`: Prices in VND.\n- `AU`: Prices in AUD.\n- `NZ`: Prices in NZD.\n- `CA`: Prices in CAD.\n- `MX`: Prices in MXN.\n- `BR`: Prices in BRL.\n- `AR`: Prices in ARS.\n- `CL`: Prices in CLP.\n- `CO`: Prices in COP.\n- `PE`: Prices in PEN.\n- `UY`: Prices in USD.\n- `PY`: Prices in USD.\n- `BO`: Prices in USD.\n- `EC`: Prices in USD.\n- `VE`: Prices in USD.\n- `CR`: Prices in USD.\n- `PA`: Prices in USD.\n- `GT`: Prices in USD.\n- `HN`: Prices in USD.\n- `NI`: Prices in USD.\n- `SV`: Prices in USD.\n- `DO`: Prices in USD.\n- `PR`: Prices in USD.\n- `ZA`: Prices in ZAR.\n- `UA`: Prices in UAH."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "location",
          "checkin",
          "checkout"
        ],
        "title": "HotelSearchBody",
        "description": "Start a hotel search.\n\n``location`` is a ``locationId`` from ``GET /hotels/locations``. Unknown\nfields are rejected rather than ignored."
      },
      "LocationType": {
        "type": "string",
        "enum": [
          "city",
          "airport",
          "all"
        ],
        "title": "LocationType"
      },
      "Passengers": {
        "properties": {
          "adults": {
            "type": "integer",
            "maximum": 9.0,
            "minimum": 0.0,
            "title": "Adults",
            "description": "Ages 12 and over. Defaults to 1. Each count is 0\u20139, and all counts together must be at least 1 and at most 9. Count seniors, students and youths here.",
            "default": 1
          },
          "children": {
            "type": "integer",
            "maximum": 9.0,
            "minimum": 0.0,
            "title": "Children",
            "description": "Ages 2\u201311. Defaults to 0. Count an infant in their own seat here.",
            "default": 0
          },
          "infantsOnLap": {
            "type": "integer",
            "maximum": 9.0,
            "minimum": 0.0,
            "title": "Infantsonlap",
            "description": "Under 2, on an adult\u2019s lap. Defaults to 0. Cannot be higher than adults.",
            "default": 0
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "Passengers",
        "description": "Traveller counts. Defaults to one adult. Any other field is rejected."
      },
      "PriceMode": {
        "type": "string",
        "enum": [
          "total",
          "perDay"
        ],
        "title": "PriceMode"
      },
      "ReviewSort": {
        "type": "string",
        "enum": [
          "recent",
          "oldest",
          "highestScore",
          "lowestScore"
        ],
        "title": "ReviewSort"
      },
      "SortOrder": {
        "type": "string",
        "enum": [
          "asc",
          "desc"
        ],
        "title": "SortOrder"
      },
      "Transmission": {
        "type": "string",
        "enum": [
          "automatic",
          "manual"
        ],
        "title": "Transmission"
      },
      "TripLeg": {
        "properties": {
          "origin": {
            "type": "string",
            "maxLength": 8,
            "title": "Origin",
            "description": "IATA airport or city code, 3 or 4 letters. Look the code up with [Search airports](https://www.ktemia.com/docs/api/flights/airports/). Airport codes such as JFK and city codes such as NYC are both accepted."
          },
          "destination": {
            "type": "string",
            "maxLength": 8,
            "title": "Destination",
            "description": "IATA airport or city code. Must be different from origin on this same leg. Look the code up with [Search airports](https://www.ktemia.com/docs/api/flights/airports/)."
          },
          "date": {
            "type": "string",
            "maxLength": 10,
            "title": "Date",
            "description": "Departure date for this leg, YYYY-MM-DD. Cannot be in the past, and cannot be earlier than the previous leg."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "origin",
          "destination",
          "date"
        ],
        "title": "TripLeg",
        "description": "One flight of a multi-city trip."
      },
      "app__cars__models__SortBy": {
        "type": "string",
        "enum": [
          "bestValue",
          "price",
          "rating",
          "distance"
        ],
        "title": "SortBy"
      },
      "app__flights__models__SortBy": {
        "type": "string",
        "enum": [
          "bestValue",
          "price",
          "duration",
          "departure",
          "arrival"
        ],
        "title": "SortBy"
      },
      "app__hotels__models__SortBy": {
        "type": "string",
        "enum": [
          "bestValue",
          "price",
          "rating",
          "stars",
          "distance"
        ],
        "title": "SortBy"
      },
      "ErrorResponse": {
        "type": "object",
        "title": "ErrorResponse",
        "description": "Every error uses this envelope. `error.code` is stable and uppercase, `error.message` is safe to show, and `error.param` names the field at fault when the failure is about input.",
        "required": [
          "success",
          "error",
          "data"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "const": false,
            "description": "Always false on an error."
          },
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "description": "Stable, uppercase error code, e.g. MISSING_FIELD.",
                "example": "MISSING_FIELD"
              },
              "message": {
                "type": "string",
                "description": "Human-readable explanation, safe to show."
              },
              "param": {
                "type": "string",
                "description": "The field to fix, e.g. departureDate or legs[1].date. Omitted when the failure is not about a field."
              }
            }
          },
          "data": {
            "type": "null",
            "description": "Always null on an error."
          }
        },
        "example": {
          "success": false,
          "error": {
            "code": "MISSING_FIELD",
            "message": "departureDate is required. For a multi-city trip, send legs instead.",
            "param": "departureDate"
          },
          "data": null
        }
      }
    },
    "headers": {
      "X-RateLimit-Limit": {
        "description": "Requests allowed in the current rate-limit window (burst) for this API key.",
        "schema": {
          "type": "integer"
        },
        "example": 5
      },
      "X-RateLimit-Remaining": {
        "description": "Requests left in the current rate-limit window.",
        "schema": {
          "type": "integer"
        },
        "example": 4
      },
      "X-Quota-Limit": {
        "description": "Monthly request quota for the plan, shared across every key on the account.",
        "schema": {
          "type": "integer"
        },
        "example": 100
      },
      "X-Quota-Used": {
        "description": "Requests used this month across every key on the account.",
        "schema": {
          "type": "integer"
        },
        "example": 12
      },
      "Retry-After": {
        "description": "Seconds to wait before retrying.",
        "schema": {
          "type": "integer"
        },
        "example": 2
      }
    }
  }
}