# 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 for Locus Pro. Each call burns credits from your workspace balance.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/credits/geoportal-mp/`
**Auth:** `Authorization: Bearer <LOCUS_CREDITS_SECRET_KEY>` (an `lcr_` secret key or a scoped `lcac_` agent credential)
**Required header:** `Idempotency-Key: <fresh UUID per call>`. A retry with the same key replays the stored result without a new charge.
**Response:** the provider response after any endpoint-specific normalization. `X-Locus-Credits-Charged` carries the charge and `X-Locus-Credits-Balance` the remaining balance. Insufficient credits return `402` before the provider is called.
**Pricing:** estimated costs below are USD. Locus debits the credit equivalent at your workspace rate.

Full call contract: https://docs.paywithlocus.com/api-reference/introduction

> Using a Pay With Locus wallet key (`claw_` prefix)? Wallet routes are documented separately: https://docs.paywithlocus.com/wrapped-apis/for-agents

## 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/credits/geoportal-mp/get-administrative-layers \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/geoportal-mp/get-district-boundaries \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/geoportal-mp/get-districts \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/geoportal-mp/get-forest-data \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/geoportal-mp/get-road-network \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/geoportal-mp/get-service-catalog \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/geoportal-mp/get-subdistrict-boundaries \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/geoportal-mp/get-village-boundaries \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"district_name":"<string>"}'
```

## Next steps

- [All wrapped API providers](https://paywithlocus.com/wapi/index.md): pick another provider.
- [Find and call tools](https://paywithlocus.com/agent/tools.md): price ceilings, async results, and errors.
- [Credits and billing](https://paywithlocus.com/agent/billing.md): what a call costs and how to add credits.
- [Agent docs index](https://paywithlocus.com/agent/index.md): every Locus agent page.