travel

Search flight offers between two airports for given dates. Returns a normalized FlightOffer page.

One-way or round-trip flight offers between two IATA airport codes, priced for all passengers in the requested currency. Leg times are local airport times without a zone; stops counts the connections of the outbound journey.

Fixed price: 0.3 credits per successful call, whichever provider serves it.

post/v2/ops/travel.flight.search

Request

  • Base URL
    https://api.agentkey.app
  • URL
    https://api.agentkey.app/v2/ops/travel.flight.search
  • Auth
    HTTP bearer

Request body

adultsinteger

Number of adult passengers.

cabin_class'economy' | 'premium_economy' | 'business' | 'first'

Cabin class.

currencystring

ISO 4217 currency for prices.

cursorstring

Opaque pagination cursor from the previous response's next_cursor. Send the same query parameters with it.

depart_datestring required

Departure date, YYYY-MM-DD.

destinationstring required

Arrival airport IATA code, e.g. LHR.

fieldsstring[]

Projection: keep only these dotted paths of data, e.g. ["items.id", "items.text"].

include_rawboolean

Attach the raw upstream payload as raw (not a stable contract; truncated above 256 KB).

limitinteger

Maximum number of offers to return.

max_stops0 | 1 | 2

Maximum number of stops; omit for any.

originstring required

Departure airport IATA code, e.g. JFK.

providerstring

Shorthand for routing.only = [provider].

return_datestring

Return date for a round trip, YYYY-MM-DD; omit for one-way.

sort'best' | 'cheapest' | 'fastest'

Result ordering.

Response

Success envelope

credits_chargednumber required

Credits charged for this call (the method's fixed price).

opstring required

Method name.

op_versioninteger required

Method version that served the call.

providerstring required

Provider that actually served the call.

rawunknown
raw_truncatedboolean
request_idstring required

Correlation id; quote it in support requests.

took_msinteger required
unsupported_fieldsstring[] required

Output paths this provider structurally does not supply; such fields are null for a different reason than 'missing on this record'.

Changes

No recorded changes to this operation across all 1 revision of this API.