lie flat
Developer API

Build on value-rated business-class flight deals.

A free, agent-native API over lie flat's daily-scanned deal cache. Search, discover, and judge nonstop business-class fares — via REST, an OpenAPI spec, or a remote MCP server. No key required.

Base: https://lieflat.co 10 origins · 35 destinations Nonstop · business · round-trip Free · no auth · rate-limited data as of 2026-07-24

Quickstart

Four ways to consume the same value-rated deals. City names resolve to IATA via /api/airports.

curl Python Node MCP (Claude/Cursor) ChatGPT
# Business to Tokyo under $4,000, best value first
curl "https://lieflat.co/api/v1/search?dest=HND,NRT&max_total=4000&sort=value"

# Where can I go from JFK under $5,000?
curl "https://lieflat.co/api/v1/discover?origin=JFK&max_total=5000"

# Is now a good time to buy London business?
curl "https://lieflat.co/api/v1/trends?dest=LHR"
import requests
r = requests.get("https://lieflat.co/api/v1/search",
                 params={"dest": "HND,NRT", "max_total": 4000, "sort": "value"})
for d in r.json()["deals"]:
    print(d["origin"], "→", d["destination"], f"${d['round_trip_usd']:,}", d["value_tier"])
const r = await fetch("https://lieflat.co/api/v1/discover?origin=JFK&max_total=5000");
const { ideas } = await r.json();
ideas.forEach(d => console.log(d.destination_city, `$${d.round_trip_usd}`, d.value_tier));
// Claude Desktop / Cursor: add a remote MCP server (no install)
{
  "mcpServers": {
    "lie-flat": { "url": "https://lieflat.co/mcp" }
  }
}
// Then ask: "use lie flat to find business deals from SFO under $4000"
# ChatGPT → create a GPT → Actions → Import from URL:
https://lieflat.co/api/v1/openapi.json
# Authentication: None

Value model

Every deal is rated against that route's own price history — the percentile of its price-per-hour-in-the-air vs all fares to that city. That's the value_tier + cheaper_than_pct on each result.

tiermeaning
stealcheaper than ~90%+ of fares to that city (and under an absolute $/hr cap). Renamed from superb, still accepted as an input alias.
greatcheaper than ~75%+
goodcheaper than ~50%+ (displayed as “Typical”)
faircheaper than ~25%+
priceycostlier than usual

Trip types: Long Weekend (4–5 day) and Extended Trip (9–10 day) — legacy Power Weekend/Global Reset are still accepted. Everything is nonstop, business class, round-trip. Prices in USD; the API returns data_as_of so you know freshness.

API reference

Full interactive reference, rendered live from the OpenAPI 3.1 spec — always in sync with the running API.

MCP tools

Connect https://lieflat.co/mcp (Model Context Protocol, Streamable HTTP, no auth). Discovery at /.well-known/mcp.json. Tools:

search_deals
Search nonstop, round-trip BUSINESS-class flight deals from US cities, each rated vs the route's own price history. Use for 'take me to <city> in business for under $<X>'. Resolve city names to IATA codes with list_airports first (e.g. Tokyo -> HND,NRT).
discover_destinations
Where can I go? Returns the best-value business-class deal per destination, best first. Use for 'give me ideas for where to go [from <city>] [under $<X>] [in <month>] [to <region>]'.
list_airports
Map of IATA airport code -> city/country covered by lie flat. Use to resolve city names to codes.
create_price_watch
Set a price watch: alert when a business-class deal matching the filters appears at/under a target price. Use for 'tell me when SFO->Tokyo business drops under $4000'. Returns a watch_token to poll with check_price_watch. Pass optional email for an email alert too.
check_price_watch
Poll a price watch by watch_token. Returns status ('active'|'triggered') and the deal if triggered.
cancel_price_watch
Cancel a price watch by watch_token.
price_trends
Is now a good time to buy? Compares today's best business-class fare to a destination against that route's own recent price history (percentiles) and returns a plain-English verdict. Use for 'is now a good time to fly to London business?'.
get_deal
Full detail for one deal by deal_hash — itinerary times, value rating, and all booking options.

Errors & status codes

Errors return a consistent envelope: {"error": {"code", "message", "detail"}}.

HTTPerror.codemeaning
200Success.
400invalid_param / missing_paramA query param was the wrong type, or a required one was absent.
404not_foundDeal/watch no longer available (deals live ~2 days).
429rate_limitedPer-IP tier limit exceeded — honor Retry-After + X-RateLimit-* headers.
503unavailableBackend or data temporarily unavailable.

Rate limits

Per-IP, by endpoint class. Responses carry X-RateLimit-Limit/Remaining/Reset; exceeding a tier returns 429 with Retry-After. Be polite when polling watches.

tierlimitapplies to
read120/minsearch, discover, trends, deal, airports
mcp60/min/mcp
write10/mincreating price watches

Terms & attribution

Free to use, provided as-is with no warranty or uptime guarantee. Data is served from a cache and may be stale or change without notice — always confirm live price on the booking site. Don't attempt to bypass rate limits. If you surface our data, please attribute "deals via lie flat." We may change or remove the API at any time. Questions: see /llms.txt.

← Back to lie flat · llms.txt · openapi.json · mcp.json