API Specification

Tour Search API

v1.2.0 Active API Key Required

Search tour packages based on filters

Endpoint

POST /api/b2b/tour/search.php

This API returns a list of tour packages based on search filters such as category, destination, price range, and duration.

API Key Authentication

Authenticate requests via HTTP Header or Request Parameter
Required for all endpoints

Enjoy Holiday Hub APIs authenticate requests using your unique secret API Key. You can provide your key in either of the following standard formats:

Method 1: Header (Recommended)

Send key in standard HTTP header:

X-API-Key: demo_123456789
Method 2: Body / Query

Send key in JSON payload or query param:

"api_key": "demo_123456789"
Demo Sandbox Key: demo_123456789
Get your production key in Agent Portal

Request Parameters

FieldTypeRequiredDescription
KeywordstringOptionalSearch keyword (title/location)
CategoryIdintegerOptionalFilter by category
MinPricenumberOptionalMinimum price
MaxPricenumberOptionalMaximum price
DurationstringOptionalDuration filter (e.g., 3-5 days)
MinPeopleintegerOptionalMinimum people
MaxPeopleintegerOptionalMaximum people
PageintegerOptionalPage number (default 1)
LimitintegerOptionalResults per page (default 10)

Request Example

JSON Response
{
    "api_key": "YOUR_API_KEY",
    "Keyword": "Manali",
    "CategoryId": 1,
    "MinPrice": 5000,
    "MaxPrice": 15000,
    "Page": 1,
    "Limit": 10
}

cURL Example

curl -X POST "https://enjoyholidayhub.com/api/b2b/tour/search.php" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "X-API-Key: demo_123456789" \
  -d '{
    "Keyword": "Manali",
    "Page": 1,
    "api_key": "demo_123456789"
}'

Response Example

JSON Response
{
    "status": true,
    "data": {
        "total": 25,
        "page": 1,
        "limit": 10,
        "tours": [
            {
                "tour_id": 201,
                "title": "Manali Adventure Trip",
                "duration": "5 Days / 4 Nights",
                "category": "Adventure",
                "price_from": 8000,
                "locations": [
                    "Delhi",
                    "Manali"
                ],
                "banner_image": "https://example.com/banner.jpg"
            },
            {
                "tour_id": 202,
                "title": "Shimla Holiday Package",
                "duration": "4 Days / 3 Nights",
                "category": "Family",
                "price_from": 6500,
                "locations": [
                    "Delhi",
                    "Shimla"
                ],
                "banner_image": "https://example.com/banner2.jpg"
            }
        ]
    }
}

Response (Error)

ERROR / NOTICE No tours found
JSON Response
{
    "status": false,
    "message": "No tours found"
}

Important Notes

  • 🔍 Use filters to refine search results
  • 📌 tour_id is used for detail API
  • 📊 Supports pagination for large datasets
  • 💰 Price is starting price (may vary by date)
  • 🌍 Locations help in UI display and search