GraphQue

Overview

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.

Vector Tiles
Smart Geocoding
Routing & Matrix

Authentication

Authenticate API requests by including your workspace key in the graphque-api-key HTTP header. To avoid unauthorized requests, you can easily lock down your API keys using specific IP address and domain origin restrictions.

Required Header

graphque-api-key : gq_your_api_key

Domain & IP Whitelisting :

If your key has allowedDomains configured, requests must include a matching Origin or Referer header.

Usage & Quotas

GET/v1/usage
Request Cost -0

Retrieve your current monthly workspace API usage, specific key usage, and vector map-tile counters. All usage quotas reset automatically at the start of each calendar month.

const res = await fetch("https://api.graphque.com/v1/usage", {
  headers: { "graphque-api-key": "gq_api_key_here" }
});
const data = await res.json();
Response
{
  "usage": 24,
  "keyUsage": 12,
  "limit": 1000,
  "tileUsage": 180,
  "tileLimit": 10000,
  "tier": "FREE"
}

Errors & Status Codes

GraphQue uses standard HTTP status codes to indicate the success or failure of your API requests.

CodeMeaningCommon Cause
400Bad RequestWaypoint limit exceeded, empty waypoints provided for optimization, or invalid matrix size.
401UnauthorizedMissing or invalid graphque-api-key header.
403ForbiddenAPI key is paused or deleted, request originated from an unauthorized IP/domain, or your active subscription expired.
429Too Many RequestsMonthly workspace API or tile quota reached, or the 5-call Playground limit has been exhausted.

Vector Tiles

GET/v1/tiles/{z}/{x}/{y}.mvt
Request Cost -1

Stream vector tiles for slippy map rendering. This endpoint accepts zoom levels from 0 ≤ z ≤ 22 alongside valid grid coordinates. Each request deducts directly from your workspace's tileUsageCount.

const res = await fetch("https://api.graphque.com/v1/tiles/12/2925/1718.mvt", {
  headers: { "graphque-api-key": "gq_api_key_here" }
});
const blob = await res.blob();
Response & Headers
Content-Type: application/vnd.mvt
Cache-Control: private, no-store

<Binary Tile Stream>

Forward Geocoding

POST/v1/geocode
Request Cost -1

Transform street addresses or city names into precise geographic coordinates.

const res = await fetch("https://api.graphque.com/v1/geocode", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "graphque-api-key": "gq_api_key_here"
  },
  body: JSON.stringify({ address: "Bengaluru, India" })
});
Response
{
  "status": "success",
  "data": {
    "city": "Bengaluru",
    "country": "IN",
    "lat": 12.9716,
    "lng": 77.5946,
    "formatted": "Bengaluru, India",
    "source": "graphque_memory"
  }
}

Reverse Geocoding

GET/v1/reverse?lat=x&lng=y
Request Cost -1

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 exact physical street addresses and location components from geographic coordinates.

const res = await fetch("https://api.graphque.com/v1/reverse?lat=28.6139&lng=77.2090", {
  headers: { "graphque-api-key": "gq_api_key_here" }
});
Response
{
  "status": "success",
  "data": {
    "address": "Connaught Place, New Delhi, Delhi 110001, India",
    "components": {
      "city": "New Delhi",
      "state": "Delhi",
      "postcode": "110001",
      "country": "India"
    }
  }
}