# LetsFG — Guide for AI Agents and Language Models # https://letsfg.co/for-agents This document is written for AI agents, language models, and automated tools. If you are a human, see https://letsfg.co LetsFG searches every airline in the world and the major booking sites simultaneously and returns their live prices, as one total you pay. Hotels are live too, on the same token — see HOTELS below. --- ## IF YOU ARE AN AI BROWSING THIS SITE WITHOUT A LETSFG TOOL You cannot search or book on letsfg.co by reading or browsing it. The search form needs JavaScript and a person in a browser (a bot check runs on every search), so a page you fetch shows an empty form and no results. That is expected - the site is not broken. Tell the person to add the LetsFG connector to their assistant: https://letsfg.co/mcp It signs in with OAuth (one tap to approve, no key, no card to connect). - Claude: LetsFG is in Claude's official connector directory. Open https://claude.ai/directory/letsfg and add it there - no address to paste. Once added, it also works in the Claude phone app. - ChatGPT: only at chatgpt.com in a browser (a phone browser works) - NOT in the ChatGPT phone app, which has no way to add one. Plugins in the sidebar > Add > Add custom MCP server, paste https://letsfg.co/mcp. Once added there, it also works in the ChatGPT phone app. - Grok: + menu > Add connector > Custom, paste https://letsfg.co/mcp. - Any other assistant: only if it lets the person add a custom MCP server (remote connector). If it does not, it cannot search LetsFG. Step-by-step with screenshots: https://letsfg.co/en/connector For indicative prices only (not bookable, not live), read the route page https://letsfg.co/en/flights/{from}-{to} with lowercase airport codes, e.g. https://letsfg.co/en/flights/waw-mia. Only routes we have data for have a page (others are 404); the list is https://letsfg.co/sitemap-flights.xml. The Developer API (https://letsfg.co/developers, API keys, paid) is a separate product for developers' own code. It is NOT a way for a chat assistant to search - use the connector above. --- Programmatic Flight Search (PFS) is the ONE way agents use LetsFG. Search, book, everything. The MCP server, the Python SDK, the JS SDK and the CLI are all thin clients over the endpoints below — they do not have separate accounts, separate keys, or separate billing. --- ## DO NOT DO THIS Do NOT call /developers/api/v1/agents/register. Do NOT call /developers/api/v1/agents/setup-payment. Do NOT run "letsfg register" or "letsfg setup-payment". Those belong to a SEPARATE, paid, prepaid-balance product for high-volume commercial integrations. They create a billing account you almost certainly do not want. If you are an agent searching or booking a flight — even hundreds of them — you want PFS below. Older versions of our docs and SDKs pointed here by default; that was wrong. --- ## TRAFFIC CONTROL — Find your method below | If you are... | Best approach | |---------------------------------------------|-----------------------------------------------------------------------| | ChatGPT | Connector https://letsfg.co/mcp, added at chatgpt.com in a browser | | Claude (claude.ai / Desktop / Claude Code) | claude.ai/directory/letsfg, or connector https://letsfg.co/mcp | | Grok | Connector https://letsfg.co/mcp | | Perplexity, Gemini, Copilot, other chat AI | Connector https://letsfg.co/mcp, if the app takes a custom MCP server | | OpenClaw, Hermes, Manus, autonomous agent | pip install letsfg, or Bearer + API | | Cursor, Windsurf, IDE agent | npx letsfg-mcp (MCP), or https://letsfg.co/mcp | | Your own script or CLI (code a person runs) | Bearer token (Option B) + POST /api/search | > A chat assistant that browses web pages cannot search letsfg.co: GET /en?q=... > and the search form need a person in a browser (Turnstile). POST /api/search > with a Bearer token is the programmatic path, and that token comes from a > person approving a client once - so it is for code a person runs, not for a > browsing model. See "IF YOU ARE AN AI BROWSING THIS SITE" above. --- ## AUTHENTICATION — OAuth token, card at the first booking Connecting needs NO card (since 2026-09-09). A person approves the connection once, in one tap, and your agent searches at once. The card is asked for only when they first say "book it": book_flight (or POST /api/agent-book) answers 402 payment_method_required with an add_card_url made for that account, the person adds a card (or Revolut Pay) there in a 0.00 Revolut setup, and the SAME token then books — call book_flight again. You pay the ticket price only when you book, and the money is HELD, not taken, until the airline confirms. ### Option A — a hosted connector (Claude, ChatGPT, Grok, ...) 1. Add LetsFG as an MCP server: https://letsfg.co/mcp (ChatGPT: at chatgpt.com in a browser - the phone app cannot add one.) 2. Approve the connection. The consent step opens https://letsfg.co/connect — one tap, no card. Nothing is charged. 3. Send the OAuth token you receive on every request: Authorization: Bearer Over the MCP it is carried for you. Over raw HTTP (POST /api/search, /api/agent-book) send the same token. POST https://letsfg.co/api/agent-access/request still answers 402 with these steps as JSON ("add_card_url", "how"), so an agent that starts from the endpoint lands in the same place. ### Option B — any other client: register yourself (CLI, stdio, your own agent) You do NOT need to be one of the hosted connectors. Any client that speaks OAuth can put itself on the SAME lane — nothing is withheld from it. This is the path for a CLI, an stdio MCP server, a Python/npm package, or a bot you wrote yourself. 1. Discover (RFC 8414): GET https://letsfg.co/developers/api/.well-known/oauth-authorization-server It advertises authorization_endpoint = https://letsfg.co/connect — the one-tap approve screen, not a developer login. Use the advertised value, do not hand-build a URL against /developers/api/oauth/authorize: that is the DEVELOPER API's email sign-in and it is a different account type. 2. Register yourself (RFC 7591 dynamic client registration, no credentials needed). A loopback redirect is fine: POST https://letsfg.co/developers/api/oauth/register {"client_name": "my-cli", "redirect_uris": ["http://127.0.0.1:8765/callback"], "grant_types": ["authorization_code", "refresh_token"], "response_types": ["code"], "token_endpoint_auth_method": "none"} -> 201 {"client_id": "lfg_client_..."} THREE KINDS OF redirect_uri ARE ACCEPTED. Pick whichever your client can actually receive on: https://your.app/oauth/callback a hosted client with a web origin http://127.0.0.1:/callback loopback, RFC 8252 — a CLI or a http://localhost:/callback script; any port, no registration of the port needed yourapp://auth/callback your app's own private-use URI scheme, RFC 8252 section 7.1 — a desktop client the OS routes to (cursor://, vscode://, zed://) http:// is loopback-only; anything else must be https:// or a private-use scheme. The URI must be hierarchical — everything after the colon starts with "/", so "yourapp://auth/callback" and "com.you.app:/callback" are both fine, "yourapp:auth" is not. No fragment (RFC 6749 section 3.1.2). Schemes a browser would execute rather than navigate to (javascript:, data:, file:, ...) are refused. A refusal names the URI and what is accepted, so read the 400 body rather than guessing. PKCE S256 is mandatory on every grant (step 3), which is what makes a private-use scheme safe to use here. 3. Open the authorization_endpoint in the person's browser, with PKCE: https://letsfg.co/connect ?response_type=code &client_id=lfg_client_... &redirect_uri=http://127.0.0.1:8765/callback &code_challenge= &code_challenge_method=S256 &state= &scope=flights:search%20flights:book scope is optional: leave it out and you get every scope in scopes_supported (flights:search flights:book hotels:search hotels:book profile:read). Ask only for names from that list. They see " can book your flights now" and tap once. Nothing is charged and no card is asked for. redirect_uri must match what you registered EXACTLY. If you registered a private-use scheme, the last step is an OS app launch rather than a page navigation, and a browser may decline to launch an app without a fresh click from the person. The connect screen handles that: it attempts the handoff, and if the page is still open a moment later it shows a "Return to " button carrying the same code. Your client should be running and registered as the handler for its scheme before you send the person to the authorization endpoint. 4. Catch the code on your redirect_uri and exchange it within 90 seconds (the code is single-use and short-lived): POST https://letsfg.co/developers/api/oauth/token Content-Type: application/x-www-form-urlencoded grant_type=authorization_code&code=...&client_id=... &redirect_uri=...&code_verifier= -> {"access_token": "...", "refresh_token": "...", "token_type": "Bearer"} The parameters go in the POST BODY (form-encoded, or a JSON object), never in the query string. EVERY ANSWER FROM THIS ENDPOINT IS JSON, refusals included: {"error": "invalid_grant", "error_description": "...", "retryable": false}. If you get an error with no JSON body - a bare 502, 403 or an HTML page - it did not come from LetsFG. Something between you and us produced it, usually the outbound proxy of the sandbox you run in. See the next note. IF YOU RUN IN A HOSTED SANDBOX (an AI app's code tool, a cloud agent): a loopback redirect_uri only works when the person's browser is on the SAME machine as you. In a sandbox it is not: their browser ends up on a dead http://127.0.0.1 page and you never see the code. Do one of these: a. Best: use your platform's own connector. Add https://letsfg.co/mcp as an MCP server in the AI app and let the app run this whole flow - it registers its own https callback and holds the tokens for you. b. Or ask the person to copy the full address their browser ends on (it contains ?code=...&state=...) and paste it to you straight away. c. If your sandbox's proxy refuses calls to a token endpoint (you get its own error on POST /oauth/token, never ours), no code exchange and no refresh can run from where you are. Have the person get the token OUTSIDE the sandbox and carry it in: on their own machine they run "letsfg auth", then ask for a long-lived access token once (step 5, access_token_ttl) and give it to you as LETSFG_BEARER_TOKEN, or as the Authorization: Bearer header. It needs no refresh until it ends. 5. The access token is short-lived (about an hour). Refresh it — do not ask the person to reconnect: POST https://letsfg.co/developers/api/oauth/token grant_type=refresh_token&refresh_token=...&client_id=... Refresh tokens do not expire; they ROTATE on every use - store the new one. error = invalid_grant means that refresh token is dead for good: do not send it again, run steps 3-4 again to get a new one. A LONGER-LIVED ACCESS TOKEN, when you cannot refresh every hour: add access_token_ttl= to the body of either token request (the code exchange in step 4 or the refresh above). Default 3600; anything up to 7776000 (90 days) is given as asked, more is brought down to 90 days, and the expires_in in the answer says what you got. POST https://letsfg.co/developers/api/oauth/token grant_type=refresh_token&refresh_token=...&client_id=... &access_token_ttl=7776000 It is a bearer secret for that whole time: whoever holds it can search and book on the person's account. Ask only for as long as you need. A human still has to approve once, in a browser. There is no endpoint that mints a token headlessly, and letsfg.co/connect opened WITHOUT these OAuth parameters has nothing to consent to — it will just explain this flow. The card, when booking asks for it, is entered by the person on the add_card_url the 402 carries; there is no endpoint that takes card details. RETIRED 2026-09-02: the Stripe enrolment lanes (setup_url, setup_intent_id, payment_method_id, card_token) and every token they issued. A token from those lanes now answers 401 TOKEN_REVOKED; POST /api/agent-access/verify answers 410 for a Stripe credential. Connect the card again at letsfg.co/connect. ONE CARD = ONE BUCKET. Until a card is added, quotas and rate limits are bucketed per connected account. Once a card is added they follow the card: the same card added from two sign-ins shares one set of limits, so a shared or recycled card gains you nothing. MPP (wallet, card-free) remains available only when the 402 response carries an "mpp" object and a WWW-Authenticate: Payment header; it costs one cent, once, and is verified at POST /api/agent-access/verify with Authorization: Payment. Store your token securely. If it leaks, disconnect and reconnect to rotate it. --- ## SEARCH ### Step 1 — Start a search POST https://letsfg.co/api/search Authorization: Bearer YOUR_TOKEN Content-Type: application/json Natural language query (Gemini-parsed, recommended): {"query": "London to Barcelona June 15 2026"} Or structured (faster, skips the parse round-trip): {"origin": "LHR", "destination": "BCN", "date_from": "2026-06-15"} Optional fields: return_date, adults, children, infants, cabin ("M"/"W"/"C"/"F"), max_stops, currency The party is COUNTS only: adults (12 and over), children (2-11, seated), infants (under 2, on a lap). There is no child-age field on a flight search - the ages come from each traveller's born_on when you book (see BOOK). Hotels are different: a hotel search takes child_ages (see HOTELS). Response: {"search_id": "ws_abc123", "status": "searching", "parsed": {...}} parsed echoes the party the search ran for: adults, children, infants, and - for more than one seat - passengers = the seats priced (adults + children; a lap infant takes no seat). No passengers field means one seat. If the query is ambiguous you may get status 422 with "needs_clarification": true and "follow_up_questions" to ask the user before retrying with a resolved query. ### Step 2 — Poll for results GET https://letsfg.co/api/results/{searchId} Authorization: Bearer YOUR_TOKEN Poll every 10 seconds. Returns JSON: While searching: { "status": "searching", "progress": {"checked":47,"total":180,"found":12} } When done: { "status": "completed", "total_results": 43, "cheapest_price": 89.50, "offers": [...] } If expired: { "status": "expired" } ← start a new search ### Step 3 — Read offers Each offer in the offers array: { "id": "ws_off_abc123", ← use this for booking "price": 89.50, "currency": "EUR", "airline": "Ryanair", "airline_code": "FR", "origin": "STN", "destination": "BCN", "departure_time": "2026-06-15T06:25:00", "arrival_time": "2026-06-15T09:30:00", "duration_minutes": 125, "stops": 0, "google_flights_price": 109.00, ← Google Flights price for comparison "segments": [ ... ], ← every hop of the outbound (see below) "inbound": { ... }, ← round trips only "trip_breakdown": [ ... ] ← one summary per direction or ticket } segments[] - one entry per flight, in flying order: airline, airline_code, flight_number, origin, destination, departure_time, arrival_time, duration_minutes, and when known aircraft and cabin. A connecting flight always has them; a nonstop may omit the array, and then the offer's own top-level fields are its one flight. Times are the AIRPORT'S LOCAL time, written without a UTC offset ("2026-06-15T06:25:00"). Do not convert them, and do not work out a duration by subtracting two of them - use duration_minutes. A timestamp that does carry an offset or "Z" is not a promise that the next one will. Round trips: the top-level fields and segments[] are the OUTBOUND direction; "inbound" has the same fields (origin, destination, departure_time, arrival_time, duration_minutes, stops, airline, airline_code, flight_number) and its own segments[] with every hop of the return. trip_breakdown[] is a summary, not the hops: one entry per direction, leg "outbound" / "inbound", or one per ticket when the trip is sold as several (leg "outbound", "outbound-2", "inbound", ... with ticket and direction). The return is labelled "inbound", never "return". PRICE is per seat, for the WHOLE itinerary: both directions of a round trip, every ticket of a multi-ticket trip. It is never a one-way half. No field labels the basis; it is always per seat. For a party, the total is price x the seats: parsed.passengers when present, else adults + children, else 1 (lap infants are not seats). The amount the booking holds is returned by /api/agent-book as held.amount in held.currency (when the card's currency differs, "quoted" carries the figure in the offer's currency) - quote that one once you have it. Do not add anything else on top, and do not expect the provider's own site to show the same figure. --- ## BOOK Booking works EXACTLY like the website checkout, on the card connected to the account: the price shown is HELD on the card (not taken), a LetsFG booking agent buys the ticket from the seller, and the hold is captured only once a real airline PNR exists. If the booking fails, the hold is released and nothing is charged. ### Step 1 — Start the booking POST https://letsfg.co/api/agent-book Authorization: Bearer YOUR_TOKEN Content-Type: application/json { "search_id": "ws_abc123", "offer_id": "wo_abc123", "contact_email": "traveller@example.com", "passenger": { "given_name": "Ada", "family_name": "Lovelace", "born_on": "1990-04-01", "gender": "f", "nationality": "GB", "phone_number": "+15551234567", "phone_country": "US", "address_line1": "1 Analytical Way", "address_city": "London", "address_postal": "N1 9GU", "address_country": "GB", "passport_number": "123456789", "passport_country": "GB", "passport_expiry": "2031-04-01", "passport_issue": "2021-04-02" } } Use REAL traveller details — the airline's checkout asks for every one of them and the e-ticket goes to contact_email. A passport you pass must be whole - number, issuing country, expiry and issue date - and it is used; one already saved on the traveller's account is used too. If a booking cannot go ahead without one, the answer is missing_details naming the passport fields (nothing charged). Where a booking can wait for it instead, LetsFG e-mails the traveller a secure letsfg.co link to add it (never type it into a chat): the booking waits 15 minutes, and if none is added the hold is released and nothing is charged. A passport goes only to the seller that books the trip. passport_issue is the date printed as "Date issued" in the passport. Both dates are YYYY-MM-DD. A PARTY IS ONE CALL. "passenger" is the lead traveller; everyone else goes in "additional_passengers", a list of the same shape (given_name, family_name, born_on, gender, nationality and the passport fields). Each traveller's born_on sets their type on the travel date: under 2 for the whole trip = lap infant (no seat), under 12 = child, otherwise adult. The hold is the whole party's fare: price x the seats (lead + everyone who is not a lap infant). Never book a group as one call per person - each call is a separate booking and a separate hold. Missing something? Nothing is charged, and you are told exactly what to ask for: { "error": "missing_details", "missing_fields": ["born_on", "address_city"], "charged": 0 } Started (returns within seconds; the booking itself takes 4-11 minutes): { "ok": true, "booked": false, "state": "booking_in_progress", "booking_id": "agt_1788...", "booking_ref": "eyJ...", "held": { "amount": 93, "currency": "EUR", "card": "visa ending 5709" }, "charged": 0 } Card refused: { "error": "payment_declined", "add_card_url": "https://letsfg.co/connect", "charged": 0 } No card connected yet: { "error": "payment_method_required", "add_card_url": "https://letsfg.co/connect", "charged": 0 } ### Step 2 — Poll until it lands POST https://letsfg.co/api/agent-book/status Authorization: Bearer YOUR_TOKEN { "booking_ref": "eyJ..." } Every 20-30 seconds. "state" walks booking_in_progress -> completed | failed | needs_attention; "updated_at_ms" says when it last moved. { "state": "completed", "pnr": "ABC123", "charged_amount": 93, "currency": "EUR" } { "state": "failed", "failure_reason": "...", "charged_amount": null } { "state": "needs_attention" } -- a human at LetsFG is checking it; do NOT book again Only "completed" with a PNR means booked. On "failed" the hold has been released and nothing was charged. Never start a second booking for the same trip while one is in progress — that would place a second hold. Over the MCP these two steps are the tools book_flight and get_flight_booking. --- ## HOTELS — the same card as flights, no separate enrolment Your PFS Bearer token works here too, exactly as it does for flights — the same card-on-file authorises both. A Developer API key (X-API-Key) works as well if you already have one. Neither is required over the other; use whichever you already have. If you have neither, you need a payment method on file before you can search or book. PFS (no API key): connect a card at https://letsfg.co/connect. Developer API: POST /api/v1/agents/connect-payment returns a one-time link to open in a browser - nothing is charged to connect. (The old /agents/setup-payment was retired on 2026-09-08 with Stripe and answers 410.) ### What you get Real, bookable inventory at every rate type the supplier sells: refundable (the whole price back if cancelled before a date) and non-refundable. Each offer says which, in refundable, free_cancellation_until and cancellation_policy. ### How you pay Booking HOLDS the full price on the connected Revolut payment method: the money is authorised, not taken. LetsFG then books the room and pays the hotel supplier itself. The hold is captured only once the supplier has confirmed the booking. If the booking fails for any reason (the rate is gone, the price moved, the supplier declined, a guest detail was rejected), the hold is released and nothing is charged. There is no reservation fee, no deposit and no pay link, and the guest owes the hotel supplier nothing further. An offer's price is the total the guest pays. Nothing is added at booking, so the guest is never charged more than the price returned at search. Prices come in the currency you ask for, USD by default. Before 2026-09-11 hotels were sold differently: a 5% reservation fee at booking and a supplier pay link for the balance. That process is retired; only bookings made before that date have a pay link. ### A card is required for SEARCH, not just booking This is unusual and it is intentional: a hotel search opens a real session at the supplier, and booking blocks a real rate. We refuse up front rather than let you reach the point of commitment and discover you cannot pay. Every hotel endpoint returns 402 without a payment method on file. ### Search pricing: look-to-book Search is free up to 1,000 searches since your last hotel booking. Past that allowance, searches are sold in blocks of 1,000 for $5.00, debited from your prepaid developer balance the moment you cross the current allowance. Booking a hotel resets the free allowance back to 1,000 - so does a stay a guest completes on letsfg.co through a hotel's booking_url. One card can only ever back one developer account — re-submitting the same card under a new account does not grant a fresh allowance. ### Booking is asynchronous POST /hotels/book returns a booking_job_id, NOT a booking. A real booking takes minutes: the rate is re-checked, the room is held and paid at the supplier, and the confirmation is read back. Hotel bookings run one at a time, so a booking may wait a few minutes behind another; one that cannot start within 20 minutes fails and its hold is released. Poll GET /hotels/booking/{booking_job_id} every ~20s until status is "succeeded", "failed" or "attention": - succeeded: the room is booked and paid. The result carries confirmation, total_price + currency (what the guest is charged), supplier_paid + supplier_currency (what the supplier was paid), refundable, free_cancellation_until, cancellation_ladder and terms. - failed: nothing was booked, the hold has been released and nothing was charged. error says why, in words you can pass on to the guest. - attention: the outcome could not be settled automatically. The hold is kept, nothing is charged, and a person checks it with the supplier. This is final for you: do not book again and do not keep polling. Whichever way it ends, the guest is e-mailed at the booking's email. Do NOT re-POST /hotels/book for the same rate while a job is running: poll the job instead. A retry of the same booking (the same idempotency_key, or the same offer, guest e-mail and check-in) returns the job already under way and never holds the money twice. ### Flow 1. POST /developers/api/v1/hotels/destinations {"text": "Warsaw"} → take Id as city_id and Name as city_name from the first result 2. POST /developers/api/v1/hotels/search {"city_id": 148614, "city_name": "Warsaw, Poland", "check_in": "2026-11-10", "check_out": "2026-11-12", "adults": 2, "currency": "USD"} → pick a hotel (hotel_code) and one of its offers. Each offer carries session_id, combination_id_v2, price, currency, fx_rate, expected_cost, refundable, free_cancellation_until and cancellation_policy. 3. POST /developers/api/v1/hotels/book Send the offer's session_id and combination_id_v2 and the hotel_code. Copy the offer's price as expected_price, and its expected_cost, currency and fx_rate, EXACTLY as search returned them (currency defaults to PLN, so leaving it off a USD offer is refused as price_mismatch). Add city_id, city_name, check_in, check_out, guests [{"title", "first_name", "last_name"}], email and phone (+ phone_country_code). guests has one entry per guest in the room, children included: adults first, then children in the order of child_ages. A booking with fewer names than guests is refused before anything is submitted, and the hold is released. Guest details are checked before anything is held (400 invalid_details), and the booking fails, with the hold released, if the supplier's price has moved, so a guest is never charged a price they did not agree to. → returns booking_job_id; the price is now HELD, not taken 4. GET /developers/api/v1/hotels/booking/{booking_job_id} → status succeeded, failed or attention (see above) 5. POST /developers/api/v1/hotels/cancel {"confirmation": "..."} Only your own booking, on a refundable rate before its free_cancellation_until: everything the guest paid comes back (the response's refund.amount says exactly), or the whole hold is released if nothing was captured yet. A cancellation that would cost money is refused (409); the hotel's own ladder is in the booking's terms. Takes over a minute: if it times out, do NOT assume it failed. Re-check before retrying. ### SDKs pip install -U letsfg # 2026.5.101 or later npm install letsfg@latest # 2026.5.74 or later npx -y letsfg-mcp@latest # 2026.5.77 or later lfg.hotel_destinations / search_hotels / book_hotel_and_wait / cancel_hotel Earlier SDK releases send the reservation-fee contract retired on 2026-09-11 (expected_balance, no expected_cost), and the API refuses every hotel booking they make: update before booking. The hosted MCP needs no update. MCP tools: resolve_hotel_city, search_hotels, book_hotel, get_hotel_booking, cancel_hotel_booking. --- ## WHOLE TRIPS — flights and hotels, booked 24 hours apart A traveller can plan and book a whole trip with LetsFG: flights and hotels. A flight and a hotel are always two separate bookings, never one. Under EU package-travel law, once one of them is booked, the other for overlapping dates can be booked with LetsFG from 24 hours later; a booking asked for sooner is refused with the time it can be made. An order that was opened but never paid does not count. So: plan the whole trip together, book one part now, and book the other once the 24 hours have passed. --- ## PRICE WATCH — in Claude, as a daily scheduled task watch_price follows the price of a flight trip or a hotel stay the traveller is not ready to book. LetsFG sends no e-mail and does not re-check on its own. check_price returns the watches with their latest prices: a price older than about 10 hours is checked again live (a flight takes a minute or two; if it is still running, call check_price again shortly), and a watch that got cheaper says so, with how to book it. Set it up as a scheduled task in Claude that runs once or twice a day - watch_price's answer gives the prompt. Watches set before 2026-11-03 keep their daily e-mail until the trip. MCP tools: watch_price, check_price. --- ## FLIGHT RELIABILITY — check a flight's real track record Every offer names a flight (airline_code + flight_no). You can pull that flight's actual recent performance before recommending it: POST https://letsfg.co/api/trips/check-flight Content-Type: application/json {"flightCode": "FR5873"} Returns real data scraped per flight, not an airline-wide average: { "ident": "FR5873", "origin": {...}, "destination": {...}, "cancelled": false, "diverted": false, "aircraft_type": "B738", "reliability": { "sample_size": 12, "avg_departure_delay_minutes": 15, "avg_arrival_delay_minutes": 2, "cancelled_pct": 0, "diverted_pct": 0 }, "recent_history": [ ...per-departure outcomes... ] } This is the single most useful thing you can add on top of price. Two offers at the same fare are not equal if one flight averages +15m departure delay and the other averages +2m. Use it to rank, and to warn the user about tight layovers. Takes 5-20s (it launches a real browser against a live source), so call it for the handful of offers you are actually considering, not for every result. --- ## TIMING AND RELIABILITY - A search checks every airline and the major booking sites and typically finishes in 2–3 minutes. - Poll every 10 seconds. After 3 minutes total, poll every 20 seconds. - Maximum search lifetime: 15 minutes. After that, status = "expired". - If you get "expired" before results arrive, start a new search. - Offers expire with the search — book within that window or search again. - The cheapest offer is in cheapest_price. Full list sorted by price in offers[]. --- ## PRICING | Action | Cost | |--------|--------------------------------------------------------------| | Auth | FREE on the card lanes — zero-amount setup, no charge, no hold | | | $0.01 once on the MPP lane — see AUTHENTICATION, lane C | | Search | FREE. 60 search credits a day per account, refilling all day | | | (90 banked / 75 a day with a payment method). A new search | | | costs 1; more dates on the same route 0.5; re-running the same | | | search costs double each time. Out of credits = a 429 that | | | says when it refills. To follow a fare, use a price alert. | | Book | The price shown on the offer. What you see is what is charged | --- ## QUICK REFERENCE — API ENDPOINTS | Endpoint | Method | Auth | Purpose | |-----------------------------|--------|--------------|--------------------------------| | /api/agent-access/request | POST | None | How to connect a card (402) | | /api/agent-access/verify | POST | None | MPP wallet → Bearer token | | /api/search | POST | Bearer token | Start a search | | /api/results/{searchId} | GET | Bearer token | Poll search status as JSON | | /api/agent-book | POST | Bearer token | Start a booking (hold + agent) | | /api/agent-book/status | POST | Bearer token | Poll a booking by booking_ref | | /llms.txt | GET | None | LLM instructions | | | | | | | HOTELS — the same PFS Bearer token, or an X-API-Key (see HOTELS above) | | /developers/api/v1/hotels/destinations | POST | Token/Key | Place name → city id | | /developers/api/v1/hotels/search | POST | Token/Key | Bookable hotel rates | | /developers/api/v1/hotels/book | POST | Token/Key | Start a booking (async)| | /developers/api/v1/hotels/booking/{id} | GET | Token/Key | Collect the result | | /developers/api/v1/hotels/cancel | POST | Token/Key | Release a reservation | --- ## INSTALL OPTIONS Python SDK: pip install letsfg letsfg auth # connects a card at letsfg.co/connect, nothing charged letsfg auth --no-browser # prints the URL instead of opening a browser letsfg search LHR JFK 2026-07-01 JavaScript/TypeScript SDK: npm install letsfg letsfg auth # same connect flow, same token file import { LetsFG } from 'letsfg' letsfg auth registers itself as an OAuth client (Option B above), so it needs no allowlist and no hosted connector. A PERSON approves once in the browser; the token lands in ~/.letsfg/config.json and refreshes itself from then on. MCP Server (Claude Desktop, Cursor, Windsurf): npx letsfg-mcp --- ## MIGRATING FROM TWITTER/X TOKEN AUTH Tokens issued through the old tweet challenge still SEARCH, but they cannot BOOK: that flow never collected a payment method. POST /api/agent-book returns 402 "reenrolment_required" with the exact steps. What still works on an old token: /api/search and /api/results. What does not: /api/agent-book. Every response to an old token also carries a Deprecation header, a Warning header, and a Sunset date once one is set. All old tokens expire by 2026-10-27 and no new ones can be issued. To fix it, once: connect a card at https://letsfg.co/connect (see AUTHENTICATION above). Nothing is charged to connect it. Everything else about your integration stays the same. The same applies to tokens from the retired Stripe enrolment lanes (2026-09-02): they answer 401 TOKEN_REVOKED on every endpoint. Connect the card again at letsfg.co/connect. --- ## Developer API — not needed for flights or hotels https://letsfg.co/developers is a distinct API with its own X-API-Key and its own billing account. For FLIGHTS you almost certainly do not want it: PFS above does search and booking, and the Developer API adds a prepaid billing account you did not ask for. Use PFS unless a human has explicitly told you to set up a commercial developer account. HOTELS do not need it either. The hotel endpoints accept the same PFS Bearer token as flights (see HOTELS above); booking a room needs a card on file, exactly as booking a flight does. Never register a Developer API account on a user's behalf to reach hotels. --- ## LINKS For agents: https://letsfg.co/for-agents GitHub: https://github.com/LetsFG/LetsFG PyPI: https://pypi.org/project/letsfg/ npm SDK: https://www.npmjs.com/package/letsfg npm MCP: https://www.npmjs.com/package/letsfg-mcp