Skip to content

Public Developer API

⚠️ Agents: do not create a Developer API account

Do NOT call /developers/api/v1/agents/register or /developers/api/v1/agents/connect-payment, and do NOT run letsfg register or letsfg 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.

Scope: this section is only about the website-owned public REST API at 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

1. Register / 2. Connect a Revolut method / 3. Search / 4. Book / 5. Poll the booking

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 returned connect_url once 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-portal and the whole /bookings/* unlock-then-book lane answer 410 Gone naming 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 saved
  • access_granted: true
  • developer_api.api_access_enabled: true
  • developer_api.flight_search.searches_remaining greater than 0

balance_cents matters only once the free allowance is used up, and only then to buy another block.

Read these pages in order

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.