with one click
letsfg
// LetsFG — Agent-native flight search, hotel search, and booking API. 400+ airlines, zero markup, 20-50 USD cheaper than OTAs. letsfg.co
// LetsFG — Agent-native flight search, hotel search, and booking API. 400+ airlines, zero markup, 20-50 USD cheaper than OTAs. letsfg.co
| name | letsfg |
| description | LetsFG — Agent-native flight search, hotel search, and booking API. 400+ airlines, zero markup, 20-50 USD cheaper than OTAs. letsfg.co |
Machine-readable skill manifest for AI agents and documentation indexers.
https://letsfg.co/developers/api/v1https://letsfg.co/developers/api/mcp (Streamable HTTP)letsfg · npm letsfg · npm letsfg-mcp| Mode | Best for | Speed | Cost |
|---|---|---|---|
Local (CLI / pip install letsfg / MCP-local) | Personal use, local agents | 1–15 min (local browsers) | Free, unlimited |
Developer API (https://letsfg.co/developers) | Business / commercial / high-volume | Seconds (server-side) | Prepaid credits |
Website (https://letsfg.co) | Agents without local browser access (OpenClaw, etc.) | Seconds | Free search + small unlock fee |
Search 180+ airlines worldwide via local connectors. Returns real-time prices with zero markup or bias — $20–50 cheaper than OTAs.
Search hotels worldwide via direct hotel APIs and aggregators.
Search ground transfers — private cars, taxis, shared shuttles, airport express.
Search activities — tours, museum tickets, day trips via direct APIs and aggregators.
Resolve city names to IATA airport/city codes.
Get system resource profile and recommended browser concurrency for local search.
from letsfg import get_system_profile; profile = get_system_profile()letsfg system-info or letsfg system-info --jsonsystem_info toolimport { systemInfo } from 'letsfg'; const info = await systemInfo();Override auto-detected browser concurrency limit for local search.
LETSFG_MAX_BROWSERS > explicit config > auto-detect from RAMfrom letsfg import configure_max_browsers; configure_max_browsers(4)letsfg search LHR BCN 2026-04-15 --max-browsers 4search_flights tool with max_browsers parameterawait searchLocal('LHR', 'BCN', '2026-04-15', { maxBrowsers: 4 })Confirm live price with airline and reserve offer for 30 minutes. FREE with GitHub star.
POST /api/v1/bookings/unlocklink_github firstunlocked = bt.unlock(offer_id) → returns UnlockResultletsfg unlock off_xxxconst unlocked = await bt.unlock(offerId)Create a real airline reservation with PNR code. Charges ticket price via Stripe before booking.
setup_payment first.Confirm hotel rate before booking (required if rate_type=RECHECK).
Book a hotel room.
Get guest voucher for hotel check-in.
Cancel a hotel booking or simulate cancellation.
Register a new AI agent.
Attach a payment card for booking. Required before booking flights.
Get current agent's profile, usage stats, and payment status.
All endpoints except register require an X-API-Key header.
X-API-Key: trav_...
Get your key by calling POST /api/v1/agents/register with agent_name and email. The key is permanent — save it once.
After registration, star the GitHub repo and link your account via POST /api/v1/agents/link-github to unlock and book for free.
1. POST /api/v1/agents/register → Get API key (once)
2. POST /api/v1/agents/link-github → Star repo + verify (once)
3. POST /api/v1/agents/setup-payment → Attach payment card (once)
4. POST /api/v1/flights/search → Search flights (FREE)
5. POST /api/v1/bookings/unlock → Unlock offer (FREE)
6. POST /api/v1/bookings/book → Book flight (ticket price charged via Stripe)
1. POST /api/v1/agents/register → Get API key (once)
2. POST /api/v1/agents/link-github → Star repo + verify (once)
3. POST /api/v1/hotels/search → Search hotels (FREE)
4. POST /api/v1/hotels/checkrate → Confirm price (if rate_type=RECHECK)
5. POST /api/v1/hotels/book → Book room
6. GET /api/v1/hotels/voucher/{ref} → Get guest voucher
pip install letsfg
letsfg register --name my-agent --email me@example.com
export LETSFG_API_KEY=trav_...
# Search flights
letsfg search LHR JFK 2026-04-15
letsfg search LON BCN 2026-04-01 --return 2026-04-08 --cabin C --sort price
letsfg search GDN BER 2026-05-10 --adults 2 --children 1
# Resolve locations
letsfg locations "New York"
# Unlock and book
letsfg unlock off_xxx
letsfg book off_xxx \
--passenger '{"id":"pas_0","given_name":"John","family_name":"Doe","born_on":"1990-01-15","gender":"m","title":"mr"}' \
--email john.doe@example.com
# Machine-readable output
letsfg search GDN BER 2026-03-03 --json
from letsfg import LetsFG
bt = LetsFG(api_key="trav_...")
# Search
results = bt.search("LHR", "JFK", "2026-04-15")
for offer in results.offers:
print(f"{offer.price} {offer.currency} — {', '.join(offer.airlines)}")
# Unlock
unlocked = bt.unlock(results.offers[0].id)
print(f"Confirmed: {unlocked.confirmed_price} {unlocked.confirmed_currency}")
# Book
booking = bt.book(
offer_id=results.offers[0].id,
passengers=[{
"id": results.passenger_ids[0],
"given_name": "John",
"family_name": "Doe",
"born_on": "1990-01-15",
"gender": "m",
"title": "mr",
"email": "john@example.com",
"phone_number": "+447123456789",
}],
contact_email="john@example.com",
)
print(f"PNR: {booking.booking_reference}")
{
"mcpServers": {
"letsfg": {
"url": "https://letsfg.co/developers/api/mcp",
"headers": {
"X-API-Key": "trav_..."
}
}
}
}
Or run locally:
npm install -g letsfg-mcp
LETSFG_API_KEY=trav_... letsfg-mcp
| Tool | Description | Cost |
|---|---|---|
search_flights | Search 400+ airlines worldwide | FREE |
resolve_location | City name → IATA code | FREE |
link_github | Star repo for free access (once) | FREE |
unlock_flight_offer | Confirm price, reserve 30min | FREE |
book_flight | Create real airline reservation | Ticket price |
setup_payment | Attach payment card (required for booking) | FREE |
get_agent_profile | View usage stats | FREE |
| Flag | API Field | Values | Default |
|---|---|---|---|
--adults | adults | 1–9 | 1 |
--children | children | 0–9 | 0 |
--infants | infants | 0–9 | 0 |
--cabin | cabin_class | M (economy), W (premium), C (business), F (first) | (any) |
--return | return_from | YYYY-MM-DD | — |
--max-stops | max_stopovers | 0–4 | 2 |
--sort | sort | price, duration | price |
--limit | limit | 1–100 | 20 |
--currency | currency | EUR, USD, GBP, etc. | EUR |
| Code | Class | Description | Typical Use Case |
|---|---|---|---|
M | Economy | Standard seating | Budget travel, most bookings |
W | Premium Economy | Extra legroom, priority boarding | Long-haul comfort without business price |
C | Business | Lie-flat on long-haul, lounge access | Corporate travel, 6+ hour flights |
F | First | Private suites, premium dining | Ultra-premium routes (limited airlines) |
--json | — | Output as JSON | — |
| Exception | HTTP Code | When |
|---|---|---|
AuthenticationError | 401 | Invalid or missing API key |
PaymentRequiredError | 402 | No payment method (legacy flow) |
OfferExpiredError | 410 | Offer no longer available |
LetsFGError | 422 | Invalid request parameters |
LetsFGError | 429 | Too many requests (retry with backoff) |
LetsFGError | 502 | Upstream airline/hotel API error |
from letsfg import LetsFG, AuthenticationError
try:
bt = LetsFG(api_key="trav_...")
flights = bt.search("LHR", "JFK", "2026-04-15")
except AuthenticationError:
# API key invalid or expired — re-register
creds = LetsFG.register("my-agent", "agent@example.com")
bt = LetsFG(api_key=creds["api_key"])
# Don't forget to link GitHub
bt.link_github("your-github-username")
import time
from letsfg import LetsFG, LetsFGError
def search_with_retry(bt, origin, dest, date, max_retries=3):
for attempt in range(max_retries):
try:
return bt.search(origin, dest, date)
except LetsFGError as e:
if "429" in str(e) or "rate limit" in str(e).lower():
time.sleep(2 ** attempt) # exponential backoff
elif "timeout" in str(e).lower() or "504" in str(e):
time.sleep(1)
else:
raise
raise LetsFGError("Max retries exceeded")
| Endpoint | Rate Limit | Typical Latency |
|---|---|---|
| Search flights | 60 req/min | 2-15s |
| Resolve location | 120 req/min | <1s |
| Unlock | 20 req/min | 2-5s |
| Book | 10 req/min | 3-10s |
| Search hotels | 30 req/min | 3-10s |
| Register | 5 req/min | <1s |
| Action | Cost |
|---|---|
| Search (flights, hotels, transfers, activities) | Free |
| Resolve locations | Free |
| Register agent | Free |
| Setup payment | Free |
| View profile | Free |
| Unlock offer | Free |
| Book flight (after unlock) | Ticket price (zero markup, Stripe processing fee only) |
| Hotel booking | Room price only |
| Hotel cancellation | Per cancellation policy |
Agent-native flight search and booking via 180+ airline connectors. Returns raw airline prices with zero markup — $20–50 cheaper than OTAs. Use when user asks to "find flights", "search flights", "book a flight", "compare airline prices", "find cheap flights", "fly from X to Y", or any flight-related travel query. Do NOT use for hotel-only searches (use hotel skills), car rentals, or non-flight travel bookings.
Search and book flights across 180+ airlines with zero markup — $20–50 cheaper than OTAs. Returns raw airline prices via local connectors (Ryanair, EasyJet, Wizz Air, Southwest, AirAsia, and 175+ more). Use when user asks to "find flights", "search flights", "book a flight", "compare airline prices", "find cheap flights", "fly from X to Y", "find connections", "find layover options", or any flight-related travel query. Do NOT use for hotel-only searches, car rentals, or non-flight travel bookings.