letsfg 2026.4.51 → 2026.5.54
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 +61 -6
- package/dist/{chunk-AUXPORRU.mjs → chunk-LBHJ4GE4.mjs} +1 -1
- package/dist/cli.js +2 -2
- package/dist/cli.mjs +2 -2
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,13 +1,20 @@
|
|
|
1
1
|
# LetsFG — Your AI agent just learned to book flights. (Node.js)
|
|
2
2
|
|
|
3
|
-
**200
|
|
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
|
[](https://github.com/LetsFG/LetsFG)
|
|
8
6
|
[](https://www.npmjs.com/package/letsfg)
|
|
9
7
|
|
|
10
|
-
|
|
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.
|
|
11
18
|
|
|
12
19
|
## Install
|
|
13
20
|
|
|
@@ -86,6 +93,8 @@ letsfg book off_xxx -p '{"id":"pas_xxx","given_name":"John",...}' -e john@exampl
|
|
|
86
93
|
|
|
87
94
|
Search 200 airline connectors locally (no API key needed). Requires Python + `letsfg` installed.
|
|
88
95
|
|
|
96
|
+
> **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.
|
|
97
|
+
|
|
89
98
|
```typescript
|
|
90
99
|
import { searchLocal } from 'letsfg';
|
|
91
100
|
|
|
@@ -96,6 +105,52 @@ console.log(result.total_results);
|
|
|
96
105
|
const result2 = await searchLocal('GDN', 'BCN', '2026-06-15', { maxBrowsers: 4 });
|
|
97
106
|
```
|
|
98
107
|
|
|
108
|
+
### Unlocking offer results
|
|
109
|
+
|
|
110
|
+
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):
|
|
111
|
+
|
|
112
|
+
```typescript
|
|
113
|
+
import { searchLocal } from 'letsfg';
|
|
114
|
+
|
|
115
|
+
const result = await searchLocal('GDN', 'BCN', '2026-06-15');
|
|
116
|
+
const offer = result.offers[0];
|
|
117
|
+
|
|
118
|
+
// 1. Initiate checkout — fee = max(price × 1%, $3.00). No API key needed.
|
|
119
|
+
const checkoutRes = await fetch('https://letsfg.co/api/developers/checkout', {
|
|
120
|
+
method: 'POST',
|
|
121
|
+
headers: { 'Content-Type': 'application/json' },
|
|
122
|
+
body: JSON.stringify({
|
|
123
|
+
offer_id: offer.id,
|
|
124
|
+
offer_ref: offer.offer_ref,
|
|
125
|
+
payment_token: offer.payment_token,
|
|
126
|
+
currency: offer.currency,
|
|
127
|
+
price: String(offer.price),
|
|
128
|
+
}),
|
|
129
|
+
});
|
|
130
|
+
const { checkout_url } = await checkoutRes.json();
|
|
131
|
+
|
|
132
|
+
// 2. Present checkout_url to the user (or open it programmatically)
|
|
133
|
+
console.log(`Pay here: ${checkout_url}`);
|
|
134
|
+
|
|
135
|
+
// 3. Poll until payment is confirmed
|
|
136
|
+
async function pollVerify(token: string): Promise<string> {
|
|
137
|
+
while (true) {
|
|
138
|
+
await new Promise(r => setTimeout(r, 3000));
|
|
139
|
+
const res = await fetch(
|
|
140
|
+
`https://letsfg.co/api/developers/payment-verify?token=${token}`
|
|
141
|
+
);
|
|
142
|
+
const data = await res.json();
|
|
143
|
+
if (data.verified) return data.booking_url;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
// 4. booking_url is the direct airline link — no further fees
|
|
148
|
+
const bookingUrl = await pollVerify(offer.payment_token);
|
|
149
|
+
console.log(`Book here: ${bookingUrl}`);
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
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.
|
|
153
|
+
|
|
99
154
|
### `systemInfo()`
|
|
100
155
|
|
|
101
156
|
Get system resource profile and recommended concurrency settings.
|
|
@@ -128,10 +183,10 @@ Or set the `LETSFG_MAX_BROWSERS` environment variable globally.
|
|
|
128
183
|
|
|
129
184
|
- **MCP Server**: `npx letsfg-mcp` — [npm](https://www.npmjs.com/package/letsfg-mcp)
|
|
130
185
|
- **Python SDK + CLI**: `pip install letsfg` — [PyPI](https://pypi.org/project/letsfg/)
|
|
131
|
-
- **Try without installing**: [
|
|
186
|
+
- **Try without installing**: [letsfg.co](https://letsfg.co) — search instantly in your browser
|
|
132
187
|
- **GitHub**: [LetsFG/LetsFG](https://github.com/LetsFG/LetsFG)
|
|
133
188
|
|
|
134
|
-
> ⭐ **[Star the repo](https://github.com/LetsFG/LetsFG)**
|
|
189
|
+
> ⭐ **[Star the repo](https://github.com/LetsFG/LetsFG)** — we appreciate the support.
|
|
135
190
|
|
|
136
191
|
## License
|
|
137
192
|
|
|
@@ -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://
|
|
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://
|
|
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://
|
|
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-
|
|
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://
|
|
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://
|
|
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
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "letsfg",
|
|
3
|
-
"version": "2026.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "2026.5.54",
|
|
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",
|