πHotel API - Search by hotel ID
Parameters
Parameter
Description
API Example
curl "https://api.makcorps.com/hotel?hotelid=4232686&rooms=1&adults=1&checkin=2023-12-25&checkout=2023-12-26&api_key=6576a85d9769523d73e34228401"import requests
url = "https://api.makcorps.com/hotel"
params = {
'hotelid': '4232686',
'rooms': '1',
'adults': '1',
'checkin': '2023-12-25',
'checkout': '2023-12-26',
'api_key': '6576a85d9769523d73e34228401'
}
response = requests.get(url, params=params)
# Check if the request was successful (status code 200)
if response.status_code == 200:
# Parse JSON response
json_data = response.json()
# Print or use the parsed JSON data
print(json_data)
else:
# Print an error message if the request was not successful
print(f"Error: {response.status_code}, {response.text}")
Response
Understand the Response
Last updated