Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

letsbooking — JavaScript / TypeScript API client

Agent-native stay search for Airbnb and Booking.com with total-price ranking.

npm install letsbooking
# or from GitHub:
npm install github:letsbooking/letsbooking-js

Quick start

import { LetsBooking, offerSummary } from "letsbooking";

const client = new LetsBooking({ apiKey: "lb_live_…" });
// or: process.env.LETSBOOKING_API_KEY

// Natural language
const result = await client.search("Barcelona apartment 2 guests Aug 10-14 2026");
console.log(offerSummary(result.cheapest!));

// Structured
const stays = await client.searchStays({
  location: "Lisbon",
  check_in: "2026-09-01",
  check_out: "2026-09-05",
  guests: 2,
  sources: ["airbnb", "booking"],
  currency: "EUR",
});

for (const offer of stays.offers.slice(0, 5)) {
  console.log(offer.source, offer.price.total, offer.title, offer.url);
}

CommonJS

const { LetsBooking } = require("letsbooking");

CLI

export LETSBOOKING_API_KEY=lb_live_…
npx letsbooking search "Barcelona 2 guests Aug 10-14 2026"
npx letsbooking search --location Lisbon --check-in 2026-09-01 --check-out 2026-09-05 --guests 2
npx letsbooking health
npx letsbooking sources

API key

  1. Request at https://letsbooking.bitscorp.co
  2. Or mint via admin at /admin
export LETSBOOKING_API_KEY=lb_live_…

Default base URL: https://letsbooking.bitscorp.co

new LetsBooking({ apiKey: "…", baseUrl: "http://localhost:8787" });

What it does

  1. POST /api/search (NL or structured)
  2. Polls GET /api/results/{id} until completed
  3. Returns typed SearchResult with StayOffer[] sorted by total price

Also: publicSearch(), requestAccess(), sources(), admin helpers.

Develop

npm install
npm test
npm run build

License

MIT

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages