π»Hotel API - Search by City Name
In a single API request to this API will return all the hotels in a city with top 4 cheapest vendors.
Guide
Parameters
Description
curl -X GET "https://api.makcorps.com/citysearch/{cityname}/{page}/{currency}/{num_of_rooms}/{num_of_adults}/{check_in_date}/{check_out_date}?api_key=YOUR-API-KEY"import requests
url = 'https://api.makcorps.com/citysearch/{cityname}/{page}/{currency}/{num_of_rooms}/{num_of_adults}/{check_in_date}/{check_out_date}'
api_key = 'YOUR-API-KEY'
url = url.format(
cityname='London',
page='0',
currency='USD',
num_of_rooms='1',
num_of_adults='3',
check_in_date='2023-10-03',
check_out_date='2023-10-04'
)
url_with_api_key = f"{url}?api_key={api_key}"
response = requests.get(url_with_api_key)
# Print the response
print(response.json())Response
{
"hotelName": "Hilton London Paddington",
"hotelId": "209371"
},
[
{
"price1": "279",
"tax1": "70",
"vendor1": "Prestigia.com"
},
{
"price2": "253",
"tax2": "51",
"vendor2": "eDreams"
},
{
"price3": "244",
"tax3": "48",
"vendor3": "Nustay.com"
},
{
"price4": null,
"tax4": null,
"vendor4": null
},
{
"price5": "253",
"tax5": "51",
"vendor5": "Tripadvisor"
}
]
],
[
{
"hotelName": "Park Grand London Hyde Park",
"hotelId": "3164384"
},
[
{
"price1": "263",
"tax1": "53",
"vendor1": "eDreams"
},
{
"price2": "263",
"tax2": "53",
"vendor2": "Booking.com"
},
{
"price3": "263",
"tax3": "53",
"vendor3": "Agoda.com"
},
{
"price4": null,
"tax4": null,
"vendor4": null
},
{
"price5": "263",
"tax5": "53",
"vendor5": "Tripadvisor"
}
]
],
[
{
"hotelName": "Park Plaza Westminster Bridge London",
"hotelId": "1657415"
},
[
{
"price1": "426",
"tax1": "85",
"vendor1": "eDreams"
},
{
"price2": "451",
"tax2": "113",
"vendor2": "Prestigia.com"
},
{
"price3": "415",
"tax3": "82",
"vendor3": "Nustay.com"
},
{
"price4": "455",
"tax4": "91",
"vendor4": "Agoda.com"
},
{
"price5": null,
"tax5": null,
"vendor5": null
}
]
],
[
{
"hotelName": "The Darlington Hyde Park",
"hotelId": "214639"
},
[
{
"price1": "252",
"tax1": "50",
"vendor1": "eDreams"
},
{
"price2": "252",
"tax2": "50",
"vendor2": "Booking.com"
},
{
"price3": "251",
"tax3": "50",
"vendor3": "Agoda.com"
},
{
"price4": null,
"tax4": null,
"vendor4": null
},
{
"price5": "252",
"tax5": "50",
"vendor5": "Tripadvisor"
}
]
}Understand the Response
Properties
Description
Last updated