Search flights
search_flightsSearches one-way flights on AlgoTrips for one day between two cities or airports, with current prices. Returns up to 5 options (airline, flight numbers, times, duration, stops, baggage, refund, fare and price for all passengers), each with a link to book it on AlgoTrips, and a link to see every flight. Nothing is booked or paid here. The prices are the signed-in AlgoTrips account's own; needs the person to be signed in to AlgoTrips. A city that is not found or is shared by several cities returns close matches instead (status needs_changes).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"from": "<from>",
"to": "<to>",
"date": "<date>"
},
"name": "search_flights"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | Where the flight goes: a city or a 3-letter airport code, as for from. | |
| date | Yes | The day of the flight, YYYY-MM-DD, from today up to 330 days ahead. | |
| from | Yes | Where the flight leaves from: a city ("Mumbai", or "Hyderabad, India" when the name is shared) or a 3-letter airport code ("BOM"). | |
| cabin | No | Cabin: economy, premium_economy, business or first. Left out: every cabin. | |
| adults | No | Adults (12 and over) travelling, 1 to 9. Left out: 1. | |
| infants | No | Infants under 2 (on a lap), 0 to 4, no more than the adults. | |
| directOnly | No | true: nonstop flights only. | |
| departAfter | No | The earliest departure time, HH:MM (24-hour clock, local time at the departure airport). | |
| childrenAges | No | Each child's age, 2 to 11. Adults and children together are at most 9. | |
| departBefore | No | The latest departure time, HH:MM (24-hour clock, local time at the departure airport). | |
| preferredTime | No | A preferred departure time, HH:MM. Without departAfter or departBefore, only flights leaving within 2 hours of it are returned. The flight nearest to it is always among the options. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | ||
| date | No | ||
| from | No | ||
| party | No | The travellers the search was for (adults left out = 1). | |
| status | Yes | ||
| message | Yes | ||
| options | No | ||
| priceNote | No | ||
| suggestions | No | ||
| allFlightsLink | No |