Build location features on one stable map contract.
JaserMap provides normalized search, reverse geocoding, vector tiles, raster tiles, and a Map.ir-compatible facade for existing company services. This documentation is for consumers of JaserMap — not for deploying JaserMap itself.
Your first authenticated request
Use the project key assigned to your service. Send it in the x-api-key header. Keep long-lived keys on your backend; do not hard-code them into public browser JavaScript.
curl --get 'https://map.jaserlink.com/api/v1/search' \
-H 'x-api-key: YOUR_PROJECT_KEY' \
--data-urlencode 'q=Azadi Square Tehran' \
--data 'lang=en' \
--data 'lat=35.6997' \
--data 'lon=51.3375' \
--data 'limit=5'
{
"items": [
{
"name": "Azadi Square",
"display_address": "…",
"lat": 35.6997,
"lon": 51.3375,
"type": "…",
"city": "Tehran",
"state": "Tehran",
"country": "Iran"
}
]
}
For autocomplete and forward search, send the user's current GPS location or current map center as lat and lon. Proximity bias materially improves relevance for incomplete place names.
Project-scoped API keys
Header
Protected endpoints require x-api-key: <project key>. Missing or invalid keys return 401.
Keep it server-side
Use backend-to-backend calls or your own service proxy. Do not embed long-lived keys in public web bundles.
Independent consumers
Use a dedicated key per service where practical, so access can be rotated or revoked without affecting other integrations.
x-api-key→map.jaserlink.com→authenticated API / tilesNative HTTP API
The native API is the preferred contract for new integrations. It hides Photon and tile-server implementation details behind JaserMap.
Returns Gateway health and its current Photon dependency state. Use this for diagnostics, not as a substitute for your own request-level error handling.
{
"status": "ok",
"dependencies": { "photon": { "ok": true } }
}
Searches indexed OSM data and returns normalized places. Supplying both lat and lon enables proximity bias.
qstringYesSearch text.langfa | en | arNoResponse language preference. Default: fa.latnumberNo*Latitude for proximity bias. Must be supplied together with lon.lonnumberNo*Longitude for proximity bias. Must be supplied together with lat.limitintegerNoClamped to 1–50. Default: 10.Returns the best nearby normalized feature for a coordinate. JaserMap asks the geocoder for multiple nearby candidates and applies a stable preference toward house/POI, street, locality, then city-level results.
lat-90…90YesWGS84 latitude.lon-180…180YesWGS84 longitude.langfa | en | arNoResponse language preference. Default: fa.Place
idProvider-derived stable-ish identifier when available.nameBest short display name.display_addressHuman-readable normalized address.compact_addressShorter address when available.lat / lonWGS84 decimal coordinates.typeUnderlying feature classification.house_numberHouse number when present in source data.streetRoad or street label.neighborhood / districtLocal administrative context when available.city / county / stateAdministrative hierarchy when available.countryCountry label from source data.postcodePostal code when available in OSM data.Vector and raster delivery
Native vector tiles
Use the iran TileJSON source for MapLibre or another vector-tile client.
GET /tiles/iran
GET /tiles/iran/{z}/{x}/{y}
- Best for interactive styling and high-DPI rendering.
- Data includes localized names where OSM provides them.
- Do not put a long-lived API key directly in a public browser bundle; proxy through your service when needed.
Native raster XYZ
Use this endpoint with Leaflet/OpenLayers integrations that expect PNG XYZ tiles.
GET /tiles/raster/{z}/{x}/{y}.png
- Rendered from the JaserMap/OpenMapTiles data stack.
- Responses are cache-friendly.
- Use attribution: © OpenMapTiles © OpenStreetMap contributors.
Normal API parameters use lat, lon. GeoJSON coordinate arrays use [longitude, latitude]. XYZ tiles use standard Web Mercator slippy-map coordinates.
Map.ir migration surface
Existing services can migrate incrementally. The compatibility facade intentionally mirrors only the Map.ir shapes that current company integrations need. It is not a claim of complete Map.ir API parity.
x-api-key, replace the upstream URL and key.Used by the current Food delivery-map integration. Required Food fields are frozen: address, postal_address, address_compact, city, province, and neighborhood.
Accepts {"text":"…","location":{"type":"Point","coordinates":[lon,lat]}}. The response uses odata.count and value. No current Food flow depends on this contract, so it should not be treated as frozen yet.
Currently handled by the same compatibility search implementation as /search. Treat it as provisional until a real consumer contract is inventoried and frozen.
This path exists so current Leaflet-based Food code can keep its existing URL template and switch only hostname + API key. The rendered visual style is JaserMap/OpenMapTiles, not Map.ir's proprietary cartography.
Call production endpoints from this page
The lab sends same-origin requests directly to map.jaserlink.com. Your API key remains only in this page's input field and is not written to localStorage or cookies. It will still be visible in your browser's own Network panel, as expected for any request header.
Select a lab and run a request.
Structured results and visual previews will appear here.
{
"message": "Run a live request to inspect the response."
}
Patterns for company services
Laravel / server-side HTTP
Keep the project key in your service environment and call JaserMap from the backend.
- Set short connection/read timeouts appropriate to your request path.
- Retry only transient failures.
- Pass user/map coordinates to search for better relevance.
$response = Http::withHeaders([
'x-api-key' => config('services.jasermap.key'),
])->timeout(8)->get('https://map.jaserlink.com/api/v1/search', [
'q' => 'Azadi Square Tehran',
'lang' => 'en',
'lat' => 35.6997,
'lon' => 51.3375,
'limit' => 5,
]);
$places = $response->throw()->json('items');Python / requests
Use the native API contract for new backend integrations.
import requests
response = requests.get(
"https://map.jaserlink.com/api/v1/reverse",
headers={"x-api-key": JASERMAP_API_KEY},
params={"lat": 35.6997, "lon": 51.3375, "lang": "en"},
timeout=8,
)
response.raise_for_status()
place = response.json()Leaflet / raster consumer
For a public browser application, do not expose the long-lived JaserMap project key. Proxy the tile route through your own backend, then point Leaflet at that same-origin route.
const map = L.map('map').setView([35.6997, 51.3375], 13);
L.tileLayer('/map/tiles/{z}/{x}/{y}.png', {
maxZoom: 22,
attribution: '© OpenMapTiles © OpenStreetMap contributors',
}).addTo(map);
// Your backend route calls:
// GET https://map.jaserlink.com/tiles/raster/{z}/{x}/{y}.png
// with x-api-key server-side.Food — drop-in Map.ir migration
The current Food delivery map can keep its Leaflet code and server-side proxy/cache layer. Change the key, two upstream URLs, and attribution.
FOOD_DELIVERY_MAP_PROVIDER=mapir
FOOD_DELIVERY_MAP_TILE_URL=/map/tiles/{z}/{x}/{y}.png
FOOD_DELIVERY_MAP_ATTRIBUTION="© OpenMapTiles © OpenStreetMap contributors"
FOOD_DELIVERY_MAPIR_API_KEY=<food-specific-jasermap-key>
FOOD_DELIVERY_MAPIR_TILE_URL=https://map.jaserlink.com/shiveh/xyz/1.0.0/Shiveh:Shiveh@EPSG:3857@png/{z}/{x}/{y}.png
FOOD_DELIVERY_MAPIR_REVERSE_URL=https://map.jaserlink.com/reverse/Design consumers for failure
{"error":"invalid_lat_lon"}{"error":"invalid_api_key"}{"error":"not_found"}Timeout
Set a finite client timeout. Existing Food uses 8 seconds.
Retry selectively
Retry transient network/5xx errors with a small bounded count. Avoid retry storms.
Cache responsibly
Raster tiles are highly cacheable. Reverse/search caching should account for coordinates and language.
Fallback UX
Location pickers should keep selected coordinates even when address lookup temporarily fails.
What consumers should know
Iran-only data scope
The current production data artifact covers Iran. Do not assume equivalent coverage outside Iran.
Language is data-dependent
The platform supports fa, en, and ar, but a particular OSM feature may not have every localized name. Fallback labels can therefore occur.
Address wording can differ
JaserMap reverse geocoding is normalized from OSM/Photon data. Human-readable address text is not guaranteed to be byte-for-byte identical to Map.ir.
Compatibility is scoped
Food reverse + Shiveh raster behavior is the validated legacy subset. Compatibility search remains provisional.
Tile style is JaserMap
The compatibility raster URL shape does not reproduce Map.ir's proprietary visual style; it serves JaserMap's own rendered map.
No routing/traffic contract
The current service provides mapping, tiles, search, autocomplete and reverse geocoding. Routing, matrix, navigation and live traffic are not part of this contract.