Agoda API endpoint
Returns hotel search results for an Agoda city: the matching property ids for that city plus a direct link to each property's listing page. Callers may supply a known Agoda city id or a free-text city name; when both are supplied city_id takes precedence.
/agoda/hotels/searchReturns hotel search results for an Agoda city: the matching property ids for that city plus a direct link to each property's listing page. Callers may supply a known Agoda city id (discoverable from a prior hotel detail response's address.city.id field, or from Agoda's own site) or a free-text city name; when both are supplied city_id takes precedence.
Query parameters:
city_id (optional) — numeric Agoda city id, e.g. 9395 for Bangkok.
Either city_id or city is required; city_id takes precedence when
both are supplied.city (optional) — free-text city name, resolved to a numeric city id via
Agoda's own destination search. Ignored when city_id is also supplied.page (optional) — 1-indexed result page, defaults to 1.limit (optional) — results per page, defaults to 10, maximum 50.Notable response behavior:
city_id or city is required; supplying neither returns 400
before any upstream request is made. An explicit non-positive city_id
also returns 400. An unknown/unresolvable city returns 404.property_id and a direct source_url. Call the hotel-detail endpoint with each property_id for full hotel content.| Field | Filled in, of 10 checked | Values in the sample |
|---|---|---|
| property_id | 10 | |
| source_url | 10 | agoda.com |
| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| city_id | integer | No | Numeric Agoda city id, e.g. 9395 for Bangkok. Either city_id or city is required; city_id takes precedence when both are supplied. | 9395 | |
| city | string | No | Free-text city name, resolved to a numeric city id via Agoda's own destination search. Ignored when city_id is also supplied. | Bangkok | |
| page | integer | No | 1 | 1-indexed result page, defaults to 1 | 1 |
| limit | integer | No | 10 | Results per page, defaults to 10, maximum 50 | 10 |
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/agoda/hotels/search?page=1&limit=10" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"msg": "OK",
"data": {
"city_id": 9395,
"page": 1,
"limit": 10,
"count": 10,
"properties": [
{
"property_id": 10630,
"source_url": "https://www.agoda.com/search?cid=-1&selectedproperty=10630&city=9395"
}
]
}
}Request schema
No body schema
Response schema
#/definitions/agoda.searchResponseDoc
| Field | Type | Required | Enum | Bounds | Example | Description |
|---|---|---|---|---|---|---|
| code | integer | No | 200 | |||
| data | agoda.SearchResponse | No | ||||
| data.city_id | integer | No | 9395 | |||
| data.count | integer | No | 10 | |||
| data.limit | integer | No | 10 | |||
| data.page | integer | No | 1 | |||
| data.properties | array | No | ||||
| data.properties[].property_id | integer | No | 10630 | |||
| data.properties[].source_url | string | No | https://www.agoda.com/search?cid=-1&selectedproperty=10630&city=9395 | |||
| msg | string | No | OK |
| Status | Description | Schema |
|---|---|---|
| 400 | Bad Request | #/definitions/app.Response |
| 404 | Not Found | #/definitions/app.Response |
| 500 | Internal Server Error | #/definitions/app.Response |
| 503 | Service Unavailable | #/definitions/app.Response |
Use environment variables for secrets and keep Crawlora API keys server-side.
curl -X GET "https://api.crawlora.net/api/v1/agoda/hotels/search?page=1&limit=10" \
-H "x-api-key: $CRAWLORA_API_KEY"