# Geoportal Mp — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Access detailed geospatial information about Madhya Pradesh including administrative boundaries at district, tehsil, and village levels, along with forest coverage and road network data. View and analyze geographic layers directly from official government sources to support mapping, planning, and regional analysis projects.

**Category:** Maps & Geospatial | **Website:** [geoportal.mp.gov.in/](https://geoportal.mp.gov.in/) | **Docs:** [parse.bot/marketplace/359ccc2e-f443-4b6c-91ee-b86d11af35f7/geoportal-mp-gov-in-api](https://parse.bot/marketplace/359ccc2e-f443-4b6c-91ee-b86d11af35f7/geoportal-mp-gov-in-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-geoportal-mp-gov-in-api-359ccc2e/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_administrative_layers

Lists all available administrative and geographic layers in the NIC admin2024 MapServer database, including headquarters, boundaries, roads, and railways with their layer IDs and geometry types. No parameters required.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-geoportal-mp-gov-in-api-359ccc2e/get_administrative_layers \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_district_boundaries

Fetches district boundary geospatial data as a GeoJSON FeatureCollection for Madhya Pradesh. Returns polygon geometries in WGS84 (EPSG:4326) coordinate system. Can filter by a specific district name to get a single district polygon.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `district_name` | string | No | Filter by district name (e.g. 'Bhopal'). Case-insensitive. If omitted, returns all districts. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-geoportal-mp-gov-in-api-359ccc2e/get_district_boundaries \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"district_name":"<string>"}'
```

### get_districts

Fetches the list of all 55 districts in Madhya Pradesh with metadata including district names, state/district codes, LGD codes, and object IDs. Results are sorted alphabetically by district name. No parameters required.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-geoportal-mp-gov-in-api-359ccc2e/get_districts \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_forest_data

Fetches forest-related GIS data for Madhya Pradesh.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `service_path` | string | No | Service path to query (e.g., 'MP_Forest_Data/MapServer/0'). Defaults to 'MP_Forest_Data/MapServer/0'. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-geoportal-mp-gov-in-api-359ccc2e/get_forest_data \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"service_path":"<string>"}'
```

### get_road_network

Fetches road network data for Madhya Pradesh. Returns the first 100 road features as polyline geometries with attributes including road type, name, class code, and length in meters. No parameters required.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-geoportal-mp-gov-in-api-359ccc2e/get_road_network \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_service_catalog

Fetches the root service catalog from the NIC GIS server listing all available MapServer services, folders, and the server version. No parameters required. Returns a single catalog object.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-geoportal-mp-gov-in-api-359ccc2e/get_service_catalog \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_subdistrict_boundaries

Fetches subdistrict (Tehsil) boundary geospatial data as a GeoJSON FeatureCollection for Madhya Pradesh. Returns up to 200 polygon features in WGS84 coordinates. Can filter by parent district name.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `district_name` | string | No | Filter by parent district name (e.g. 'Bhopal'). Case-insensitive. If omitted, returns subdistricts across all districts (up to 200). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-geoportal-mp-gov-in-api-359ccc2e/get_subdistrict_boundaries \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"district_name":"<string>"}'
```

### get_village_boundaries

Fetches village-level boundary geospatial data as a GeoJSON FeatureCollection for a specific district in Madhya Pradesh. Returns up to 100 polygon features in WGS84 coordinates with village names, codes, and full administrative hierarchy.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `district_name` | string | Yes | District name to fetch village boundaries for (e.g. 'Bhopal'). Case-insensitive. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-geoportal-mp-gov-in-api-359ccc2e/get_village_boundaries \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"district_name":"<string>"}'
```
