letsfg
v2026.5.55
Published
Flight search & booking for AI agents. Server-side engine covers hundreds of airlines. Free search via Bearer token or prepaid Developer API. Includes open-source ranking engine.
Downloads
338
Readme
LetsFG — Your AI agent just learned to book flights. (Node.js)
Server-side search engine. Real prices. One function call. Search hundreds of airlines at raw airline prices — $20–$50 cheaper than Booking.com, Kayak, and other OTAs. Zero dependencies. Built for AI agents.
Two ways to use LetsFG
| | CLI / SDK (this package) | Developer API |
|---|---|---|
| Search cost | Free (Twitter/X Bearer token via letsfg auth) | Prepaid credits |
| Booking URL | 1% concierge fee (min $3) via letsfg.co | Direct airline URL, no fee |
| Speed | 60–90 s | 2–5 s (discover) · 60–90 s (full) |
| Setup | npm install letsfg then letsfg auth | letsfg.co/developers |
Want direct airline URLs without any per-booking fee? Use the Developer API — prepaid credits, results in seconds, no checkout step.
Install
npm install letsfgQuick Start (SDK)
import { LetsFG, cheapestOffer, offerSummary } from 'letsfg';
// Register (one-time)
const creds = await LetsFG.register('my-agent', '[email protected]');
console.log(creds.api_key); // Save this
// Use
const bt = new LetsFG({ apiKey: 'trav_...' });
// Search — FREE
const flights = await bt.search('GDN', 'BER', '2026-03-03');
const best = cheapestOffer(flights);
console.log(offerSummary(best));
// Unlock
const unlock = await bt.unlock(best.id);
// Book
const booking = await bt.book(
best.id,
[{
id: flights.passenger_ids[0],
given_name: 'John',
family_name: 'Doe',
born_on: '1990-01-15',
gender: 'm',
title: 'mr',
email: '[email protected]',
}],
'[email protected]'
);
console.log(`PNR: ${booking.booking_reference}`);Quick Start (CLI)
export LETSFG_BEARER_TOKEN=<your-bearer-token>
letsfg search GDN BER 2026-03-03 --sort price
letsfg search LON BCN 2026-04-01 --json # Machine-readable
letsfg unlock off_xxx
letsfg book off_xxx -p '{"id":"pas_xxx","given_name":"John",...}' -e [email protected]API
new LetsFG({ apiKey, baseUrl?, timeout? })
bt.search(origin, destination, dateFrom, options?)
bt.resolveLocation(query)
bt.unlock(offerId)
bt.book(offerId, passengers, contactEmail, contactPhone?)
bt.setupPayment(token?)
bt.me()
LetsFG.register(agentName, email, baseUrl?, ownerName?, description?)
Helpers
offerSummary(offer)— One-line string summarycheapestOffer(result)— Get cheapest offer from search
Zero Dependencies
Uses native fetch (Node 18+). No axios, no node-fetch, nothing. Safe for sandboxed environments.
Also Available As
- MCP Server:
npx letsfg-mcp— npm - Python SDK + CLI:
pip install letsfg— PyPI - Try without installing: letsfg.co — search instantly in your browser
- GitHub: LetsFG/LetsFG
⭐ Star the repo — we appreciate the support.
License
MIT
