---
title: "Create a flight search"
method: POST
path: "/v1/flights/searches"
tags: ["Flights"]
---

# Create a flight search

`POST /v1/flights/searches`

Creates a metasearch for the given route/dates/passengers and returns its searchId. Results accrue asynchronously – poll getFlightSearchResults with the returned searchId to read ranked trips.

## Request body

- object
  - `from` string, required — Origin airport or city IATA code, e.g. DXB.
  - `to` string, required — Destination airport or city IATA code, e.g. LHR.
  - `fromDate` string, required — Outbound departure date, YYYY-MM-DD. Not in the past, within a year.
  - `toDate` string — Return date, YYYY-MM-DD. Omit for a one-way search.
  - `cabin` 'economy' | 'premium_economy' | 'business' | 'first' — Cabin class requested for all passengers.
  - `adults` integer — Adult passengers (1-9). Defaults to 1. Note the hotel search defaults adults to 2, since a room sleeps two.
  - `children` integer — Child passengers (0-8). Defaults to 0.
  - `infants` integer — Infant passengers (0-8). Must not exceed adults. Defaults to 0.
  - `currency` string — Pricing currency as a 3-letter ISO 4217 code. Defaults to USD.
  - `locale` string — Response language tag (e.g. en, ar). Defaults to en.
  - `siteCode` string — Wego market (point of sale) as a 2-letter code, e.g. AE. Optional: if omitted the API defaults to US. A client that knows the user's market (the wego CLI derives it from the id_token) passes it as an explicit siteCode; the response always reports the siteCode used.

## Response `201`

Search created.

- object — The created search id and the market it was created for.
  - `searchId` string, required — The id of the created search; pass it to the results and trip reads.
  - `siteCode` string, required — The site code (Wego market) the search was created for.
  - `siteCodeSource` 'explicit' | 'default', required — How the API resolved siteCode: explicit (caller-supplied – including a market a client derived and passed) or default (US, no site supplied).

## Other responses

- `400` — Invalid request body/query/path parameters.
- `401` — Missing or invalid bearer token.
- `429` — Rate limit exceeded; retry after the `Retry-After` seconds.
- `502` — The upstream flights service returned an invalid response.
- `503` — The flights service is temporarily unavailable (`upstream_unavailable`) or rate-limited upstream (`upstream_rate_limited`); retry after the `Retry-After` seconds.

---

[API](https://skmtc.net/wego/apis/wego-api.md) · [All operations](https://skmtc.net/wego/apis/wego-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/wego/wego-api/revisions/e5d7af502419/schema)
