Hotel booking infrastructure for AI agents. REST API + MCP server with real-time pricing for 3M+ hotels.
Free tier: 100 requests/hour. No credit card required.
Save this key — it won't be shown again. Pass it as X-API-Key header or ?key= query parameter.
curl -X POST https://tripapi.dev/api/search \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_KEY" \
-d '{
"destination": "Da Nang",
"check_in": "2026-05-01",
"check_out": "2026-05-03",
"guests": 2
}'
import httpx
resp = httpx.post("https://tripapi.dev/api/search", json={
"destination": "Da Nang",
"check_in": "2026-05-01",
"check_out": "2026-05-03",
"guests": 2,
}, headers={"X-API-Key": "YOUR_KEY"})
hotels = resp.json()["hotels"]
for h in hotels:
print(f'{h["name"]} — ${h["nightly_price_usd"]}/night')
const res = await fetch("https://tripapi.dev/api/search", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-API-Key": "YOUR_KEY",
},
body: JSON.stringify({
destination: "Da Nang",
check_in: "2026-05-01",
check_out: "2026-05-03",
guests: 2,
}),
});
const { hotels } = await res.json();
hotels.forEach(h => console.log(`${h.name} — $${h.nightly_price_usd}/night`));
Pass your API key in one of two ways:
| Method | Example |
|---|---|
| Header (recommended) | X-API-Key: tk_abc123... |
| Query parameter | ?key=tk_abc123... |
Rate limits are returned in response headers: X-RateLimit-Limit.
| Plan | Rate Limit | Price |
|---|---|---|
| Free | 100 req/hour | $0 |
| Pro (coming soon) | 1,000 req/hour | $49/mo |
| Enterprise | Unlimited | Contact us |
Base URL: https://tripapi.dev
{
"destination": "Da Nang", // required — city name
"check_in": "2026-05-01", // YYYY-MM-DD (required for live rates)
"check_out": "2026-05-03", // YYYY-MM-DD
"guests": 2, // default: 2
"max_price_usd": 100, // max per night
"min_stars": 4, // 1-5
"sort_by": "recommended" // recommended | price_low | price_high | rating
}
{ "query": "beachfront hotel in Da Nang under $100 for next weekend" }
Hotels with bookable: true in search results can be booked directly.
offer_id from search results.{ "offer_id": "3gAVonJzkY6k..." }
Returns: prebook_id, transaction_id, rate details, cancellation policy.
{
"prebook_id": "...",
"transaction_id": "...",
"first_name": "John",
"last_name": "Doe",
"email": "john@example.com",
"phone": "+84901234567"
}
Returns: booking_id, hotel_confirmation_code, check-in/out dates.
{
"query_summary": "Da Nang, 2026-05-01 to 2026-05-03, 2 guests",
"total_results": 10,
"source": "liteapi",
"hotels": [
{
"name": "Meliá Vinpearl Danang Riverfront",
"city": "Da Nang",
"stars": 5,
"nightly_price_usd": 83.67,
"total_price_usd": 167.33,
"room_name": "Deluxe Room",
"description": "Breakfast Included · Free cancellation",
"rating": 4.2,
"source": "liteapi",
"bookable": true,
"offer_id": "3gAVon...",
"booking_url": "https://...",
"agoda_url": "https://...",
"image_url": "https://..."
}
],
"ai_recommendation": "For beachfront in Da Nang...",
"booking_search_url": "https://...",
"agoda_search_url": "https://..."
}
| Source | Description | Bookable? |
|---|---|---|
liteapi | Real-time rates from 3M+ hotels | Yes — via offer_id |
direct | Direct partner hotels | Via booking links |
ai_suggested | AI-recommended for cities with limited data | Via booking links |
TripAPI is available as an MCP server for Claude Desktop, Cursor, and any MCP-compatible AI platform.
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"tripapi": {
"command": "uvx",
"args": ["--from", "fastmcp", "fastmcp", "run",
"https://github.com/your-org/tripapi/mcp_server.py"],
"env": { "LITEAPI_KEY": "your-key" }
}
}
}
| Tool | Description |
|---|---|
search_hotels | Search by city, dates, guests, price, stars |
get_hotel_details | Full hotel info (amenities, photos, contact) |
book_hotel | Complete a reservation |
get_booking_status | Check booking status |
cancel_booking | Cancel a booking |
TripAPI works as an OpenAI Action for ChatGPT. The OpenAPI spec is at:
https://tripapi.dev/openapi_gpt.yaml
You can import this directly when creating a GPT in the GPT Editor.
Da Nang, Ho Chi Minh City, Hanoi, Hoi An, Phu Quoc, Nha Trang, Da Lat, Hue, Sa Pa, Ninh Binh, Quy Nhon, Vung Tau, Can Tho, Ha Long, Con Dao, Mui Ne, Cat Ba, Phong Nha, and more.
Bangkok, Phuket, Chiang Mai, Bali, Singapore, Kuala Lumpur, Penang, Phnom Penh, Siem Reap, Manila, Cebu, Luang Prabang, and more.
3M+ hotels globally via real-time aggregation — Tokyo, Seoul, London, Paris, New York, Dubai, Sydney, and everywhere in between.