bharatlas
v1.8.0Query India's open geo data, and author collect maps: register a link, moderate, publish.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
list_layers
List available geo layers. Use to discover what data bharatlas has. Returns layer IDs, names, row counts, categories, realm (below, ground or air) and, for the layers the point lookups read, `lookups` ({ground: section, surface: section}: the section of ground_at or surface_at that reads the layer). Filter by category (boundaries, city-wards, environment, water, agriculture, transport, etc.), realm, admin level (state, district, block, village, etc.), source, or text search.
| Parameter | Type | Description |
|---|---|---|
category | string | Filter by category: boundaries, city-wards, people, environment, water, agriculture, transport, infrastructure, health-edu, economy |
level | string | Filter by admin level: state, district, subdistrict, block, village, etc. |
limit | number | Max results (default 20) |
offset | number | Skip N results for pagination |
q | string | Text search across layer IDs, sources, and descriptions |
realm | string | Filter by realm: below (rocks, faults, minerals, aquifers, groundwater), ground (boundaries, wards, rivers, forests, roads, places), air (cyclone tracks) |
source | string | Filter by data source: LGD, SOI, Bhuvan, OpenCity, DataMeet, etc. |
get_layer_schema
Get column names, types, and values for a layer (all of them for a column with at most 20; distinct_count; up to 50 values with row counts). Use BEFORE querying to discover what columns exist and what values they contain. Essential for knowing the right column names for filters.
| Parameter | Type | Description |
|---|---|---|
layer_id * | string | Layer ID (e.g. lgd_states, airports, soi_forests, wards_chennai) |
query_layer
Query a layer's data with filters and grouping. Reads the parquet file at runtime. Supports: select specific columns, filter by column values, group by a column to get counts, and sum numeric columns per group (e.g. roll block areas up to district totals). Use get_layer_schema first to discover column names. Examples: 'airports in Karnataka' -> where: {state: 'Karnataka'}, 'forest types' -> group_by: 'type', 'health facilities in Bihar' -> where: {state: 'BIHAR'}, select: ['name', 'type'].
| Parameter | Type | Description |
|---|---|---|
layer_id * | string | Layer ID to query |
group_by | string | Column to group by. Returns {value: count} instead of rows. |
include_centroid | boolean | Include _lat/_lng centroid coordinates (defaults to true). Set false to exclude. |
limit | number | Max rows (default 100, max 1000) |
select | array | Column names to return. Omit for all non-geometry columns. |
sum | array | Numeric columns to total per group (requires group_by). Adds {sums: {group: {col: total}}}. Use this to roll finer units up, e.g. block-level areas to district totals. Shares/percentages are not addit… |
where | object | Filter conditions as {column: value} pairs. Exact, case-insensitive match on flat columns (not partial). Values may contain commas. |
locate
Given a latitude/longitude, find which administrative boundaries, zones, and regions contain that point. Returns state, district, subdistrict, block, parliament/assembly constituency, pincode, seismic zone, high court jurisdiction, the municipal ward (for the 30+ cities with ward layers), and more. The 'where am I?' tool. Also accepts specific layer IDs to check.
| Parameter | Type | Description |
|---|---|---|
lat * | number | Latitude (6 to 38, India bounding box) |
lng * | number | Longitude (68 to 98, India bounding box) |
layers | array | Specific layer IDs to check. Omit to use the default: 13 essential admin/zone layers PLUS the city ward layer(s) covering the point (for the 30+ cities with ward layers). Passing this replaces the def… |
nearby
Find features from a layer that are near a given point, nearest first, within radius_km. Works for points, polygons and lines: points are measured to the point, lines and polygons to the nearest part of their shape (0 inside a polygon; `_distance_to` says which). Returns the true count within the radius plus the nearest `limit`. Example: 'reservoirs near Bengaluru' -> layer_id: 'wris_reservoirs', lat: 12.97, lng: 77.59, radius_km: 50.
| Parameter | Type | Description |
|---|---|---|
lat * | number | Center point latitude |
layer_id * | string | Layer to search for nearby features |
lng * | number | Center point longitude |
limit | number | Max results (default 20) |
radius_km | number | Search radius in kilometres (default 25, max 200) |
ground_at
What is below a point, in one call: seismic zone, nearest active faults, lineaments and recorded earthquakes, rock type (GSI lithology) and landform, aquifer, a permeability class (GLHYMPS, global and coarse), nearby groundwater wells, soil at 0-5, 5-15 and 15-30 cm (ISRIC SoilGrids 2.0: clay, sand, silt, pH, organic carbon, bulk density, CEC, nitrogen, WRB soil group) and the nearest Soil Health Card sample, ground subsidence (cm/yr) in megacities, and tunnels, buried pipelines and cables, mines and caves nearby. Returns a one-line `summary` plus `sections`, each layer with its credit, licenc…
| Parameter | Type | Description |
|---|---|---|
lat * | number | Latitude (6 to 38, India bounding box) |
lng * | number | Longitude (68 to 98, India bounding box) |
layers | array | Read only these layers (ids, e.g. soilgrids (the SoilGrids raster), seismic_zones, cgwb_aquifers), as well as any sections asked; default all |
open_only | boolean | true leaves out the non-commercial layers (for commercial use); default false |
sections | array | Read only these sections (an array, or one comma-separated string); default all |
surface_at
What is on the ground at a point, in one call: the admin units, ward and pincode; land cover, elevation and slope, population density and block land use; climate zones; the river basin, nearest river, water body, dam and wetland, and flood history; hazards (seismic zone, landslides, cyclone tracks, coastal regulation zone); forests and protected areas with the nearest one; the nearest highway, railway and metro station, airport and bus stop; the nearest hospital (three sources) and school, and places within 1 km; the nearest power line, power plant and water-supply facility; distance to India'…
| Parameter | Type | Description |
|---|---|---|
lat * | number | Latitude (6 to 38, India bounding box) |
lng * | number | Longitude (68 to 98, India bounding box) |
layers | array | Read only these layers (ids, e.g. dem, worldcover and worldpop (the rasters), ir_stations, gs_highways, or a ward layer such as wards_chennai), as well as any sections asked; default all |
open_only | boolean | true leaves out the non-commercial layers (for commercial use); default false |
sections | array | Read only these sections (an array, or one comma-separated string); default all |
list_categories
List all data categories with layer counts.
get_layer_detail
Get full metadata for a single layer: download URLs (parquet, pmtiles, geojson, kml, shapefile), attribution, license, feature count, level metadata, realm (below, ground or air), `lookups` (the section of ground_at or surface_at that reads it, if any), and versions (the dated releases to cite).
| Parameter | Type | Description |
|---|---|---|
layer_id * | string | Layer ID |
list_submissions
List community-submitted geo layers. These are user-contributed datasets under open licenses. Filter by category or search by name.
| Parameter | Type | Description |
|---|---|---|
category | string | Filter by category |
limit | number | Max results (default 20) |
offset | number | Pagination offset |
q | string | Search name and description |
sort | string | Sort order (default: recent) |
register_map
Register a collect map so this server can act on it. Paste the whole share link (e.g. https://collect.bharatlas.com/c/<id>/admin#<token>). The token in the #fragment sets your scope: admin = full control, collect = add points, view = read published. New maps are created online at collect.bharatlas.com first (no account or key needed); this registers one you already made.
| Parameter | Type | Description |
|---|---|---|
link * | string | a collect.bharatlas.com share link with the token in the #fragment |
list_my_maps
List the collect maps you have registered here (local store), each with its scope.
get_map
A collect map's metadata + record counts, plus a link to open it in collect. Any registered scope.
| Parameter | Type | Description |
|---|---|---|
id * | string | the map (collection) id |
get_records
A collect map's records as a GeoJSON FeatureCollection, for reading, analysis, or backup/export. view and collect scope return published points; admin can also read pending/rejected via status. Each record's properties._photos lists its photo links (public once the point is approved); _ai holds notes a model wrote from the photo (others see only notes the owner accepted).
| Parameter | Type | Description |
|---|---|---|
id * | string | |
status | string | admin only: pending | published | rejected |
moderate_record
Approve or reject one pending point (needs the admin link). Pass the map id it belongs to.
| Parameter | Type | Description |
|---|---|---|
id * | string | the map (collection) id |
record_id * | string | |
status * | ||
reason | string |
import_points
Bulk-import points you already hold into a collect map (needs the admin link). NOT for synthetic data. Requires a named source + rights confirmation; each row lands with that source as its provenance. Re-running is safe for rows with a client id (the row's own stable id, unique within the map, up to 128 characters): a row already imported with that id is updated in place if its data changed and otherwise left alone, so the same import twice adds nothing. The client id is the record's `client_id`, else the property named by client_id_field, else (by default) the GeoJSON feature `id`, then an `i…
| Parameter | Type | Description |
|---|---|---|
id * | string | |
records * | array | GeoJSON-like {geometry, properties}, optionally with client_id |
rights_confirmed * | boolean | you have the right to publish this under the map's licence |
source * | string | |
client_id_field | string | property holding each row's stable id (e.g. "code"); default: feature id, then an `id` property; "" for none |
edit_map
Edit a collect map's settings: name/description/purpose/category/data_year/basemap (needs the admin link). Licence can only change while the map has no records.
| Parameter | Type | Description |
|---|---|---|
id * | string | |
basemap | string | |
category | string | |
data_year | integer | null | |
description | string | |
license | string | |
name | string | |
purpose | string |
publish
Submit a collect map's approved points to the bharatlas catalog for review (needs the admin link). Nothing goes live automatically: a maintainer approves the submission first; the response status is 'pending' until then. Once approved it is queryable via list_submissions / query_layer / locate above.
| Parameter | Type | Description |
|---|---|---|
id * | string |
create_map
Optional: create a collect map programmatically. Most maps are made online at collect.bharatlas.com (no key needed); prefer that and register_map the link. This path needs COLLECT_API_KEY (the request-only anti-abuse gate) and auto-registers the new admin link.
| Parameter | Type | Description |
|---|---|---|
fields * | array | the form for each record (see collect.bharatlas.com/schema/v1.json); a field of type "photo" (max_photos 1-3) asks for photos |
geometry * | array | what contributors may add |
name * | string | 3-120 chars |
purpose * | string | shown to contributors |
basemap | ||
category | string | |
data_year | integer | |
description | string | |
license | string | open licence id (CC0-1.0, CC-BY-4.0, CC-BY-SA-4.0, ODbL-1.0, ODC-PDDL-1.0, GODL-India, CDLA-Permissive-2.0); default CC0-1.0, and the answer names the licence used |
mode | how people collect: form (default); form_ai = form plus notes a model writes from the photo, for the owner to check; photos_ai = people only take photos and the model fills the form (places only). AI… | |
moderation | boolean | default true: points wait for approval |