Skip to Content

Search flights

Search a trip

GET
/v1/flights/search

A search changes nothing, so GET is the main form. Trip fields decide which stored search answers; the other fields only shape the answer and never cause a supplier search.

Authorization

headerX-API-Key<token>

vl_live_… for live prices, vl_test_… for saved sample data. Older keys start fs_live_… and fs_test_…, and still work.

Query Parameters

origin*string

3-letter airport code.

Length3 <= length <= 3
destination*string

3-letter airport code, different from origin.

Length3 <= length <= 3
depart_date*string

YYYY-MM-DD, not in the past, at most 11 months ahead. depart is accepted as an older name.

Formatdate
return_date?string

YYYY-MM-DD, on or after depart_date. Leave out for one-way. return is accepted as an older name.

Formatdate
adults?integer

Travellers aged 12 and over.

Range1 <= value <= 9
Default1
children?integer

Adults plus children at most 9.

Range0 <= value <= 8
Default0
infants?integer

At most one per adult.

Range0 <= value <= 4
Default0
cabin?string

The cabin to search.

Default"economy"
Value in"economy""premium_economy""business""first"
currency?string

3-letter code.

Length3 <= length <= 3
Default"USD"
max_stops?integer

Keep itineraries with at most this many stops in each direction.

Range0 <= value <= 3
airlines?string

2-character codes, comma separated. Keeps trips sold entirely by these airlines.

sort?string

How to order results.

Default"best"
Value in"best""price""duration"
limit?integer

Results in this response.

Range1 <= value <= 50
Default10
cursor?string

The next_cursor of the previous page.

detail?string

How much of each result to send.

Default"summary"
Value in"summary""full"
fares?integer

Fares per result. Only read when detail is full. offers is accepted as an older name.

Range1 <= value <= 10
Default3
wait_ms?integer

Answer with whatever has arrived by then, in milliseconds. Left out: 8000, so a new trip is answered when its search finishes or after 8 seconds with what has arrived (status partial); read the rest by search_id. Left out, an answer is never sent empty while the search runs: it waits on for the first itineraries, up to 30 seconds.

Range0 <= value <= 30000
max_age_s?integer

The oldest price the caller accepts, in seconds. A stored answer older than this is searched again before the reply.

Range0 <= value <= 86400
stream?"1"

Answer as server-sent events. The same as sending Accept: text/event-stream.

Value in"1"
debug?"1"

Also say how the answer was produced, in meta.debug. For diagnosis; its shape may change within v1.

Value in"1"
response_mode?string

Delivery mode for partner searches: complete (default JSON — waits up to 30s for full results), stream (Server-Sent Events), or partial (fast return with search_id to poll).

Default"complete"
Value in"complete""stream""partial"

Response Body

The search, complete or partial.

  1. response
data*
meta*
Example Request
curl -X GET 'https://api.voyagelabs.ai/v1/flights/search?origin=str&destination=str&depart_date=2019-08-24' \  -H 'X-API-Key: '
Example Response
{  "data": {    "search_id": "srch_8f2c1d0e",    "status": "complete",    "query": {      "origin": "SFO",      "destination": "NRT",      "depart_date": "2027-02-09",      "return_date": "2027-02-16",      "adults": 2,      "children": 0,      "infants": 0,      "cabin": "economy",      "currency": "USD"    },    "pricing": {      "priced_at": "2026-12-02T00:20:11Z",      "age_s": 42,      "refreshing": false    },    "counts": {      "found": 6,      "matched": 6,      "returned": 1    },    "next_cursor": "c_eyJvIjoxfQ",    "airlines": [      {        "code": "ZG",        "name": "ZIPAIR",        "results": 1,        "from": 1445.02,        "best_link": "itinerary"      },      {        "code": "NH",        "name": "ANA",        "results": 1,        "from": 2823.38,        "best_link": "flights_selected"      }    ],    "results": [      {        "id": "it_U0ZPLk5SVC4yMDI3MDIwOS4yMDI3MDIxNi4yLjAuMC5ZLlVTRHxOSDcwMTNAMDIwOSxOSDhAMDIxNg",        "airlines": [          {            "code": "NH",            "name": "ANA"          }        ],        "price": {          "total": 2823.38,          "per_adult": 1411.69,          "currency": "USD"        },        "stops": 0,        "total_duration_min": 1240,        "slices": [          {            "direction": "outbound",            "origin": "SFO",            "destination": "NRT",            "depart": "2027-02-09T10:45:00",            "depart_utc": "2027-02-09T18:45:00Z",            "arrive": "2027-02-10T15:05:00",            "arrive_utc": "2027-02-10T06:05:00Z",            "duration_min": 680,            "stops": 0,            "flights": [              "NH7013"            ]          },          {            "direction": "return",            "origin": "NRT",            "destination": "SFO",            "depart": "2027-02-16T17:00:00",            "depart_utc": "2027-02-16T08:00:00Z",            "arrive": "2027-02-16T09:20:00",            "arrive_utc": "2027-02-16T17:20:00Z",            "duration_min": 560,            "stops": 0,            "flights": [              "NH8"            ]          }        ],        "fare": {          "family": "Eco I Basic 1N",          "cabins": [            "Economy"          ],          "refundable": false,          "changeable": false,          "carry_on_included": true,          "checked_bag_included": true,          "seats_left": 9        },        "link": {          "url": "https://flights.example/go?airline=NH&origin=SFO&destination=NRT&depart=2027-02-09&return=2027-02-16&adults=2&children=0&infants=0&cabin=economy&tansel=VjJ8Tkg3MDEz&exp=1796256000&sig=3q2-7w",          "opens": "airline",          "lands_on": "flights_selected",          "verified": true        },        "booking_links": {          "supplier": {            "url": null,            "available": false,            "lands_on": null          },          "airline": {            "url": "https://api.voyagelabs.ai/r/al_example_airline_token",            "available": true,            "lands_on": "flights_selected",            "airline": "NH"          },          "google_flights": {            "url": "https://api.voyagelabs.ai/r/al_example_google_flights_token",            "available": true,            "lands_on": "itinerary"          }        }      }    ]  },  "meta": {    "request_id": "req_41ab9c",    "mode": "live"  }}