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.
Four ways to consume the same value-rated deals. City names resolve to IATA via /api/airports.
# 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
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.
| tier | meaning |
|---|---|
steal | cheaper than ~90%+ of fares to that city (and under an absolute $/hr cap). Renamed from superb, still accepted as an input alias. |
great | cheaper than ~75%+ |
good | cheaper than ~50%+ (displayed as “Typical”) |
fair | cheaper than ~25%+ |
pricey | costlier 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.
Full interactive reference, rendered live from the OpenAPI 3.1 spec — always in sync with the running API.
Connect https://lieflat.co/mcp (Model Context Protocol, Streamable HTTP, no auth). Discovery at /.well-known/mcp.json. Tools:
Errors return a consistent envelope: {"error": {"code", "message", "detail"}}.
| HTTP | error.code | meaning |
|---|---|---|
200 | — | Success. |
400 | invalid_param / missing_param | A query param was the wrong type, or a required one was absent. |
404 | not_found | Deal/watch no longer available (deals live ~2 days). |
429 | rate_limited | Per-IP tier limit exceeded — honor Retry-After + X-RateLimit-* headers. |
503 | unavailable | Backend or data temporarily unavailable. |
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.
| tier | limit | applies to |
|---|---|---|
read | 120/min | search, discover, trends, deal, airports |
mcp | 60/min | /mcp |
write | 10/min | creating price watches |
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.