Agoda Reviews from URL API
Extract hotel reviews directly from any Agoda hotel URL without needing to know the hotel ID.
Copy for your AI agent
Paste into Claude, ChatGPT, Cursor or Copilot — endpoint, parameters, response fields and a curl example in Markdown.
Overview
Automatic Hotel ID Extraction
Simply provide any Agoda hotel URL and the API will automatically extract the hotel ID and fetch reviews.
This endpoint simplifies the review extraction process by accepting any valid Agoda hotel URL. The API automatically identifies the hotel ID from the URL and retrieves all review data, making it perfect for applications that work with URLs rather than IDs.
Endpoint URL
Supported URL Formats
Valid Agoda URL Patterns
https://www.agoda.com/hotel-name/hotel/city-country.html
Standard hotel page URL
https://www.agoda.com/hotel-name/hotel/all/city-country.html
Hotel page with all locations
https://www.agoda.com/en-us/hotel-name/hotel/city.html
Localized URL with language prefix
agoda.com/hotel-123456.html
Short format with hotel ID in URL
URL Parameters
Query parameters like check-in dates, guest counts, etc. are ignored. Only the hotel identifier is extracted.
Management replies
Returns Agoda's own guest reviews only; reviews Agoda shows from partner sites are not included; pagination (total_count, has_more) covers Agoda's own reviews only. The requested page size is 20; actual counts can differ. Agoda lists English-language reviews first (newest first with the default sort), then reviews in other languages, so for a complete date range, page until has_more is false. Advertised totals do not guarantee every review is accessible. A hotel with no Agoda reviews returns 200 with reviews: [] and total_count 0; a page Agoda keeps blocking returns 502, so retry it later.
reviews[].owner_response is null when no reply is available, or an object with nullable string fields text, published_date, and author. Reply dates preserve source formatting; ISO format and timezone are not guaranteed. Date and author may be null even when text is present.
{"text":"Thank you for your feedback.","published_date":null,"author":"Hotel management"}
review_score is Agoda's own guest score and rating count (not combined with partner sites), never a page average. Its review_count can be higher than pagination.total_count because it includes ratings without written reviews. Available aggregates contain nullable overall, score_text, and review_count. Missing aggregates can be an empty object or null; the review comments endpoint may return null. Do not infer an aggregate from the reviews on this page.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| url | string | Required | Full Agoda hotel URL (query parameter) |
| page | integer | Optional | Page number for pagination (starts at 1, default: 1) |
| sorting | integer | Optional | Sort order: 7 = most recent, 6 = highest rating, 5 = lowest rating (default: 7) |
How It Works
URL Validation
The API validates that the provided URL is from agoda.com domain.
Hotel ID Extraction
The system automatically extracts the hotel ID from the URL by analyzing the page content.
Review Fetching
Reviews are retrieved using the extracted hotel ID with your specified parameters.
Response Delivery
Complete review data is returned in the same format as the standard reviews endpoint.
Usage Examples
Basic Review Extraction
Extract reviews from any Agoda hotel page:
With Pagination
Get specific page of reviews (20 reviews per page):
Sorted by Rating
Get highest-rated reviews first:
Error Handling
Invalid URL
The provided URL is not a valid Agoda hotel URL
{
"error": {
"code": "INVALID_URL",
"message": "The provided URL is not a valid Agoda hotel URL"
}
}
Hotel ID Not Found
Could not extract hotel ID from the provided URL
{
"error": {
"code": "HOTEL_ID_NOT_FOUND",
"message": "Could not extract hotel ID from the provided URL"
}
}
URL Requirements
Ensure the URL points to a valid Agoda hotel page, not search results or other pages.
Best Practices
Recommendations
- Validate URLs on the client side before making API calls
- Cache the extracted hotel ID for subsequent requests
- Use URL encoding for special characters in the URL parameter
- Consider using the direct hotel ID endpoint if you already have the ID
- Handle pagination based on the total_pages returned in the response
- Implement retry logic for temporary extraction failures