Indian Datasets
Indian States API
API documentation for fetching and managing list of Indian states and union territories using JSONly API.
🇮🇳 Indian States API
This documentation explains how to use the Indian States API to retrieve and manage the list of states and union territories in India.
🔗 Base URL
https://jsonly.vercel.app/api/india/states⚙️ Query Parameters (GET)
Prop
Type
List All States
Endpoint:
GET /api/india/statesOutput Example
{
"success": true,
"total": 36,
"count": 36,
"states": ["Andhra Pradesh", "Arunachal Pradesh", "Assam", "..."]
}Search States
Endpoint:
GET /api/india/states?state=punjabOutput Example
{
"success": true,
"total": 1,
"states": ["Punjab"]
}🛠️ Mutations (Full CRUD)
Mutations are currently in-memory and will revert to the original state upon server restart. Note that modifying a state name here will also affect the Cities API.
1. Register a New State (POST)
Add a new state with an initial set of cities.
POST /api/india/states
Content-Type: application/json
{
"state": "New Territory",
"cities": ["City A", "City B"]
}2. Rename a State (PATCH)
Rename an existing state.
PATCH /api/india/states
Content-Type: application/json
{
"oldState": "New Territory",
"newState": "Updated Territory"
}3. Delete a State (DELETE)
Remove a state and all its associated cities.
DELETE /api/india/states?state=Updated TerritoryNeed cities for a specific state? Use the Indian Cities API.