Skip to content

hassaan-dev/booking-api-integration

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hotel Booking API Integration

Simple PHP implementation for searching hotels using the Booking.com API through RapidAPI.

What's This?

This project fetches hotel availability from Booking.com and adds a configurable markup to the prices. It's pretty straightforward - just search by location and dates, get back a list of hotels with pricing.

Setup

Requirements

  • PHP 7.4 or higher
  • cURL extension enabled
  • RapidAPI account with Booking.com API access

Installation

  1. Clone or download this repo
  2. Copy .env.example to .env
  3. Add your RapidAPI key to the .env file
cp .env.example .env

Edit .env and set your API key:

RAPID_API_KEY=your_actual_key_here

API Reference

Using the Booking.com API from RapidAPI: https://rapidapi.com/tipsters/api/booking-com

Two endpoints are used:

  • /v1/hotels/locations - Find destination IDs
  • /v1/hotels/search - Search for hotels

License

Do whatever you want with this code.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages