API Documentation

Powerful API for Developers

Getting Started

Yatrah API provides access to comprehensive information about sacred places across India. Our RESTful API is designed to be simple, fast, and reliable.

Authentication

All API requests require an API key. Contact the administrator to get your API key.

X-API-Key: your_api_key_here

API Endpoints

Places API - All in One

GET https://yatrah.com/api/v1/places

Single comprehensive API endpoint to get all sacred places with optional filtering.

Query Parameters (All Optional):
  • search - Search by name, description, category, highlights, etc.
  • state - Filter by state name (e.g., Gujarat, Rajasthan)
  • city - Filter by city name (e.g., Ahmedabad, Jaipur)
  • category - Filter by category (e.g., Temple, Ashram)
  • page - Page number for pagination (default: 1)
  • per_page - Results per page (default: 20, max: 100)
Examples:

Get all places:

curl -X GET "https://yatrah.com/api/v1/places" \ -H "X-API-Key: your_api_key_here"

Search for temples:

curl -X GET "https://yatrah.com/api/v1/places?search=temple" \ -H "X-API-Key: your_api_key_here"

Get places in Gujarat:

curl -X GET "https://yatrah.com/api/v1/places?state=Gujarat" \ -H "X-API-Key: your_api_key_here"

Get places in Ahmedabad, Gujarat:

curl -X GET "https://yatrah.com/api/v1/places?state=Gujarat&city=Ahmedabad" \ -H "X-API-Key: your_api_key_here"

Search with pagination:

curl -X GET "https://yatrah.com/api/v1/places?search=temple&page=2&per_page=50" \ -H "X-API-Key: your_api_key_here"

Response Format

{ "success": true, "data": [ { "id": 1, "tour_name": "Adalaj Stepwell", "description": "Five‑storey intricately carved stepwell (Vav).", "category": "Historical", "state": "Gujarat", "city": "Adalaj", "images": ["image_url"], "latitude": "23.1645", "longitude": "72.5714" } ], "meta": { "current_page": 1, "total": 154 } }

Features

  • ✓ RESTful API design
  • ✓ JSON response format
  • ✓ Pagination support
  • ✓ Advanced filtering
  • ✓ Search functionality
  • ✓ API key authentication
  • ✓ Credit-based usage system
  • ✓ High performance
Note: API access requires authentication. Please contact the administrator to request an API key and purchase credits.
Premium Development Services
Want a Website or App Like This?

We create Mobile Apps, Websites, E-commerce & Custom Solutions