---
title: "Build a durable wego.com search link"
description: "Builds a shareable wego.com flight-search URL from the caller's own route, dates, cabin and passengers."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.wego.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Build a durable wego.com search link

`GET /v1/flights/search-link`

Builds a shareable wego.com flight-search URL from the caller's own route, dates, cabin and passengers. A pure, stateless string build - no upstream call, no search created. It carries no search-scoped id, so it does not expire: whoever opens it runs the search live.

Operation ID: `getFlightSearchLink`

## Parameters

| Name | In | Type | Required | Constraints | Description |
|---|---|---|---|---|---|
| `from` | query | string | yes | pattern `^[A-Z]{3}$` | Origin airport or city code, as sent to the flight search. |
| `to` | query | string | yes | pattern `^[A-Z]{3}$` | Destination airport or city code, as sent to the flight search. |
| `fromCity` | query | boolean \| `0` \| `1` \| `true` \| `false` | no | - | Whether `from` is a city code rather than an airport code. |
| `toCity` | query | boolean \| `0` \| `1` \| `true` \| `false` | no | - | Whether `to` is a city code rather than an airport code. |
| `fromDate` | query | string | yes | pattern `^\d{4}-\d{2}-\d{2}$` | Outbound departure date, YYYY-MM-DD, as sent to the flight search. |
| `toDate` | query | string | no | pattern `^\d{4}-\d{2}-\d{2}$` | Return date, YYYY-MM-DD. Omit for a one-way handoff. |
| `cabin` | query | `economy` \| `premium_economy` \| `business` \| `first` | no | default `"economy"` | Cabin class, as sent to the flight search. |
| `adults` | query | integer | no | 1..9; default `1` | Adult passengers (1-9). |
| `children` | query | integer | no | 0..8; default `0` | Child passengers (0-8). |
| `infants` | query | integer | no | 0..8; default `0` | Infant passengers (0-8). Must not exceed adults. |
| `siteCode` | query | string | no | pattern `^[A-Z]{2}$` | 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. |
| `currency` | query | string | no | pattern `^[A-Z]{3}$` | Pricing currency as a 3-letter ISO 4217 code (e.g. AED). Optional: when omitted the built URL carries NO currency parameter – it is not defaulted to USD, so wego.com shows the market's own default. Pass it to pin the handoff to a currency. |
| `locale` | query | string | no | length 1..35; default `"en"` | Response language tag for the wego.com page (e.g. en, ar). Defaults to en. |

## Responses

| Status | Description |
|---|---|
| `200` | The durable wego.com search URL. |
| `400` | Invalid query parameters. fromDate must be a real calendar date, not in the past, and within 365 days; toDate must be a real date on or after it. A durable link cannot carry a date no live search can represent. |
| `401` | Missing or invalid bearer token. |
| `429` | Rate limit exceeded; retry after the `Retry-After` seconds. |

### `200` body

| Field | Type | Always present | Description |
|---|---|---|---|
| `searchUrl` | string | yes | A wego.com flight-search URL for this route, dates, cabin and passengers. Opening it runs the search live. |
| `expires` | boolean | yes | Always false: the URL carries no search-scoped id, so it keeps working. The prices behind it are whatever a live search returns when it is opened. |

## Example

```bash
FROM_DATE=$(date -u -v+60d +%F 2>/dev/null || date -u -d '+60 days' +%F)

curl -s -H "Authorization: Bearer $TOKEN" \
  "https://api.wego.com/v1/flights/search-link?from=DXB&to=LHR&fromDate=$FROM_DATE"
```

Source: https://docs.wego.com/api/flights/get-flight-search-link/index.mdx
