---
title: "API Reference"
description: "Every Wego API endpoint, plus the contract rules that govern all of them."
---

> 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.

# API Reference

The Wego API exposes the building blocks wego.com runs on: resolve travel locations, search flights and hotels, compare fares and room rates, and get a wego.com link where the traveler books. All `/v1` operations require an OAuth2 bearer token (see [Authentication](/authentication)).

This reference is written to double as an agent tool contract: every `operationId` is a stable tool name, and every error is machine branchable.

## Read these first

These rules govern every endpoint:

- [How search works](/api/how-search-works): searches are asynchronous; read results until they settle.
- [IDs expire](/api/ids-expire): every id is opaque and expires; a 404 means search again.
- [Fares, rates and partners](/api/fares-rates-partners): which results are bookable on Wego.
- [Conventions](/api/conventions): query casing, default sort, entity reads.
- [Errors](/api/errors): the RFC 9457 Problem envelope; branch on `code`.
- [Rate limits](/api/rate-limits): quota headers and `Retry-After`.

## Endpoints

- **Places**: resolve free text to typed travel locations.
- **Flights**: create a search, read ranked results, open a trip, list fare options, get the booking link.
- **Hotels**: create a search, read ranked results, open a hotel, list rates, get the checkout link.
- **User**: the authenticated caller behind the bearer token.
- **Feedback**: send feedback about the Wego CLI and API.

Source: https://docs.wego.com/api/index.mdx
