These tools provide the foundational building blocks for location-aware applications. Beyond rendering fast vector tiles and converting addresses into precise coordinates, the platform equips you with advanced logistics capabilities, including multi-vehicle routing, sequence optimization, and distance matrices, all while allowing you to monitor your workspace quotas in real time.
Authenticate API requests by including your workspace key in the vindhyakmaps-api-key HTTP header. To avoid unauthorized requests, you can easily lock down your API keys using specific IP address and domain origin restrictions.
vindhyakmaps-api-key : vindhyakmaps_your_api_key
Domain & IP Whitelisting :
If your key has allowedDomains configured, requests must include a matching Origin or Referer header./v1/workspace/usageRetrieve monthly usage counters, Free plan limits, and your Pay As You Go credit balance (INR) for the workspace associated with your API key.
const response = await fetch("https://api.vindhyakmaps.com/v1/workspace/usage", {
headers: { "vindhyakmaps-api-key": apiKey }
});
if (!response.ok) {
throw new Error(`Usage request failed: ${response.status}`);
}
const usage = await response.json();{
"status": "success",
"data": {
"tier": "PAY_AS_YOU_GO",
"currency": "INR",
"creditBalance": "498.5000",
"usage": 142,
"keyUsage": 142,
"limit": null,
"tileUsage": 1240,
"tileLimit": null
}
}Vindhyak Maps uses standard HTTP status codes to indicate the success or failure of your API requests.
| Code | Meaning | Common Cause |
| 400 | Bad Request | Waypoint limit exceeded, empty waypoints provided for optimization, or invalid matrix indices. |
| 401 | Unauthorized | Missing or invalid vindhyakmaps-api-key header. |
| 402 | Payment Required | Insufficient Pay As You Go credit balance. Top up your workspace wallet to continue. |
| 403 | Forbidden | API key is paused or deleted, request originated from an unauthorized IP/domain, or the endpoint requires a Pay As You Go plan. |
| 429 | Too Many Requests | Monthly Free plan API or tile quota reached, or the 5-call Playground limit has been exhausted. |
/v1/tiles/{z}/{x}/{y}.mvtRequest a vector tile using its zoom level and tile coordinates. Supported zoom levels are 0 ≤ z ≤ 22 with valid x and y values for that zoom level. Requests use the tile allowance shown in your plan.tileUsageCount.
async function getTile(apiKey, z, x, y) {
const response = await fetch(
`https://api.vindhyakmaps.com/v1/tiles/${z}/${x}/${y}.mvt`,
{ headers: { "vindhyakmaps-api-key": apiKey } }
);
if (!response.ok) {
throw new Error(`Tile request failed: ${response.status}`);
}
return response.arrayBuffer();
}/v1/geocode/forwardSubmit an address to look up its available geographic coordinates and formatted result.
async function forwardGeocode(apiKey, address) {
const response = await fetch("https://api.vindhyakmaps.com/v1/geocode/forward", {
method: "POST",
headers: {
"Content-Type": "application/json",
"vindhyakmaps-api-key": apiKey
},
body: JSON.stringify({ address })
});
if (!response.ok) {
throw new Error(`Geocoding request failed: ${response.status}`);
}
return response.json();
}{
"status": "success",
"data": [
{
"lat": 23.1828,
"lng": 75.7682,
"formatted_address": "Jaisinghpura, Ujjain, Madhya Pradesh 456006, India",
"components": {
"road": "Mahakal Mandir Marg",
"neighbourhood": "Jaisinghpura",
"city": "Ujjain",
"state": "Madhya Pradesh",
"postcode": "456006",
"country": "India",
"country_code": "in"
}
}
]
}/v1/geocode/reverse?lat={lat}&lng={lng}Please Note :
x and y are the actual lat and lng values passed along with the request.Provide lat and lng query parameters to resolve an address and available address components for those coordinates.
async function reverseGeocode(apiKey, lat, lng) {
const query = new URLSearchParams({
lat: String(lat),
lng: String(lng)
});
const response = await fetch(
`https://api.vindhyakmaps.com/v1/geocode/reverse?${query}`,
{ headers: { "vindhyakmaps-api-key": apiKey } }
);
if (!response.ok) {
throw new Error(`Reverse geocoding failed: ${response.status}`);
}
return response.json();
}{
"status": "success",
"data": {
"lat": 23.1828,
"lng": 75.7682,
"formatted_address": "Jaisinghpura, Ujjain, Madhya Pradesh 456006, India",
"components": {
"road": "Mahakal Mandir Marg",
"neighbourhood": "Jaisinghpura",
"city": "Ujjain",
"state": "Madhya Pradesh",
"postcode": "456006",
"country": "India",
"country_code": "in"
}
}
}