API Specification
Tour Search API
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 ParameterEnjoy 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:
Get your production key in Agent Portal
demo_123456789
Request Parameters
| Field | Type | Required | Description |
|---|---|---|---|
Keyword | string | Optional | Search keyword (title/location) |
CategoryId | integer | Optional | Filter by category |
MinPrice | number | Optional | Minimum price |
MaxPrice | number | Optional | Maximum price |
Duration | string | Optional | Duration filter (e.g., 3-5 days) |
MinPeople | integer | Optional | Minimum people |
MaxPeople | integer | Optional | Maximum people |
Page | integer | Optional | Page number (default 1) |
Limit | integer | Optional | Results 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