# Agoda API scraper — hotel data, guest reviews & destination lookup: search destinations, browse a city's popular hotels, pull a hotel's full record (name, star rating, address, coordinates, facilities, policies, nearby places, FAQ) and paginated guest reviews (score, pros/cons, reviewer country, room type, owner replies) from Agoda.com across Asia-Pacific and worldwide — no API key required

> Resolve a free-text place ('Bangkok', 'Tokyo', 'Maldives', an airport or a landmark) into Agoda's destination ids. Returns matched cities, areas, airports, points of interest and hotels with their object_id, type and (for cities) the city_id + hotel count. Use this first to get the city_id the city_browse action needs.
> ReefAPI engine `agoda` · 4 endpoints · clean JSON, no scraping or browsers to manage.

## How to call
- **Endpoint:** `POST https://api.reefapi.com/agoda/v1/<action>` with a JSON body.
- **Auth:** header `x-api-key: <YOUR_REEFAPI_KEY>` — create one free (1,000 credits, no card): https://reefapi.com/signup
- **Response (every call):** `{ ok: boolean, data: ..., meta: { record_count, credits, ... }, error: { code, message } }` — branch on `ok`. Failed or blocked calls are free.
- **One key + one shared credit pool** across every ReefAPI API. Per-call credits are listed on each endpoint below.
- **Use it from an AI agent (MCP):** connect `https://api.reefapi.com/mcp` (remote streamable-http, `Authorization: Bearer <key>`) and your assistant can call these actions directly.

## Endpoints

### POST /agoda/v1/destinations — 1 credit
Resolve a free-text place ('Bangkok', 'Tokyo', 'Maldives', an airport or a landmark) into Agoda's destination ids. Returns matched cities, areas, airports, points of interest and hotels with their object_id, type and (for cities) the city_id + hotel count. Use this first to get the city_id the city_browse action needs.

**Parameters:**
- `query` (string, required) — Place to look up — a city, area, airport, landmark or hotel name.
- `language` (string, optional, default "en-us") — Agoda locale for result names (e.g. en-us, th-th, ja-jp, zh-cn). Defaults to en-us.

**Returns:** suggestions[]{object_id, object_type_id, type, name, city_id, country_id, hotel_count, is_hotel}

**Example request body:**
```json
{
  "query": "Bangkok"
}
```

### POST /agoda/v1/city_browse — 1 credit
Browse a city's popular hotels and accommodation themes. Returns ~100 popular hotels (name + Agoda detail URL), property-type theme links (apartments, hostels, resorts…) and the city's travel guides. Pass a numeric city_id from the destinations action.

**Parameters:**
- `city_id` (integer, required) — Agoda city id (from the destinations action — e.g. 9395=Bangkok). Routes the listing geographically.
- `language` (string, optional, default "en-us") — Agoda locale (en-us, th-th, ja-jp…).

**Returns:** hotels[]{name, url} (~100) + theme_links[]{name, url} + travel_guides[]{name, url} + place_of_interest

**Example request body:**
```json
{
  "city_id": 9395
}
```

### POST /agoda/v1/detail — 1 credit
Full hotel record by hotel_id (or hotel URL): name, accommodation type, star rating, full address + city/country, coordinates, description, facilities (grouped), policies, important notes, nearby places of interest and the property FAQ.

**Parameters:**
- `hotel_id` (integer, optional) — Agoda hotel id (the number in a hotel page's data-hotel-id, also the hotel_id in detail responses). Provide hotel_id OR url.
- `url` (string, optional) — Full Agoda hotel page URL (the engine extracts the hotel id from it). Use this when you have the hotel link but not the numeric id.
- `language` (string, optional, default "en-us") — Agoda locale (en-us, th-th, ja-jp…).

**Returns:** hotel{hotel_id, name, accommodation_type, star_rating, address{full, area, city, city_id, country, postal_code}, description, facilities[]{group, features[]}, policies, important_notes, nearby_places[]{name, distance, latitude, longitude}, faq[]{question, answer}}

**Example request body:**
```json
{
  "hotel_id": 294217
}
```

### POST /agoda/v1/reviews — 1 credit
Paginated guest reviews for one hotel (70 per page): star rating, title, separate positive/negative text, review date, reviewer country, traveler type, room type and length of stay, the owner's reply and helpful votes. The response also carries the hotel's overall score and total review count. Page with `page` until meta.has_more is false.

**Parameters:**
- `hotel_id` (integer, optional) — Agoda hotel id (the number in a hotel page's data-hotel-id, also the hotel_id in detail responses). Provide hotel_id OR url.
- `url` (string, optional) — Full Agoda hotel page URL (the engine extracts the hotel id from it). Use this when you have the hotel link but not the numeric id.
- `page` (integer, optional, default 1) — Review page (70 reviews each). Page until meta.has_more is false; meta.total_pages tells you how many.
- `sort_by` (string, optional, default "newest") — Review order: newest (default), rating_high, rating_low or most_helpful. [one of: newest, rating_high, rating_low, most_helpful]
- `language` (string, optional, default "en-us") — Agoda locale (en-us, th-th, ja-jp…).

**Returns:** reviews[]{review_id, rating, rating_text, title, text, positive_text, negative_text, date, reviewer_name, reviewer_country, traveler_type, room_type, length_of_stay, owner_reply, helpful_votes, photo_count} + summary{overall_score, score_text, total_reviews} + meta{page, total_pages, has_more, next_page}

**Example request body:**
```json
{
  "hotel_id": 294217
}
```

## More
- Try it live, no code: https://reefapi.com/playground?engine=agoda
- Human docs page: https://reefapi.com/docs/agoda
- Every ReefAPI API in one file (for your AI): https://reefapi.com/llms-full.txt
