Every API here is available over the APIs.io API and to AI agents over MCP.
{"openapi":"3.1.0","info":{"title":"Wego API","description":"Wego's travel API: places, flights, hotels and fares. Please see https://docs.wego.com for more details.","version":"0.19.0"},"tags":[{"name":"Places","description":"Turn free text into typed travel locations. `getPlaces` resolves a city, airport, district or hotel name to results carrying the codes the flight and hotel searches take as input. `getNearbyPlaces` answers the follow-up – which other airports serve the same trip – from a place code or a coordinate pair."},{"name":"Countries","description":"Country-keyed reference data an agent can call before any search, and combine. `getCountryHolidays` returns a market's public holidays for spotting long weekends; `getVisaFreeDestinations` returns where a passport travels without a visa, as one complete list. Both take an ISO 3166-1 alpha-2 code as their only path key, which is what groups them under one tag – their results combine (visa-free supplies the destinations, holidays the free dates), rather than intersecting on a shared row field, since a holiday row carries no country code of its own. The visa list carries no visa type and no permitted stay – an absent country means absent from Wego's list, not that a visa is required."},{"name":"Flights","description":"The flight funnel: `createFlightSearch` starts an async search, `getFlightSearchResults` reads ranked snapshots while providers answer, `getFlightTrip` opens one trip with every fare. Fares with `kind: \"wego\"` continue into `getFareOptions` and `getFareBookingLink`; airline and partner fares carry their own handoff URL instead. Ids expire; a `404` means search again. `getFlightSchedules` sits outside the funnel – a published timetable with no prices and no search to settle."},{"name":"Hotels","description":"The hotel funnel, same shape as flights: `createHotelSearch`, `getHotelSearchResults` for ranked hotels, `getHotel` for static detail, `getHotelRates` for bookable rooms and rates (cheapest first, with board and refundability), `getHotelRateBookingLink` for the wego.com checkout URL."},{"name":"User","description":"The authenticated caller. `getCurrentUser` returns the identity behind the bearer token (the CLI's `wego whoami`)."},{"name":"Feedback","description":"Send feedback about the Wego CLI/API experience. `submitFeedback` records an optional category plus at least one of a rating (1-5) or a free-text message (the CLI's `wego feedback`); a category alone is rejected."}],"servers":[{"url":"https://api.wego.com"}],"security":[{"oauth2":[]},{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Wego auth server access token, sent as `Authorization: Bearer <token>` (RFC 6750)."},"oauth2":{"type":"oauth2","description":"OAuth2 authorization-code flow (PKCE supported) against the Wego auth server.","flows":{"authorizationCode":{"authorizationUrl":"https://auth.wego.com/user-auth/v2/users/oauth/authorize","tokenUrl":"https://auth.wego.com/user-auth/v2/users/oauth/token","x-scalar-client-id":"251815b9647317f4895122fd4924b7d44541d8fcc27be528435e3ad9bbf7e1ee","x-usePkce":"SHA-256","scopes":{"openid":"OpenID Connect sign-in.","profile":"Basic profile claims.","users":"User identity for the API."}}},"x-default-scopes":["openid","profile","users"]}},"schemas":{"Problem":{"type":"object","description":"RFC 9457 Problem Details, served as application/problem+json.","required":["type","title","status","instance","code","trace_id"],"properties":{"type":{"type":"string","format":"uri","description":"Problem-type URI. `about:blank` for now (no semantics beyond the status); real type URIs follow once the public host is fixed."},"title":{"type":"string","description":"Fixed human summary, the same across a `code`."},"status":{"type":"integer","description":"The HTTP status code, repeated as a JSON number."},"detail":{"type":"string","description":"Instance-specific human explanation of this failure."},"instance":{"type":"string","description":"The request path this occurrence happened on."},"code":{"type":"string","enum":["validation_failed","invalid_token","insufficient_scope","not_found","rates_require_hotel_search","rate_limited","bad_gateway","upstream_unavailable","upstream_rate_limited","internal_error"],"description":"Stable machine token from a closed enum – the field an agent branches on."},"trace_id":{"type":"string","description":"Correlates this response to its logs; also returned in the `x-trace-id` response header."}}}}},"paths":{"/health":{"get":{"operationId":"getHealth","summary":"Health check","description":"Liveness probe.","security":[],"responses":{"200":{"description":"The API is up.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"healthy","description":"Always \"healthy\" when the service is answering."},"commit":{"description":"Git commit SHA of the running build; absent when the platform supplied none.","type":"string"}},"required":["status"]}}}}}}},"/v1/user":{"get":{"operationId":"getCurrentUser","tags":["User"],"summary":"Get the authenticated user","description":"Returns the caller's own identity, read from the verified access-token claims. Profile fields (email, name, country) appear only when the token carries them.","responses":{"200":{"description":"The caller's identity claims.","content":{"application/json":{"schema":{"type":"object","properties":{"sub":{"type":"string","description":"The token subject (the JWT `sub`): the user's email, which auth.wego.com uses as the stable user identifier."},"scope":{"description":"Space-separated OAuth scopes granted to the token.","type":"string"},"email":{"description":"The user's email address, when the token carries it.","type":"string"},"name":{"description":"The user's full display name, when present.","type":"string"},"first_name":{"description":"The user's given name, when present.","type":"string"},"last_name":{"description":"The user's family name, when present.","type":"string"},"country_code":{"description":"The user's market country code, when present (id_token-sourced; usually absent on the access token).","type":"string"},"uid":{"description":"The AS's own numeric user id. Published as `string | number` because that is what it is: it arrives as a number today, and a `string`-only declaration would be a promise the API does not keep.","anyOf":[{"type":"string"},{"type":"number"}]},"principal_name":{"description":"The auth server's principal name for the user, when present.","type":"string"}},"required":["sub"]}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit exceeded; retry after the `Retry-After` seconds.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/feedback":{"post":{"operationId":"submitFeedback","tags":["Feedback"],"summary":"Submit feedback","description":"Records feedback about the Wego CLI/API experience – a rating (1-5), a category, and/or a free-text message. At least one of rating or message is required. Fire-and-forget: returns 202 and never blocks on recording.","responses":{"202":{"description":"Feedback accepted.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"received","description":"The feedback was accepted."}},"required":["status"]}}}},"400":{"description":"Invalid feedback body (e.g. neither rating nor message provided).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit exceeded; retry after the `Retry-After` seconds.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"rating":{"example":5,"description":"Overall rating, 1 (poor) to 5 (great).","type":"integer","minimum":1,"maximum":5},"category":{"description":"Which area the feedback is about.","type":"string","enum":["flights","hotels","other"]},"message":{"example":"Fare options were exactly what I needed.","description":"Free-text feedback (bugs, ideas, what worked).","type":"string","minLength":1,"maxLength":2000},"version":{"description":"CLI version the feedback came from.","type":"string","maxLength":50}},"additionalProperties":false}}}}}},"/v1/places/nearby":{"get":{"operationId":"getNearbyPlaces","tags":["Places"],"summary":"Airports and cities near a point","description":"The airports (and optionally cities) closest to a place or a coordinate pair, nearest first – for finding an alternative departure airport serving the same trip. Pass either place (a code, resolved to coordinates here) or latitude+longitude, never neither.","responses":{"200":{"description":"Nearby places, nearest first, plus the origin they were measured from.","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"id":{"description":"Opaque identifier, unique per place. Do not send it to other endpoints or build wego.com URLs from it: reference a place by code, or by cityCode for a hotels search.","anyOf":[{"type":"number"},{"type":"string"}]},"code":{"description":"IATA-style code (airport/city), when the place has one.","type":"string"},"name":{"type":"string","description":"Display name of the place."},"type":{"type":"string","description":"Place kind: city, airport, state, district or hotel."},"cityCode":{"description":"Code of the city this place belongs to.","type":"string"},"latitude":{"description":"Latitude in decimal degrees, when known.","type":"number"},"longitude":{"description":"Longitude in decimal degrees, when known.","type":"number"}},"required":["name","type"]},"description":"The nearby places found around the origin."},"metadata":{"type":"object","properties":{"resultCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Number of results on the current page (always <= pageSize)."},"totalCandidates":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Rows the upstream returned before this page was sliced. The upstream ignores per_page and answers with roughly ten rows, so pageSize can only narrow this, never reach further."},"hasMore":{"type":"boolean","description":"True when pageSize clipped the upstream rows."},"origin":{"type":"object","properties":{"latitude":{"type":"number","description":"Latitude the upstream was queried with."},"longitude":{"type":"number","description":"Longitude the upstream was queried with."},"resolvedFrom":{"type":"string","enum":["place","coordinates"],"description":"`place` when a code was resolved to these coordinates, `coordinates` when the caller supplied them."},"code":{"description":"The resolved place code, present only when resolvedFrom is place.","type":"string"},"name":{"description":"The resolved place name, present only when resolvedFrom is place.","type":"string"}},"required":["latitude","longitude","resolvedFrom"],"description":"The point the nearby search ran from, and how it was derived."}},"required":["resultCount","totalCandidates","hasMore","origin"],"description":"Pagination and the resolved origin for this nearby search."}},"required":["results","metadata"]}}}},"400":{"description":"Neither a place nor a coordinate pair, an out-of-range coordinate, or a place code that resolves to nothing with coordinates.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit exceeded; retry after the `Retry-After` seconds.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"The upstream places service returned an invalid response.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"The places service is temporarily unavailable; retry after the `Retry-After` seconds.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"parameters":[{"in":"query","name":"place","schema":{"type":"string","minLength":1,"maxLength":100},"description":"Place code to search around (e.g. LON, LHR). Resolved to coordinates before the upstream call."},{"in":"query","name":"latitude","schema":{"type":"number","minimum":-90,"maximum":90},"description":"Latitude of the point to search around, decimal degrees (-90 to 90). Give latitude and longitude together; use either this pair or place, never both."},{"in":"query","name":"longitude","schema":{"type":"number","minimum":-180,"maximum":180},"description":"Longitude of the point to search around, decimal degrees (-180 to 180). Give latitude and longitude together; use either this pair or place, never both."},{"in":"query","name":"types","schema":{"minItems":1,"type":"array","items":{"type":"string","enum":["city","airport","state","district","hotel"]}},"description":"Place types to resolve; repeat or comma-separate to mix."},{"in":"query","name":"locale","schema":{"default":"en","type":"string","minLength":1,"maxLength":35},"description":"Language tag for localized place names (e.g. en, ar). Defaults to en."},{"in":"query","name":"pageSize","schema":{"default":50,"type":"integer","minimum":1,"maximum":50},"description":"Max results (1-50). Defaults to 50, the maximum, because this read wants the complete set of nearby places, not a page of it. The upstream returns roughly ten rows and ignores paging, so pageSize can only narrow that set, never reach further."}]}},"/v1/places":{"get":{"operationId":"getPlaces","tags":["Places"],"summary":"Resolve travel locations","description":"Resolves a free-text location query to canonical Wego places (cities, airports, states, districts, hotels) with codes and coordinates, for use in later flight and hotel searches. When metadata.hasAmbiguity is true, clarify with the user before proceeding.","responses":{"200":{"description":"Matching places plus pagination/ambiguity metadata.","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"id":{"description":"Opaque identifier, unique per place. Do not send it to other endpoints or build wego.com URLs from it: reference a place by code, or by cityCode for a hotels search.","anyOf":[{"type":"number"},{"type":"string"}]},"code":{"description":"IATA-style code (airport/city), when the place has one.","type":"string"},"name":{"type":"string","description":"Display name of the place."},"type":{"type":"string","description":"Place kind: city, airport, state, district or hotel."},"cityCode":{"description":"Code of the city this place belongs to.","type":"string"},"latitude":{"description":"Latitude in decimal degrees, when known.","type":"number"},"longitude":{"description":"Longitude in decimal degrees, when known.","type":"number"}},"required":["name","type"]},"description":"The matched places for this page."},"metadata":{"type":"object","properties":{"resultCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Number of results on the current page (always <= pageSize)."},"totalCandidates":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Total matches held for this query (post-dedup, pre-pagination) – the ceiling pagination can reach. 0 means no matches; an empty deep page with totalCandidates > 0 just means the offset is past the end."},"hasMore":{"type":"boolean","description":"True when a further page exists."},"hasAmbiguity":{"type":"boolean","description":"True when several distinct real-world locations share the query; ask the user to disambiguate before searching."},"disambiguationHint":{"description":"Short clarification sample, present only when hasAmbiguity.","type":"string"}},"required":["resultCount","totalCandidates","hasMore","hasAmbiguity"],"description":"Pagination and ambiguity signals for this place search."}},"required":["results","metadata"]}}}},"400":{"description":"Invalid query parameters.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit exceeded; retry after the `Retry-After` seconds.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"The upstream places service returned an invalid response.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"The places service is temporarily unavailable; retry after the `Retry-After` seconds.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"parameters":[{"in":"query","name":"query","schema":{"type":"string","minLength":1,"maxLength":100,"example":"dubai"},"required":true,"description":"Free text to resolve to typed places with codes. A place-name search (city, airport, district, hotel)."},{"in":"query","name":"types","schema":{"minItems":1,"type":"array","items":{"type":"string","enum":["city","airport","state","district","hotel"]}},"description":"Place types to resolve; repeat or comma-separate to mix."},{"in":"query","name":"locale","schema":{"type":"string","minLength":1,"maxLength":35},"description":"Language tag for localized place names (e.g. en, ar). Omitted, the search is language-neutral: the query matches names in any language (sent upstream as the locale wildcard) and results carry canonical English names. Pass a tag to localize the returned names instead. getNearbyPlaces, by contrast, defaults to en."},{"in":"query","name":"page","schema":{"default":1,"type":"integer","minimum":1,"maximum":100},"description":"Page number, 1-based (max 100). Defaults to 1."},{"in":"query","name":"pageSize","schema":{"default":10,"type":"integer","minimum":1,"maximum":50},"description":"Results per page (1-50). Defaults to 10."}]}},"/v1/countries/{countryCode}/holidays":{"get":{"operationId":"getCountryHolidays","tags":["Countries"],"summary":"Public holidays for a market","description":"Public holidays in one Wego market over a date range, for spotting long weekends before searching flights. Give both fromDate and toDate, or neither – omit both and the API searches the next 90 days and says so in metadata.window/from/to.","responses":{"200":{"description":"Holidays in the searched range, plus that range.","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Localized holiday name."},"key":{"type":"string","description":"Stable upstream slug (e.g. national_day) – the same holiday carries the same key across locales."},"startDate":{"type":"string","description":"Inclusive ISO YYYY-MM-DD start."},"endDate":{"type":"string","description":"Inclusive ISO YYYY-MM-DD end; equals startDate for one-day holidays."}},"required":["name","key","startDate","endDate"]},"description":"Public holidays in the resolved window."},"metadata":{"type":"object","properties":{"resultCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Number of holidays returned."},"countryCode":{"type":"string","description":"The market the holidays are for."},"window":{"type":"string","enum":["explicit","upcoming"],"description":"`explicit` when the caller supplied both dates, `upcoming` when the API chose the range (stated in from/to)."},"from":{"type":"string","description":"Inclusive ISO start of the range actually searched."},"to":{"type":"string","description":"Inclusive ISO end of the range actually searched."}},"required":["resultCount","countryCode","window","from","to"],"description":"The market, the resolved date window, and the result count for this read."}},"required":["results","metadata"]}}}},"400":{"description":"Unknown market, malformed date, only one of fromDate/toDate, or fromDate after toDate.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit exceeded; retry after the `Retry-After` seconds.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"The upstream holidays service returned an invalid response.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"The holidays service is temporarily unavailable; retry after the `Retry-After` seconds.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"parameters":[{"in":"path","name":"countryCode","schema":{"type":"string","pattern":"^[A-Z]{2}$","example":"AE"},"required":true,"description":"ISO 3166-1 alpha-2 code of the Wego market whose public holidays you want (e.g. AE). A destination MARKET, not a passport: it must be one of Wego's markets, and an unknown one is rejected 400. The same path segment means a passport on the visa-free route."},{"in":"query","name":"fromDate","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"description":"Inclusive ISO start date. Give both fromDate and toDate, or neither."},{"in":"query","name":"toDate","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"description":"Inclusive ISO end date. Give both fromDate and toDate, or neither."},{"in":"query","name":"locale","schema":{"default":"en","type":"string","minLength":1,"maxLength":35},"description":"Locale for localized names (e.g. en, ar). Defaults to en."}]}},"/v1/countries/{countryCode}/visa-free-destinations":{"get":{"operationId":"getVisaFreeDestinations","tags":["Countries"],"summary":"Visa-free destinations for a passport","description":"Where a passport can travel without a visa, as one complete list (the API walks the upstream's pages). An inspiration list, not a visa rule: it carries no visa type and no permitted stay, and a country's absence means absent from Wego's list, never that a visa is required.","responses":{"200":{"description":"Visa-free destinations for this passport, keyed on countryCode for joining.","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"countryCode":{"type":"string","description":"ISO 3166-1 alpha-2 code – the key to join this list on."},"name":{"type":"string","description":"Localized country name."},"keyCityCode":{"description":"The country's principal city code, ready for a flight search.","type":"string"},"currencyCode":{"description":"The destination's ISO 4217 currency code, when known.","type":"string"},"latitude":{"description":"Latitude of the destination's principal city, when known.","type":"number"},"longitude":{"description":"Longitude of the destination's principal city, when known.","type":"number"}},"required":["countryCode","name"]},"description":"Visa-free destinations for the passport."},"metadata":{"type":"object","properties":{"resultCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Number of destinations on the current page."},"totalCandidates":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Destinations assembled across every upstream page, pre-pagination. 0 means Wego lists none for this passport – NOT that a visa is required."},"hasMore":{"type":"boolean","description":"True when a further page exists."},"passportCountryCode":{"type":"string","description":"The passport the list is for."},"upstreamPagesFetched":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"How many upstream pages were read to assemble this list."},"coverage":{"type":"string","enum":["complete","truncated"],"description":"`complete` when the walk ended on a short upstream page. `truncated` when the page cap stopped it on a full page, so totalCandidates is a FLOOR and destinations may exist that this response does not carry. At exactly the cap (200) a complete list also reports `truncated`, since telling the two apart would cost another upstream page."}},"required":["resultCount","totalCandidates","hasMore","passportCountryCode","upstreamPagesFetched","coverage"],"description":"The passport, the walk's coverage, and the counts for this read."}},"required":["results","metadata"]}}}},"400":{"description":"Malformed passport country code, page or pageSize.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit exceeded; retry after the `Retry-After` seconds.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"The upstream destinations service returned an invalid response.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"The destinations service is temporarily unavailable; retry after the `Retry-After` seconds.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"parameters":[{"in":"path","name":"countryCode","schema":{"type":"string","pattern":"^[A-Z]{2}$","example":"AE"},"required":true,"description":"ISO 3166-1 alpha-2 code of the PASSPORT whose visa-free destinations you want (e.g. AE). A passport, not a market: any well-formed code is accepted (a passport need not be a Wego market) and an unrecognized one returns an honest empty list. The same path segment means a market on the holidays route."},{"in":"query","name":"locale","schema":{"default":"en","type":"string","minLength":1,"maxLength":35},"description":"Locale for localized names (e.g. en, ar). Defaults to en."},{"in":"query","name":"page","schema":{"default":1,"type":"integer","minimum":1,"maximum":20},"description":"Page number, 1-based (max 20). Defaults to 1. The list is a bounded registry the API assembles whole, so paging is rarely needed and the cap is low by design."},{"in":"query","name":"pageSize","schema":{"default":200,"type":"integer","minimum":1,"maximum":200},"description":"Rows per page (1-200). Defaults to 200, which is also the maximum: this is a bounded registry the API walks completely, so the default returns the whole list. pageSize exists only to narrow a long answer, never to force paging."}]}},"/v1/flights/searches":{"post":{"operationId":"createFlightSearch","tags":["Flights"],"summary":"Create a flight search","description":"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.","responses":{"201":{"description":"Search created.","content":{"application/json":{"schema":{"type":"object","properties":{"searchId":{"type":"string","description":"The id of the created search; pass it to the results and trip reads."},"siteCode":{"type":"string","description":"The site code (Wego market) the search was created for."},"siteCodeSource":{"type":"string","enum":["explicit","default"],"description":"How the API resolved siteCode: explicit (caller-supplied – including a market a client derived and passed) or default (US, no site supplied)."}},"required":["searchId","siteCode","siteCodeSource"],"description":"The created search id and the market it was created for."}}}},"400":{"description":"Invalid request body/query/path parameters.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit exceeded; retry after the `Retry-After` seconds.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"The upstream flights service returned an invalid response.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"The flights service is temporarily unavailable (`upstream_unavailable`) or rate-limited upstream (`upstream_rate_limited`); retry after the `Retry-After` seconds.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"string","pattern":"^[A-Z]{3}$","example":"DXB","description":"Origin airport or city IATA code, e.g. DXB."},"to":{"type":"string","pattern":"^[A-Z]{3}$","example":"LHR","description":"Destination airport or city IATA code, e.g. LHR."},"fromDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Outbound departure date, YYYY-MM-DD. Not in the past, within a year."},"toDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Return date, YYYY-MM-DD. Omit for a one-way search."},"cabin":{"default":"economy","description":"Cabin class requested for all passengers.","type":"string","enum":["economy","premium_economy","business","first"]},"adults":{"default":1,"description":"Adult passengers (1-9). Defaults to 1. Note the hotel search defaults adults to 2, since a room sleeps two.","type":"integer","minimum":1,"maximum":9},"children":{"default":0,"description":"Child passengers (0-8). Defaults to 0.","type":"integer","minimum":0,"maximum":8},"infants":{"default":0,"description":"Infant passengers (0-8). Must not exceed adults. Defaults to 0.","type":"integer","minimum":0,"maximum":8},"currency":{"default":"USD","description":"Pricing currency as a 3-letter ISO 4217 code. Defaults to USD.","type":"string","pattern":"^[A-Z]{3}$"},"locale":{"default":"en","description":"Response language tag (e.g. en, ar). Defaults to en.","type":"string","minLength":1,"maxLength":35},"siteCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"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."}},"required":["from","to","fromDate"],"additionalProperties":false}}}}}},"/v1/flights/schedules":{"get":{"operationId":"getFlightSchedules","tags":["Flights"],"summary":"Published timetable for a route","description":"What actually flies a route – times, duration, aircraft, and the weekdays each flight runs – with no prices and no search to settle. Nonstop flights only. Airport codes resolve to their parent city (LHR to LON), and metadata echoes what each side resolved to.","responses":{"200":{"description":"Scheduled flights, plus the resolved route and the market used.","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"airlineCode":{"type":"string","description":"Marketing carrier code – what `airline` filters on."},"departureAirportCode":{"type":"string","description":"Departure airport IATA code."},"arrivalAirportCode":{"type":"string","description":"Arrival airport IATA code."},"departureTime":{"type":"string","description":"Local HH:MM at the departure airport."},"arrivalTime":{"type":"string","description":"Local HH:MM at the arrival airport."},"durationMinutes":{"type":"number","description":"Total scheduled duration in minutes."},"stopsCount":{"type":"number","description":"Stops on the route, as the timetable reports them; 0 is nonstop. This read covers nonstop scheduled flights, so a connecting itinerary is absent rather than listed with a stop."},"arrivalDayOffset":{"type":"number","description":"Days the arrival falls after departure; 1 means next-day."},"segments":{"type":"array","items":{"type":"object","properties":{"departureAirportCode":{"type":"string","description":"Departure airport IATA code."},"arrivalAirportCode":{"
# --- truncated at 32 KB (203 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/wego/refs/heads/main/openapi/wego-api-openapi.json