Hotel accommodation with location, star rating, contact information, pricing, amenities, room count, and customer ratings. Used for hotel booking platforms, travel agencies, and accommodation services.
https://api.mockly.codes/hotels?page=1&limit=10&count=10Configure your request and click Send Request to see the response here.
/hotelsGet a collection of hotels
/travel/hotels/hotels/:idGet a single hotel by ID
/travel/hotels/:id/hotels/metaGet resource metadata and schema
/travel/hotels/metaThe search feature allows you to filter results by searching for text across all or specific fields. Choose between ?q= or ?search= parameter names.
Search across all text fields:
GET https://api.mockly.codes/hotels?q=laptopGET https://api.mockly.codes/hotels?q=laptop&search_fields=name,descriptionsearch_fields, all text fields are searched// Get 10 hotels
fetch('https://api.mockly.codes/hotels?count=10')
.then(res => res.json())
.then(data => console.log(data));import requests
response = requests.get(
'https://api.mockly.codes/hotels?count=10'
)
data = response.json()curl "https://api.mockly.codes/hotels?count=10"fetch('https://api.mockly.codes/hotels?nocache=true')idintegerUnique identifier for the hotel
random_intnamestringHotel name
hotel_namedescriptionstringDetailed description of the hotel, facilities, and services
paragraphstarsintegerHotel star rating (1-5 stars)
hotel_starsaddressstringStreet address of the hotel
addresscitystringCity where the hotel is located
citycountrystringCountry where the hotel is located
countrylatitudenumberGeographic latitude coordinate of the hotel
latitudelongitudenumberGeographic longitude coordinate of the hotel
longitudephonestringHotel contact phone number
phoneemailstringHotel contact email address
emailemailwebsitestringHotel website URL
urluriratingnumberAverage customer rating, typically on a scale of 1-5
ratingprice_per_nightnumberPrice per night for a standard room
hotel_pricecurrencystringISO currency code for the price (e.g., USD, EUR, GBP)
currencyroomsintegerTotal number of rooms available in the hotel
hotel_roomsamenitiesarrayList of hotel amenities (e.g., WiFi, Pool, Gym, Spa, Restaurant)
amenitiesimagestringURL to the hotel's main image or photo
image_urluricountintegerNumber of items to return (default: 10, max: 100)
seedintegerSeed for reproducible data generation
nocachebooleanBypass cache and generate fresh data on every request