letsfg 2026.4.37 → 2026.5.53

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,12 +1,21 @@
1
1
  # LetsFG — Your AI agent just learned to book flights. (Node.js)
2
2
 
3
- **200 airlines. Real prices. One function call.** Search 400+ airlines at raw airline prices — **$20–$50 cheaper** than Booking.com, Kayak, and other OTAs. Zero dependencies. Built for AI agents.
4
-
5
- > **Don't want to install anything?** [**Try it on Messenger**](https://m.me/61579557368989) — search flights instantly, no setup needed.
3
+ **200+ airline connectors. Real prices. One function call.** Search 400+ airlines at raw airline prices — **$20–$50 cheaper** than Booking.com, Kayak, and other OTAs. Zero dependencies. Built for AI agents.
6
4
 
7
5
  [![GitHub stars](https://img.shields.io/github/stars/LetsFG/LetsFG?style=social)](https://github.com/LetsFG/LetsFG)
8
6
  [![npm](https://img.shields.io/npm/v/letsfg)](https://www.npmjs.com/package/letsfg)
9
7
 
8
+ ## Three ways to use LetsFG
9
+
10
+ | | **Local** (this SDK) | **letsfg.co** (website / agent API) | **Developer API** |
11
+ |---|---|---|---|
12
+ | **Search cost** | Free | Free | Prepaid credits |
13
+ | **Booking URL** | 1% concierge fee (min $3) via letsfg.co | 1% concierge fee (min $3) via letsfg.co | Direct airline URL, no fee |
14
+ | **Speed** | 1–15 min (local browsers) | Seconds | Seconds |
15
+ | **Setup** | `npm install letsfg` | [letsfg.co](https://letsfg.co) | [letsfg.co/developers](https://letsfg.co/developers) |
16
+
17
+ > **Want direct airline URLs without any per-booking fee?** Use the [Developer API](https://letsfg.co/developers) — prepaid credits, results in seconds, no checkout step.
18
+
10
19
  > ⭐ **[Star the repo](https://github.com/LetsFG/LetsFG) → register → unlimited access forever.** First 1,000 stars only.
11
20
 
12
21
  ## Install
@@ -86,6 +95,8 @@ letsfg book off_xxx -p '{"id":"pas_xxx","given_name":"John",...}' -e john@exampl
86
95
 
87
96
  Search 200 airline connectors locally (no API key needed). Requires Python + `letsfg` installed.
88
97
 
98
+ > **Note:** Local search results return masked booking links by default. Each offer includes `offer_ref` and `payment_token` fields. To get a direct airline booking URL, use the **concierge unlock flow** (1% fee, min $3 — no API key needed) or sign up for the **Developer API** at [letsfg.co/developers](https://letsfg.co/developers) for fee-free direct links.
99
+
89
100
  ```typescript
90
101
  import { searchLocal } from 'letsfg';
91
102
 
@@ -96,6 +107,52 @@ console.log(result.total_results);
96
107
  const result2 = await searchLocal('GDN', 'BCN', '2026-06-15', { maxBrowsers: 4 });
97
108
  ```
98
109
 
110
+ ### Unlocking offer results
111
+
112
+ Local search results include `offer_ref` and `payment_token` on each offer. Use these to retrieve the direct airline booking URL via the concierge flow (no API key required):
113
+
114
+ ```typescript
115
+ import { searchLocal } from 'letsfg';
116
+
117
+ const result = await searchLocal('GDN', 'BCN', '2026-06-15');
118
+ const offer = result.offers[0];
119
+
120
+ // 1. Initiate checkout — fee = max(price × 1%, $3.00). No API key needed.
121
+ const checkoutRes = await fetch('https://letsfg.co/api/developers/checkout', {
122
+ method: 'POST',
123
+ headers: { 'Content-Type': 'application/json' },
124
+ body: JSON.stringify({
125
+ offer_id: offer.id,
126
+ offer_ref: offer.offer_ref,
127
+ payment_token: offer.payment_token,
128
+ currency: offer.currency,
129
+ price: String(offer.price),
130
+ }),
131
+ });
132
+ const { checkout_url } = await checkoutRes.json();
133
+
134
+ // 2. Present checkout_url to the user (or open it programmatically)
135
+ console.log(`Pay here: ${checkout_url}`);
136
+
137
+ // 3. Poll until payment is confirmed
138
+ async function pollVerify(token: string): Promise<string> {
139
+ while (true) {
140
+ await new Promise(r => setTimeout(r, 3000));
141
+ const res = await fetch(
142
+ `https://letsfg.co/api/developers/payment-verify?token=${token}`
143
+ );
144
+ const data = await res.json();
145
+ if (data.verified) return data.booking_url;
146
+ }
147
+ }
148
+
149
+ // 4. booking_url is the direct airline link — no further fees
150
+ const bookingUrl = await pollVerify(offer.payment_token);
151
+ console.log(`Book here: ${bookingUrl}`);
152
+ ```
153
+
154
+ To skip the per-booking fee entirely, use the [Developer API](https://letsfg.co/developers) — it returns direct airline booking URLs on every search result.
155
+
99
156
  ### `systemInfo()`
100
157
 
101
158
  Get system resource profile and recommended concurrency settings.
@@ -128,7 +185,7 @@ Or set the `LETSFG_MAX_BROWSERS` environment variable globally.
128
185
 
129
186
  - **MCP Server**: `npx letsfg-mcp` — [npm](https://www.npmjs.com/package/letsfg-mcp)
130
187
  - **Python SDK + CLI**: `pip install letsfg` — [PyPI](https://pypi.org/project/letsfg/)
131
- - **Try without installing**: [Message us on Messenger](https://m.me/61579557368989)
188
+ - **Try without installing**: [letsfg.co](https://letsfg.co) — search instantly in your browser
132
189
  - **GitHub**: [LetsFG/LetsFG](https://github.com/LetsFG/LetsFG)
133
190
 
134
191
  > ⭐ **[Star the repo](https://github.com/LetsFG/LetsFG)** to unlock free access. First 1,000 stars only.
@@ -176,7 +176,7 @@ Install: pip install letsfg && playwright install chromium`
176
176
  child.stdin.end();
177
177
  });
178
178
  }
179
- var DEFAULT_BASE_URL = "https://api.letsfg.co";
179
+ var DEFAULT_BASE_URL = "https://letsfg.co/developers";
180
180
  var LetsFG = class {
181
181
  apiKey;
182
182
  baseUrl;
package/dist/cli.js CHANGED
@@ -197,7 +197,7 @@ Install: pip install letsfg && playwright install chromium`
197
197
  child.stdin.end();
198
198
  });
199
199
  }
200
- var DEFAULT_BASE_URL = "https://api.letsfg.co";
200
+ var DEFAULT_BASE_URL = "https://letsfg.co/developers";
201
201
  var LetsFG = class {
202
202
  apiKey;
203
203
  baseUrl;
@@ -780,7 +780,7 @@ Commands:
780
780
  Options:
781
781
  --json, -j Output raw JSON
782
782
  --api-key, -k API key (or set LETSFG_API_KEY)
783
- --base-url API URL (default: https://api.letsfg.co)
783
+ --base-url API URL (default: https://letsfg.co/developers)
784
784
 
785
785
  Examples:
786
786
  letsfg register --name my-agent --email me@example.com
package/dist/cli.mjs CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  LetsFG,
4
4
  LetsFGError,
5
5
  offerSummary
6
- } from "./chunk-AUXPORRU.mjs";
6
+ } from "./chunk-LBHJ4GE4.mjs";
7
7
 
8
8
  // src/cli.ts
9
9
  function getFlag(args, flag, alias) {
@@ -335,7 +335,7 @@ Commands:
335
335
  Options:
336
336
  --json, -j Output raw JSON
337
337
  --api-key, -k API key (or set LETSFG_API_KEY)
338
- --base-url API URL (default: https://api.letsfg.co)
338
+ --base-url API URL (default: https://letsfg.co/developers)
339
339
 
340
340
  Examples:
341
341
  letsfg register --name my-agent --email me@example.com
package/dist/index.js CHANGED
@@ -226,7 +226,7 @@ Install: pip install letsfg && playwright install chromium`
226
226
  child.stdin.end();
227
227
  });
228
228
  }
229
- var DEFAULT_BASE_URL = "https://api.letsfg.co";
229
+ var DEFAULT_BASE_URL = "https://letsfg.co/developers";
230
230
  var LetsFG = class {
231
231
  apiKey;
232
232
  baseUrl;
package/dist/index.mjs CHANGED
@@ -14,7 +14,7 @@ import {
14
14
  offerSummary,
15
15
  searchLocal,
16
16
  systemInfo
17
- } from "./chunk-AUXPORRU.mjs";
17
+ } from "./chunk-LBHJ4GE4.mjs";
18
18
  export {
19
19
  AuthenticationError,
20
20
  BoostedTravel,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "letsfg",
3
- "version": "2026.4.37",
4
- "description": "Agent-native flight search & booking. 200 airline connectors run locally + enterprise GDS/NDC APIs. Built for autonomous AI agents.",
3
+ "version": "2026.5.53",
4
+ "description": "Flight search & booking for AI agents. 200+ airline connectors run locally. Free search get direct booking URLs via letsfg.co or the Developer API.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
7
7
  "types": "dist/index.d.ts",