property_tokenstringобязательно
Parameter defines unique identifier used to identify a Google Property. You can find `property_token` from Google Hotels Properties API.
https://api.sandbase.ai/v1/api/google-hotels/photosGet photos of a hotel on Google Hotels by property token, with image URLs, categories and paging.
Ваш результат появится здесь
Заполните входные данные, затем нажмите «Запустить».
Get photos of a hotel on Google Hotels by property token, with image URLs, categories and paging.
curl -X POST "https://api.sandbase.ai/v1/api/google-hotels/photos" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"property_token": "CgsIlOPW65yHnZPwARAB"}'
The result is returned in outputs[0].data as structured JSON.
| Name | Type | Required | Description |
|---|---|---|---|
property_token | string | Yes | Parameter defines unique identifier used to identify a Google Property. You can find property_token from Google Hotels Properties API. |
next_page_token | string | No | Parameter defines the next page token needed to retrieve the next batch of photos of a particular section. |
json_restrictor | string | No | Parameter defines the fields you want to include in the output, reducing payload size for faster response. See the JSON Restrictor documentation for more details. |
$0.010 per successful call. Failed calls are not charged.
Начните разработку
Конечная точка платформенного API с единообразной аутентификацией и учётом использования.
curl -X POST "https://api.sandbase.ai/v1/api/google-hotels/photos" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"property_token": "CgsIlOPW65yHnZPwARAB"
}'Укажите свой ключ SandBase API в окружении сервера. Запросы используют аутентификацию Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Храните ключ на сервере. Не раскрывайте его в коде браузера.
property_tokenstringобязательноParameter defines unique identifier used to identify a Google Property. You can find `property_token` from Google Hotels Properties API.
next_page_tokenstringParameter defines the next page token needed to retrieve the next batch of photos of a particular section.
json_restrictorstringParameter defines the fields you want to include in the output, reducing payload size for faster response. See the JSON Restrictor documentation for more details.
Сохранённый пример ответа для этого API; при просмотре живой запрос не выполняется.
Сохранённый ответ не опубликован. Запустите API в Playground, чтобы посмотреть его ответ.
Посмотреть больше
| API | Цена | Ответ |
|---|---|---|
Google Hotels PhotosЭтот API Google Hotels | $0.01 за запрос | JSON |
Google Hotels | $0.01 за запрос | JSON |
Google Hotels | $0.01 за запрос | JSON |
Google Hotels | $0.01 за запрос | JSON |
Google Hotels | $0.015 за запрос | JSON |
Вопросы
Отправьте POST-запрос на https://api.sandbase.ai/v1/api/google-hotels/photos, указав ключ SandBase API в заголовке Authorization (Bearer), а параметры — в теле JSON. Вы также можете попробовать это в Playground на этой странице без написания кода.
$0.01 за вызов, списывается с баланса SandBase. Оплата взимается только за сделанные вызовы; подписка не требуется.
Обязательные: property_token (string). Необязательные: next_page_token (string) и json_restrictor (string). В таблице Parameters и в Playground на этой странице перечислены все поля.
JSON-ответ, возвращаемый в том же HTTP-запросе (синхронно).
Нет. Google Hotels Photos работает через SandBase, поэтому один API key SandBase покрывает этот endpoint и все остальные API и модели в каталоге. Вам не нужно отдельно запрашивать доступ к API Google Hotels.