API Documentation
This API contains 31649 CBSE school data (sourced from the CBSE SARAS service). Use the endpoints below to fetch school details, list states, districts and schools by district.
GET /api/schools
View ExampleReturns a list of CBSE schools with optional filters for state, district, and status. It has 12.8MB of data.
Examples
Browser (client-side):
fetch("/api/schools")
.then((r) => r.json())
.then((data) => console.log(data));Curl (cmd.exe):
curl http://localhost:3000/api/schools
Example: /api/schools?state=Tamil&district=CHENNAI&status=3
GET /api/schools/{affiliatedId}
View ExampleReturns detail information for a single CBSE school. Provide the school's affiliated id in the path (e.g. 1930706).
Examples
Browser (client-side):
fetch("/api/schools/1930706")
.then((r) => r.json())
.then((data) => console.log(data));Curl (cmd.exe):
curl http://localhost:3000/api/schools/1930706
Example: /api/schools/1930706
GET /api/states
View EndpointReturns a list of available states and their slugs. Example response: { states: [{ name, slug }] }. Use this to discover state identifiers for district-level queries.
Examples
Browser (client-side):
fetch("/api/states")
.then((r) => r.json())
.then((data) => console.log(data));Curl (cmd.exe):
curl http://localhost:3000/api/states
GET /api/states/{state}
View EndpointReturns a list of districts for the given state. Use the state name or slug in the path to retrieve district-level data.
Examples
Browser (client-side):
fetch("/api/states/{state}")
.then((r) => r.json())
.then((data) => console.log(data));Curl (cmd.exe):
curl http://localhost:3000/api/states/19
Example: /api/states/19
GET /api/states/{state}/{district}
View EndpointReturns the list of schools in the specified district. Use state and district identifiers (name or slug) in the path to fetch district-level schools.
Examples
Browser (client-side):
fetch("/api/states/{state}/{district}")
.then((r) => r.json())
.then((data) => console.log(data));Curl (cmd.exe):
curl http://localhost:3000/api/states/19/13
Example: /api/states/19/13
Postman collections
Import the Postman collection files from the postman/ folder. Use the provided environment (base_url) and run the requests.
Quick Postman import
- Open Postman → Import → File and choose the collection JSON.
- Import the environment file `postman/CBSESchools.postman_environment.json` and set `base_url` to
http://localhost:3000. - Run the requests. Example:
{{base_url}}/api/schools?state=Tamil&status=3
Note: the collection uses the environment variable base_url so you can point requests to local or deployed instances.
Example curl (cmd.exe):
curl "http://localhost:3000/api/schools?state=Tamil&status=3"