flights

Start a flight search in the background — returns search_id immediately

Non-blocking version of POST /flights/search. Returns a search_id in under 1 second. Poll GET /flights/results/{search_id} every 5–10 seconds for status and results. Billing is identical to the blocking search — counted as one search on completion, only if it returns offers.

Status values: pending (still running), complete (offers ready), error (search failed).

post/flights/search/async

Request

  • Base URL: https://letsfg.co/developers/api/v1
  • URL: https://letsfg.co/developers/api/v1/flights/search/async
  • Auth: API key in header X-API-Key

Request body

originstring required

IATA departure code (e.g. LON, JFK)

destinationstring required

IATA arrival code (e.g. BCN, LAX)

date_fromstring date required
date_tostring date
return_fromstring date
return_tostring date
adultsinteger
childreninteger
infantsinteger
cabin_class'M' | 'W' | 'C' | 'F'
max_stopoversinteger
currencystring
localestring
limitinteger
sortstring
departure_time_fromstring
departure_time_tostring
provider_filtersobject
min_hours_at_destinationinteger nullable

Same-day round trip only (return_from equal to date_from): minimum hours between outbound landing and return departure. Offers with a shorter layover are excluded.

max_return_hourinteger nullable

Same-day round trip only (return_from equal to date_from): latest local hour the return may land on the calendar day after departure (e.g. 2 = home by 2 AM) before it is filtered out. Defaults to 2 so a real same-day round trip whose return crosses midnight by an hour or two is not silently reported as zero results. Same-day evening landings (before midnight) are always kept regardless of this value. Pass 0 to require a strict same-calendar-day return.

Example request

{
  "origin": "LON",
  "destination": "BCN",
  "date_from": "2026-06-15",
  "adults": 1,
  "currency": "EUR"
}

Response

Search started. Poll the poll_url for results.

search_idstring

Pass to GET /flights/results/{search_id} to poll for results.

status'pending'
poll_urlstring uri
poll_interval_secondsinteger
notestring

Example response

{
  "poll_interval_seconds": 5
}

Changes

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