build booking.com hotel price finder

How I Built Booking.com Hotel Price Finder with Loveable 

Do you want an easier way to grab hotel prices from Booking? Maybe you’re a developer who doesn’t want to start from scratch, or a no-coder who just wants data without the pain. 

Scraping Booking.com is tricky, and their API is not available for every business. That’s why I built a hotel price scraper using Loveable that requires minimal to no coding skills. I’ll show you, step by step, how you can set it up and get those prices fast.

What You’ll Need

  • Account on Makcorps
  • Loveable account

1. Get Your Makcorps Booking.com API Key

  • Sign up at Makcorps and verify your email.
  • You’ll receive your API key via email (30 free credits for testing).


2. Understand the API Endpoint and How it Works

Read the Booking.com Hotel Price API Documentation for full details.

Endpoint:

https://api.makcorps.com/booking?country=us&hotelid=the-lenox&checkin=2024-12-05&checkout=2024-12-11&currency=USD&kids=0&adults=2&rooms=1&api_key=YOUR-API-KEY

What Each Parameter Means:

  • hotel_id: The unique code for the hotel on Booking.com (find this in the URL of any hotel listing).
  • checkin: The date your guest wants to check in (format: YYYY-MM-DD).
  • checkout: The check-out date (format: YYYY-MM-DD).
  • adults: Number of adults for the search.

How to Use:

  • Replace the values with your own (hotel ID, dates, number of guests) and add your api key in place of YOUR_API_KEY.

3. Add the Prompt in Loveable

Create your account on Loveable.

In Loveable, paste the prompt given below 👇 and include your API key.

Prompt:

I want to build a minimal Booking.com hotel price extractor tool using the MakCorps API.

Features:

Dual input: User can either paste a Booking.com hotel URL or manually enter hotel details.

If a URL is provided, extract:

hotelid: The hotel slug from the URL, e.g., /hotel/nz/pullman-rotorua.html → pullman-rotorua

country: The country code from the URL, e.g., /hotel/nz/ → nz

If entering manually, user inputs both hotelid (hotel-name-in-this-format) and country code (like us).

Other required params: Dates, adults, kids, rooms, currency—all as per API.

Submit: On submit, call:

arduino
CopyEdit
https://api.makcorps.com/booking?country={country}&hotelid={hotelid}&checkin={checkin}&checkout={checkout}&currency={currency}&kids={kids}&adults={adults}&rooms={rooms}&api_key={API_KEY}

Response: Parse response. It's a 2-element array:

response[0]: array of room objects, each with:

room (Room Type)

price (Price)

tax (Tax)

payment_details (array of bullet points)

response[1]: hotel meta object, e.g., {name, address}

UI/UX:

Minimal, Google-style design: white background, light borders, lots of space, nice type.

Use color #E39A12 for buttons, header backgrounds, highlights; otherwise, keep it black/white.

Show hotel name (from response[1]) and check-in/out summary above the table.

Display rooms in a table with these columns: Room Type | Price | Tax | Payment Details (as a bulleted list in the cell).

Footer: "Powered by MakCorps.com"

Special notes:

Dates must be valid (check-out > check-in, at least 1 night).

If API returns a 410 error, show user-friendly error: "Check-out date must be after check-in date."

Make everything work in a single page, no tabs.

Example API response:

json

CopyEdit

[

  [

    {

      "room": "Superior King Room with City View",

      "price": "$179",

      "tax": "Excluded: 15 % VAT",

      "payment_details": [

        "Good breakfast $30",

        "Total cost to cancel",

        "No prepayment needed – pay at the property"

      ]

    },

    ...

  ],

  {

    "name": "Pullman Rotorua",

    "address": ""

  }

]

API Key: ADD_YOUR_API_KEY

Instructions for Loveable:
Build the tool as described above. All data extraction, table formatting, and error handling as per instructions. No raw JSON output—show only the organized table to users!

5. Test & Debug

Try out your new tool and see if you’re getting price data.

If you run into any problems, start by checking your API key and the information you entered. Sometimes it’s just a date in the wrong format, like using slashes instead of dashes, or picking a year that doesn’t exist. 

Another thing to watch for: if Loveable isn’t pulling out the data correctly, it might be because the info is buried inside extra layers of the response. You can describe what you want, and Loveable will usually figure it out. Plus, if you want to change how your tool looks, colors, layout, or anything visual. Just ask, and it’ll adjust to your style.

Conclusion

You’re all set to create a Booking.com hotel price finder web app that anyone can use—no need to wrestle with long lines of code or complicated setups. Just remember to grab your Makcorps API (you get 30 free test credits) and check out the full documentation to really get the hang of how everything works.

Makcorps stands out as one of the top hotel API providers out there. You can also explore their other powerful APIs:

Want to see what else you can build? Check out these tutorials I’ve put together using Makcorps APIs:

Ready to build your own tool? Try Makcorps API for free Today!

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *