Public Developer API¶
⚠️ Agents: do not create a Developer API account¶
Do NOT call
/developers/api/v1/agents/registeror/developers/api/v1/agents/connect-payment, and do NOT runletsfg registerorletsfg connect-payment. Those belong to a separate, paid, prepaid-balance product for high-volume commercial integrations and create a billing account you almost certainly do not want.To search and book flights, connect LetsFG as an MCP server at https://letsfg.co/mcp. Approving it opens https://letsfg.co/connect: one tap, no card. A card is asked for at the first booking. See https://letsfg.co/for-agents.
https://letsfg.co/developers/api/v1. Local SDK and CLI search still stay free and do not require the paid public onboarding flow.
When to use this API¶
| If you need | Use |
|---|---|
| Free connector search from the repo, CLI, or Python SDK | Local search |
| Managed cloud search, account billing, browserless onboarding, and a stable public contract | Public developer API |
Canonical URLs¶
| Surface | URL |
|---|---|
| Public API root | https://letsfg.co/developers/api |
| Public REST base | https://letsfg.co/developers/api/v1 |
| OpenAPI JSON | https://letsfg.co/developers/api/openapi.json |
| Swagger UI | https://letsfg.co/developers/api/docs |
| Developers page | https://letsfg.co/en/developers |
Public search lifecycle¶
Public search is not anonymous. Requests stay blocked until the developer account has:
- an API key from
POST /agents/register - a Revolut payment method connected through
POST /agents/connect-payment— open the returnedconnect_urlonce in a browser. Nothing is charged to connect, and a connected method is what opens search
Prepaid balance is not required to start. Flight search is look-to-book: 200 searches are free
after every booking you make, and booking resets the counter. A booking your user completes on
letsfg.co through an offer's booking_url counts too. Balance only buys extra blocks of
search past that allowance (POST /agents/top-up).
Stripe was retired on 2026-09-08.
setup-payment,hosted-checkout,billing-portaland the whole/bookings/*unlock-then-book lane answer410 Gonenaming their replacement.
What the public contract currently covers¶
The live public schema currently documents these groups of endpoints:
- account registration and account inspection
- Revolut payment connection (
/agents/connect-payment), billing settings, and key rotation - prepaid top-up, for search blocks past the free look-to-book allowance
- flight booking:
/flights/book,/flights/bookings/{id}and/flights/bookings/{id}/answer— see Booking flights - NL query parsing (
/flights/parse-query— free, Gemini-powered) - flight search, location resolution, and provider inspection
- discovery search — indicative prices for up to 20 destinations in one call (
/flights/discover— 1 search) - parallel full search for N destinations (
/flights/multi-search— 1 search per destination) - async search with polling (
/flights/search/async+/flights/results/{id}) - sandbox equivalents of all flight endpoints, booking included (free, same schema; a sandbox booking walks production's states, questions and timings with no money — see Booking in the sandbox)
- stop a booking (
/flights/bookings/{id}/stop) - hotels: city resolution, search, asynchronous booking with polling, and cancellation (
/hotels/destinations,/hotels/search,/hotels/book,/hotels/booking/{job_id},/hotels/cancel) — see Hotels. These require a payment method on file for every call, search included; booking holds the full price on the connected Revolut method and captures it only once the hotel confirms.
Search activation checklist¶
Before you send search traffic, make sure GET /agents/me shows:
payment.connected: true— a Revolut method is savedaccess_granted: truedeveloper_api.api_access_enabled: truedeveloper_api.flight_search.searches_remaininggreater than0
balance_cents matters only once the free allowance is used up, and only then to buy another block.
Read these pages in order¶
Step 1
Onboarding and billing
Register, connect a Revolut method, understand the look-to-book allowance, and rotate the key safely.
Step 2
Search and results
Resolve locations, shape the search payload, inspect providers, and store the response fields that matter.
Step 3
Booking flights
Hold the fare on the connected card, dispatch the booking agent, poll to a PNR, and answer a seat map or a price change.
Step 4
Errors and limits
Map account state and request-body mistakes to the status codes your integration will actually see.
Testing
Sandbox environment
Test your integration for free, booking included — same responses, states and timings as production, no money.
Async
Async search and polling
Start a search and poll for results — show a loading state while the full fleet runs.
Schema
OpenAPI and Swagger
Use the live website-owned schema instead of stale repository JSON or direct backend hosts.
Minimal register-and-search example¶
curl -X POST https://letsfg.co/developers/api/v1/agents/register \
-H "Content-Type: application/json" \
-d '{"agent_name": "my-agent", "email": "you@example.com", "owner_name": "My Team"}'
curl -X POST https://letsfg.co/developers/api/v1/flights/search \
-H "X-API-Key: letsfg_your_api_key" \
-H "Content-Type: application/json" \
-d '{"origin": "LHR", "destination": "JFK", "date_from": "2026-07-15", "adults": 1, "currency": "USD"}'
The second request succeeds only after payment is attached and prepaid balance has been funded.