按 id 获取高级 Google 酒店信息结果
curl --request GET \
--url https://api.aisa.one/apis/v1/dataforseo/business_data/google/hotel_info/task_get/html/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aisa.one/apis/v1/dataforseo/business_data/google/hotel_info/task_get/html/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aisa.one/apis/v1/dataforseo/business_data/google/hotel_info/task_get/html/{id}', 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/dataforseo/business_data/google/hotel_info/task_get/html/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/dataforseo/business_data/google/hotel_info/task_get/html/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.aisa.one/apis/v1/dataforseo/business_data/google/hotel_info/task_get/html/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/dataforseo/business_data/google/hotel_info/task_get/html/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"version": "<string>",
"version.status_code": 123,
"version.status_message": "<string>",
"version.time": "<string>",
"version.cost": 123,
"version.result_count": 123,
"version.tasks_error": 123,
"tasks": [
"<string>"
],
"tasks.id": "<string>",
"tasks.status_code": 123,
"tasks.status_message": "<string>",
"tasks.time": "<string>",
"tasks.cost": 123,
"tasks.result_count": 123,
"tasks.path": [
"<string>"
],
"tasks.data": {},
"result": [
"<string>"
],
"result.hotel_identifier": "<string>",
"result.location_code": 123,
"result.language_code": "<string>",
"result.check_url": "<string>",
"result.datetime": "<string>",
"result.items_count": 123,
"items": [
"<string>"
],
"items.page": 123,
"items.date": "<string>",
"items.html": "<string>"
}酒店信息
按 id 获取高级 Google 酒店信息结果
HTML Google Hotel Info 将提供 [Google Hotels](http://www.
GET
https://api.aisa.one/apis/v1
/
dataforseo
/
business_data
/
google
/
hotel_info
/
task_get
/
html
/
{id}
按 id 获取高级 Google 酒店信息结果
curl --request GET \
--url https://api.aisa.one/apis/v1/dataforseo/business_data/google/hotel_info/task_get/html/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aisa.one/apis/v1/dataforseo/business_data/google/hotel_info/task_get/html/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aisa.one/apis/v1/dataforseo/business_data/google/hotel_info/task_get/html/{id}', 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/dataforseo/business_data/google/hotel_info/task_get/html/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/dataforseo/business_data/google/hotel_info/task_get/html/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.aisa.one/apis/v1/dataforseo/business_data/google/hotel_info/task_get/html/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/dataforseo/business_data/google/hotel_info/task_get/html/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"version": "<string>",
"version.status_code": 123,
"version.status_message": "<string>",
"version.time": "<string>",
"version.cost": 123,
"version.result_count": 123,
"version.tasks_error": 123,
"tasks": [
"<string>"
],
"tasks.id": "<string>",
"tasks.status_code": 123,
"tasks.status_message": "<string>",
"tasks.time": "<string>",
"tasks.cost": 123,
"tasks.result_count": 123,
"tasks.path": [
"<string>"
],
"tasks.data": {},
"result": [
"<string>"
],
"result.hotel_identifier": "<string>",
"result.location_code": 123,
"result.language_code": "<string>",
"result.check_url": "<string>",
"result.datetime": "<string>",
"result.items_count": 123,
"items": [
"<string>"
],
"items.page": 123,
"items.date": "<string>",
"items.html": "<string>"
}HTML Google Hotel Info 将提供 Google Hotels 平台上特定酒店实体的非结构化 HTML 数据。
示例
curl -X GET "https://api.aisa.one/apis/v1/dataforseo/business_data/google/hotel_info/task_get/html/{id}" \
-H "Authorization: Bearer YOUR_API_KEY"
授权
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
路径参数
DataForSEO 任务 ID。
响应
成功响应
API 的当前版本
执行时间(秒)
所有任务的总成本(美元)
tasks 数组中的任务数量
tasks 数组中返回错误的任务数量
任务数组
执行时间(秒)
任务成本(美元)
result 数组中的元素数量
URL 路径
包含与您在 POST 请求中指定的参数相同的参数
结果数组
在 POST 数组中收到的标识符 此字段将包含设置任务时指定的 hotel_identifier 参数;示例:CgoI-KWyzenM_MV3EAE
POST 数组中的位置代码
POST 数组中的语言代码
搜索引擎结果的直接 URL,你可以使用它确认我们提供的结果是否准确
收到结果的日期和时间,采用 UTC 格式:“yyyy-mm-dd hh-mm-ss +00:00”;示例:2019-11-15 12:57:46 +00:00
items 数组中返回的结果数量
HTML 页面
返回的 HTML 页面的序列号
HTML 页面扫描的日期和时间,采用 UTC 格式:“yyyy-mm-dd hh-mm-ss +00:00”;示例:2019-11-15 12:57:46 +00:00
HTML 页面