Ktemia
v0.1.7Search and compare flights, hotels and rental cars, with each seller's price and booking link.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
ktemia_key_status Check Ktemia plan and remaining quota
Report the plan, rate limits, and remaining monthly request quota for the configured API key. This is the only Ktemia call that is free: it does not count against the quota, and it keeps answering after the quota is spent, so it is how you diagnose a QUOTA_EXCEEDED error and find the reset date. Call it before a long run of searches to check the budget. The quota is shared across every key on an account, so adding a key does not add requests.
ktemia_lookup Look up airport, airline, or location codes
Resolve a plain-language place or airline name into the codes the search tools need. Use kind='airport' for flight origins and destinations (returns IATA airport codes such as LHR, and city codes such as LON that cover every airport in a metro area), kind='airline' for two-letter carrier codes, kind='hotelLocation' for a hotel search location id, and kind='carLocation' for a rental pickup location id. Flight searches take the code field; hotel and car searches take the locationId field, which is a numeric string and not a city name. Resolve an ambiguous name here instead of guessing a code. Co…
| Parameter | Type | Description |
|---|---|---|
kind * | string | What to resolve. Flight searches need 'airport'; hotel and car searches need 'hotelLocation' and 'carLocation'. |
query * | string | Place, airport, or airline name, for example 'London' or 'Delta'. |
country | string | Two-letter market code (ISO 3166-1 alpha-2) biasing results, for example 'GB'. |
locale | string | Language for returned names. |
type | string | For kind='carLocation' only: narrow to city centres or airports. |
ktemia_search_flights Search flights
Search and compare flights across providers. Call with trip details to start a search and read the first page; call again with only nextToken to read the next page. A trip is either one-way or return (origin, destination, departureDate, optional returnDate) or multi-city (legs). The two forms are mutually exclusive. Origins and destinations are IATA airport or city codes - use ktemia_lookup to resolve a place name first. Ask the user for anything missing rather than guessing. A guessed city or date searches the wrong trip, spends quota, and returns confident nonsense. Tokens are opaque and exp…
| Parameter | Type | Description |
|---|---|---|
airlines | array | Restrict to these two-letter IATA airline codes, from ktemia_lookup with kind='airline' or availableFilters on a results page. |
alliances | array | Restrict to these airline alliances. |
cabin | string | Cabin class to price. |
country | string | Two-letter market code to price in, for example 'US'. It selects the market, and prices come back in that country's currency. There is no currency parameter. |
departureDate | string | Outbound date as YYYY-MM-DD. Must not be in the past. |
destination | string | Arrival IATA airport or city code, for example 'JFK' or 'NYC'. |
legs | array | Multi-city itinerary as a list of { origin, destination, date }, in travel order. Mutually exclusive with origin/destination/departureDate. |
maxPrice | number | Drop results above this total price. |
maxStops | integer | Maximum stops per leg. 0 is non-stop only. |
nextToken | string | Read the next page of an existing search. When set, every other parameter is ignored. |
origin | string | Departure IATA airport or city code, for example 'LHR' or 'LON'. |
passengers | object | Traveller counts: adults (12 and over), children (2-11), infantsOnLap (under 2, on an adult's lap). Defaults to one adult. Count seniors, students and youths as adults, and an infant in their own seat… |
returnDate | string | Return date as YYYY-MM-DD for a round trip. Omit for one-way. |
sortBy | string | Result ordering. |
sortOrder | string | Sort direction. |
ktemia_search_hotels Search hotels and stays
Search and compare hotels and other stays across providers. Call with stay details to start a search and read the first page; call again with only nextToken for the next page. The location must be an id from ktemia_lookup with kind='hotelLocation' - a free-text city name is not accepted. Ask the user for anything missing rather than guessing. A guessed city or date searches the wrong trip, spends quota, and returns confident nonsense. Tokens are opaque and expire one hour after the search starts. Page through with the nextToken from the previous page; when nextToken is absent there are no more…
| Parameter | Type | Description |
|---|---|---|
adults | integer | Number of adults. |
amenities | array | Required amenities, for example 'wifi' or 'pool'. |
checkin | string | Check-in date as YYYY-MM-DD. |
checkout | string | Check-out date as YYYY-MM-DD. Must be after checkin. |
childAges | array | Ages of children sharing the room, as a list of years. |
country | string | Two-letter market code to price in, for example 'US'. It selects the market, and prices come back in that country's currency. There is no currency parameter. |
freeCancellation | boolean | Only rates that can be cancelled free of charge. |
location | Location id from ktemia_lookup with kind='hotelLocation' - the locationId field of a result, for example '29230'. | |
maxPrice | number | Drop results above this price. |
minRating | number | Minimum guest review score. |
minStars | number | Minimum star rating, 1 to 5. |
nextToken | string | Read the next page of an existing search. When set, every other parameter is ignored. |
providers | array | Restrict to these booking providers, using an id from availableFilters.bookingSites.options on a results page, for example 'Booking.com'. Guessed names match nothing. |
rooms | integer | Number of rooms. |
sortBy | string | Result ordering. |
sortOrder | string | Sort direction. |
ktemia_search_cars Search rental cars
Search and compare rental cars across agencies. Call with rental details to start a search and read the first page; call again with only nextToken for the next page. The pickup location must be an id from ktemia_lookup with kind='carLocation'. Omit dropoffLocation for a same-location return. Ask the user for anything missing rather than guessing. A guessed city or date searches the wrong trip, spends quota, and returns confident nonsense. Tokens are opaque and expire one hour after the search starts. Page through with the nextToken from the previous page; when nextToken is absent there are no…
| Parameter | Type | Description |
|---|---|---|
agencies | array | Restrict to these rental agencies, using an id from availableFilters.agency on a results page - the lowercase id such as 'hertz', not the display label such as 'Hertz'. |
carClass | string | Keep only this vehicle class. Omit to allow any class. |
country | string | Two-letter market code to price in, for example 'US'. It selects the market, and prices come back in that country's currency. There is no currency parameter. |
driverAge | integer | Driver age. Under 25 often carries a young-driver surcharge. |
dropoffDate | string | Drop-off date as YYYY-MM-DD. Must be on or after pickupDate. |
dropoffLocation | Drop-off location id. Omit to return the car where it was collected. | |
dropoffTime | string | Drop-off time as HH:MM, 24-hour. |
maxPrice | number | Drop results above this price. |
nextToken | string | Read the next page of an existing search. When set, every other parameter is ignored. |
pickupDate | string | Pickup date as YYYY-MM-DD. |
pickupLocation | Pickup location id from ktemia_lookup with kind='carLocation' - the locationId field of a result. | |
pickupTime | string | Pickup time as HH:MM, 24-hour. |
priceMode | string | What each price shows: the rental total, or the average daily rate. Every option also carries perDay either way. maxPrice always caps the total. |
providers | array | Restrict to these booking providers, using an id from availableFilters.bookingSites on a results page, for example 'Booking.com'. Guessed names match nothing. |
sortBy | string | Result ordering. |
sortOrder | string | Sort direction. |
transmission | string | Gearbox type. Relevant outside North America, where manual is common. |
ktemia_get_details Get full prices and booking links for one result
Expand a single search result into every available price and booking link. Pass the vertical, the token from the search that produced the result, and that result's id. Use this when the user has chosen a candidate and wants the real price or a way to book, since search pages carry only the leading offers. Tokens are opaque and expire one hour after the search starts. Page through with the nextToken from the previous page; when nextToken is absent there are no more pages. If a token has expired, start a new search rather than retrying the same token. Costs one API request against the account's…
| Parameter | Type | Description |
|---|---|---|
resultId * | The id of the chosen result, taken from the search response. | |
token * | The searchToken or nextToken of the page the result appeared on. | |
vertical * | string | Which search the result came from. |
ktemia_get_hotel_reviews Get guest reviews for a hotel
Read guest reviews for one hotel, with optional filters and paging. Use it to answer qualitative questions - whether the breakfast is worth it, how the rooms sound at night - that a price comparison cannot settle. Pages are numbered here, unlike the token-based search tools. Costs one API request against the account's monthly quota. Starting a search and reading each page are separate requests.
| Parameter | Type | Description |
|---|---|---|
hotelId * | Hotel id from a hotel search result or its details. | |
months | array | Keep only stays in these calendar months, 1 for January through 12 for December - for example [6, 7, 8] for summer stays. This is the month of the stay in any year, not a recent window; for the newest… |
page | integer | Page number, starting at 1. |
search | string | Only reviews containing this phrase, for example 'air conditioning'. |
sortBy | string | Review ordering. |
sources | array | Read reviews from only these sites. Omit to read all three. |
travelerTypes | array | Keep only reviews from these kinds of traveller. Send one or more. |