API Reference
Dehradun Tourism REST API Reference
Base URL: https://dehradun1.vercel.app
Machine-readable specifications:
GET
/apiService discovery endpoint. Returns metadata, operational status, and a catalog of all public API endpoints.
Example Response (200 OK)
{
"name": "Dehradun Tourism Public REST API",
"version": "1.0.0",
"status": "operational",
"documentation_url": "https://dehradun1.vercel.app/docs/api",
"developer_portal": "https://dehradun1.vercel.app/developers",
"openapi_url": "https://dehradun1.vercel.app/openapi.json",
"mcp_server": "https://dehradun1.vercel.app/.well-known/mcp",
"endpoints": { ... }
}GET
/api/placesList and filter tourist attractions, historical landmarks, nature reserves, temples, and institutes in Dehradun.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| category | string | Filter by type: nature, heritage, spiritual, institutional, recreation |
| search | string | Keyword matching against place name, hindi name, or description (e.g. cave, temple) |
| limit | integer | Number of items to return (default: 50, max: 100) |
| offset | integer | Pagination offset (default: 0) |
Example Response (200 OK)
{
"total": 17,
"count": 1,
"offset": 0,
"limit": 50,
"places": [
{
"id": "robbers-cave-guchhupani",
"index": 1,
"name": "Robber's Cave (Guchhupani)",
"hindi": "गुच्चुपानी",
"description": "A 600m long natural river cave formation, believed to be the hideout of Sultana Daaku.",
"distance": "8 km from city center",
"entryFee": "₹25–50",
"bestTime": "Summer",
"category": "nature",
"lat": 30.3756,
"lng": 78.0563,
"image": "https://upload.wikimedia.org/wikipedia/commons/2/2e/Robber%27s_Cave_Dehradun.jpg"
}
]
}GET
/api/places/{id}Retrieve detailed data for a specific tourist spot using its slug (e.g. forest-research-institute) or numerical index.
Example Request
curl -s "https://dehradun1.vercel.app/api/places/forest-research-institute"
GETPOST
/api/viewsFetch or increment the site's live visitor counter. Supports GET /api/views?action=up or standard POST /api/views.
Structured JSON Error Responses
All API errors return consistent JSON objects with machine-readable error codes, messages, and resolution hints for AI agents.
{
"error": {
"code": "PLACE_NOT_FOUND",
"message": "Tourist attraction with ID or slug 'invalid-id' was not found.",
"status": 404,
"hint": "Query GET /api/places to discover available places and their unique slugs."
}
}