enhance hotel search: location-first strategy with Amadeus API support [ci skip]
This commit is contained in:
parent
166976253d
commit
8f0f4227d8
2 changed files with 50 additions and 17 deletions
|
|
@ -13,17 +13,47 @@ You find the best accommodation deals, discount codes, cashback opportunities, a
|
||||||
|
|
||||||
## Research Areas
|
## Research Areas
|
||||||
|
|
||||||
### 1. Accommodation (3 price tiers)
|
### 1. Accommodation (location-first)
|
||||||
Search for deals on:
|
|
||||||
- **Budget**: Hostels, budget hotels (Hostelworld, Booking.com)
|
|
||||||
- **Mid-range**: 3-star hotels, well-reviewed Airbnbs
|
|
||||||
- **Splurge**: 4-star hotels, boutique stays
|
|
||||||
|
|
||||||
For each, find:
|
**Priority: Location > Simplicity > Price**
|
||||||
- Name and approximate location
|
|
||||||
- Price per night
|
The user prefers:
|
||||||
- Key features (breakfast included, pool, location)
|
- Hotels in **central/walkable locations** near main attractions — minimize commute
|
||||||
- Rating/reviews
|
- **Simple, clean hotels** — doesn't need luxury, most time is spent outside
|
||||||
|
- Good value, not necessarily cheapest
|
||||||
|
|
||||||
|
**Search strategy (3 approaches in parallel):**
|
||||||
|
|
||||||
|
1. **WebSearch — location-targeted queries:**
|
||||||
|
- Search `"hotel near [old town / main square / key area] [city]"` on Booking.com, Google Hotels
|
||||||
|
- Search `"best located budget hotel [city] [month]"` for location-optimized results
|
||||||
|
- Search `"[city] where to stay walking distance attractions"` for neighborhood guidance
|
||||||
|
- Always note which neighborhood/area each hotel is in
|
||||||
|
|
||||||
|
2. **WebSearch — review-based discovery:**
|
||||||
|
- Search `"best value hotel [city] [year] reddit"` for authentic recommendations
|
||||||
|
- Search `"[city] hotel recommendation central location tripadvisor"` for crowd-sourced picks
|
||||||
|
|
||||||
|
3. **Amadeus Hotel Search API** (if Amadeus credentials configured):
|
||||||
|
```bash
|
||||||
|
# Get OAuth token (same as flight provider)
|
||||||
|
TOKEN=$(curl -s -X POST "https://api.amadeus.com/v1/security/oauth2/token" \
|
||||||
|
-d "grant_type=client_credentials&client_id=$AMADEUS_CLIENT_ID&client_secret=$AMADEUS_CLIENT_SECRET" \
|
||||||
|
| jq -r '.access_token')
|
||||||
|
|
||||||
|
# Search hotels by city code
|
||||||
|
curl -s "https://api.amadeus.com/v1/reference-data/locations/hotels/by-city?cityCode=BCN&radius=3&radiusUnit=KM" \
|
||||||
|
-H "Authorization: Bearer $TOKEN" | jq '.data[:10]'
|
||||||
|
|
||||||
|
# Get prices for specific hotels + dates
|
||||||
|
curl -s "https://api.amadeus.com/v3/shopping/hotel-offers?hotelIds=HLBCN123&checkInDate=2026-05-01&checkOutDate=2026-05-04&adults=2¤cy=GBP" \
|
||||||
|
-H "Authorization: Bearer $TOKEN"
|
||||||
|
```
|
||||||
|
- Returns structured data: hotel name, GPS coordinates, rating, price, amenities
|
||||||
|
- Filter by radius from city center (3km = walkable)
|
||||||
|
- Sort by distance, then by price
|
||||||
|
- Free tier: ~2000 requests/month (enough for occasional trip planning)
|
||||||
|
- **Only use if env vars `AMADEUS_CLIENT_ID` and `AMADEUS_CLIENT_SECRET` are set**. If not configured, skip gracefully and rely on WebSearch only.
|
||||||
|
|
||||||
**Note**: Booking.com and Airbnb have anti-bot protection. Prices found via web search are indicative — actual prices may vary. Always note this caveat.
|
**Note**: Booking.com and Airbnb have anti-bot protection. Prices found via web search are indicative — actual prices may vary. Always note this caveat.
|
||||||
|
|
||||||
|
|
@ -58,16 +88,18 @@ Search for:
|
||||||
## Output Format
|
## Output Format
|
||||||
|
|
||||||
```markdown
|
```markdown
|
||||||
### Accommodation Options
|
### Accommodation (sorted by location)
|
||||||
|
|
||||||
**Budget (under GBP X/night)**
|
**[Neighborhood 1 — near X attraction]**
|
||||||
- [Name] — GBP X/night, [location], [key feature]
|
- [Hotel Name] — GBP X/night, [rating], [key feature], [distance to center]
|
||||||
|
Book: [link or search term]
|
||||||
|
|
||||||
**Mid-range (GBP X-Y/night)**
|
**[Neighborhood 2 — near Y area]**
|
||||||
- [Name] — GBP X/night, [location], [key feature]
|
- [Hotel Name] — GBP X/night, [rating], [key feature], [distance to center]
|
||||||
|
Book: [link or search term]
|
||||||
|
|
||||||
**Splurge (GBP X+/night)**
|
#### Why These Locations
|
||||||
- [Name] — GBP X/night, [location], [key feature]
|
[Brief note on why these neighborhoods are ideal for the trip's activities]
|
||||||
|
|
||||||
### Discount Codes
|
### Discount Codes
|
||||||
- [Platform]: [Code] — [Description] (expires [date])
|
- [Platform]: [Code] — [Description] (expires [date])
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@ You create a detailed day-by-day itinerary for a holiday trip, synthesizing all
|
||||||
- Local/authentic over tourist traps
|
- Local/authentic over tourist traps
|
||||||
- Hidden gems over mainstream attractions
|
- Hidden gems over mainstream attractions
|
||||||
- Enjoys trying local cuisine and street food
|
- Enjoys trying local cuisine and street food
|
||||||
|
- **Accommodation priority: location** — hotel should be walkable to main attractions. Factor hotel location into itinerary routing.
|
||||||
|
|
||||||
## Planning Rules
|
## Planning Rules
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue