curl --request POST \
--url https://api.aisa.one/apis/v1/agoda-com/hotels/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"landmark_id": 1518284,
"nights": 2,
"page_size": 10
}
'import requests
url = "https://api.aisa.one/apis/v1/agoda-com/hotels/search"
payload = {
"landmark_id": 1518284,
"nights": 2,
"page_size": 10
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({landmark_id: 1518284, nights: 2, page_size: 10})
};
fetch('https://api.aisa.one/apis/v1/agoda-com/hotels/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/agoda-com/hotels/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'landmark_id' => 1518284,
'nights' => 2,
'page_size' => 10
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/agoda-com/hotels/search"
payload := strings.NewReader("{\n \"landmark_id\": 1518284,\n \"nights\": 2,\n \"page_size\": 10\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aisa.one/apis/v1/agoda-com/hotels/search")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"landmark_id\": 1518284,\n \"nights\": 2,\n \"page_size\": 10\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/agoda-com/hotels/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"landmark_id\": 1518284,\n \"nights\": 2,\n \"page_size\": 10\n}"
response = http.request(request)
puts response.read_body搜索
Compare properties for exact dates and guests; get property ids for the detail functions.
curl --request POST \
--url https://api.aisa.one/apis/v1/agoda-com/hotels/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"landmark_id": 1518284,
"nights": 2,
"page_size": 10
}
'import requests
url = "https://api.aisa.one/apis/v1/agoda-com/hotels/search"
payload = {
"landmark_id": 1518284,
"nights": 2,
"page_size": 10
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({landmark_id: 1518284, nights: 2, page_size: 10})
};
fetch('https://api.aisa.one/apis/v1/agoda-com/hotels/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/agoda-com/hotels/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'landmark_id' => 1518284,
'nights' => 2,
'page_size' => 10
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/agoda-com/hotels/search"
payload := strings.NewReader("{\n \"landmark_id\": 1518284,\n \"nights\": 2,\n \"page_size\": 10\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aisa.one/apis/v1/agoda-com/hotels/search")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"landmark_id\": 1518284,\n \"nights\": 2,\n \"page_size\": 10\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/agoda-com/hotels/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"landmark_id\": 1518284,\n \"nights\": 2,\n \"page_size\": 10\n}"
response = http.request(request)
puts response.read_body请求规范
- 方法与路径: POST /apis/v1/agoda-com/hotels/search
- 可用状态: enabled
- 请求 URL 模板:
https://api.aisa.one/apis/v1/agoda-com/hotels/search
{
"operationId": "agoda-com.hotels.search",
"method": "POST",
"path": "/apis/v1/agoda-com/hotels/search",
"servers": [
{
"url": "https://api.aisa.one"
}
],
"parameters": [],
"security": [
{
"bearerAuth": []
}
],
"requestBody": {
"content": {
"application/json": {
"examples": {
"provider": {
"summary": "Official provider example; checked against AIsa request constraints",
"value": {
"landmark_id": 1518284,
"nights": 2,
"page_size": 10
}
}
},
"schema": {
"additionalProperties": true,
"properties": {
"adults": {
"default": 2,
"description": "adults\n\nProvider reference: minimum 1; maximum 36; default 2.",
"type": "number",
"x-alexandria-option-metadata": {
"in": "body",
"max": 36,
"min": 1
}
},
"check_in": {
"description": "Check-in date YYYY-MM-DD, today or later. Default: 30 days from today. Pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}$.",
"type": "string",
"x-alexandria-option-metadata": {
"in": "body"
}
},
"child_ages": {
"description": "One age per child; defaults to 8 for each child when omitted (Agoda's own default child age).",
"items": {
"type": "number"
},
"type": "array",
"x-alexandria-option-metadata": {
"in": "body"
}
},
"children": {
"default": 0,
"description": "children\n\nProvider reference: minimum 0; maximum 9; default 0.",
"type": "number",
"x-alexandria-option-metadata": {
"in": "body",
"max": 9,
"min": 0
}
},
"city_id": {
"description": "Agoda city id from `suggest` (kind city, or the city_id of any suggestion). With `landmark_id` it only scopes content; alone it searches the whole city.\n\nProvider reference: minimum 1.",
"type": "number",
"x-alexandria-option-metadata": {
"in": "body",
"min": 1
}
},
"currency": {
"default": "USD",
"description": "Pattern: ^[A-Za-z]{3}$.\n\nProvider reference: default \"USD\".",
"type": "string",
"x-alexandria-option-metadata": {
"in": "body"
}
},
"landmark_id": {
"description": "Agoda landmark id from `suggest` (kind landmark). Either this or `city_id`.\n\nProvider reference: minimum 1.",
"type": "number",
"x-alexandria-option-metadata": {
"in": "body",
"min": 1
}
},
"nights": {
"default": 1,
"description": "nights\n\nProvider reference: minimum 1; maximum 30; default 1.",
"type": "number",
"x-alexandria-option-metadata": {
"in": "body",
"max": 30,
"min": 1
}
},
"page": {
"default": 1,
"description": "page\n\nProvider reference: minimum 1; maximum 100; default 1.",
"type": "number",
"x-alexandria-option-metadata": {
"in": "body",
"max": 100,
"min": 1
}
},
"page_size": {
"default": 20,
"description": "Agoda may add sponsored rows on top of the requested size.\n\nProvider reference: minimum 1; maximum 45; default 20.",
"type": "number",
"x-alexandria-option-metadata": {
"in": "body",
"max": 45,
"min": 1
}
},
"rooms": {
"default": 1,
"description": "rooms\n\nProvider reference: minimum 1; maximum 9; default 1.",
"type": "number",
"x-alexandria-option-metadata": {
"in": "body",
"max": 9,
"min": 1
}
},
"sort": {
"default": "recommended",
"description": "sort\n\nProvider reference: allowed values [\"recommended\", \"price_asc\", \"price_desc\", \"review_score\"]; default \"recommended\".",
"type": "string",
"x-alexandria-option-metadata": {
"in": "body",
"oneOf": [
"recommended",
"price_asc",
"price_desc",
"review_score"
]
}
}
},
"type": "object"
}
}
},
"required": false
},
"x-aisa-status": "enabled",
"components": {
"securitySchemes": {
"bearerAuth": {
"scheme": "bearer",
"type": "http"
}
}
}
}
费用与请求规则
按实际用量收费。 默认请求预估费用:$0.0005 USD。 最终费用以实际用量为准。 账户适用价格可能不同;支持报价的接口可按实际请求获取报价。授权
请求体
响应
Dated property listing near a landmark (landmark_id) or in a city (city_id) through Agoda's GraphQL landmarkSearch / citySearch: name, stars, type, page URL, address, coordinates, overall and Agoda-only review score and count, availability, cancellation type and free-cancellation deadline, and the cheapest offer's per-night and whole-stay price both excluding and including taxes and fees, in the requested currency. Paginated by page.
The response contains the tool result directly.
The provider identifies properties as the primary payload key.
| Documented field | Provider type | Description |
|---|---|---|
accommodation_type_id | number | |
agoda_review_count | number | |
agoda_review_score | number | Score from Agoda's own verified guests (provider 332) only. |
area | string | |
area_id | number | |
bathrooms | number | |
bedrooms | number | Non-hotel accommodation only. |
beds | number | |
cancellation_type | string | Agoda cancellationType of the cheapest offer, e.g. FreeCancellation, NonRefundable. |
city | string | |
city_id | number | |
country | string | |
country_code | string | |
default_name | string | |
free_cancellation_until | string | |
image_url | string | |
is_available | boolean | null when Agoda returned no pricing block (sponsored or not-yet-ready rows). |
is_ready | boolean | |
is_sponsored | boolean | |
latitude | number | |
longitude | number | |
name | string | |
nearest_landmark | object | |
pay_at_hotel | boolean | |
pay_later | boolean | |
price | object | Cheapest offer for the stay; null when the property is sold out or unpriced. |
property_id | number | |
property_type | string | |
result_type | string | Agoda propertyResultType: NormalProperty, SoldOutProperty, ... |
review_count | number | |
review_score | number | Cumulative score over all review providers (0-10). |
room_size_sqm | number | |
rooms_left | number | |
star_rating | number | |
supplier_id | number | 332 is Agoda's own supply. |
url | string | Agoda property page URL. |
These are the provider's documented fields. Field requiredness, nullability and nested object structures are specified only where the descriptions explicitly say so.