Geocoding
Geocoding
Convert free-text addresses to coordinates (forward) and coordinates to addresses (reverse). Geocoding is a normalizing layer over Navvo's geocoding engine.
Scope required: geocode
Coverage
Forward and reverse geocoding work at street level in every market Navvo covers: Jordan, Palestine, the Occupied Palestinian Territory, Lebanon, Syria, Iraq, Saudi Arabia, the United Arab Emirates, Qatar, Kuwait, Bahrain, Oman, Yemen, Egypt, Türkiye, Iran and Cyprus. Country names and codes in every answer follow Navvo's map, so a place reports the same country whichever source answered it, and a country filter matches it the same way. When nothing matches, noDataReason says why: outside_coverage means the country you asked for is not one of these markets.
{ provider, available, data }envelope. When the geocoder is unreachable you still get a 200 with available: false and a status field — always check available before reading data.GET /geocode/search
GET /search, which searches Navvo's
own catalogue.On GET /geocode/reverse the address is what survives: a coordinate that
happens to sit on a business still resolves to its street, neighbourhood and city, with the
business's name and category removed from both the address components and the raw payload.Forward geocoding — resolve a query string to candidate places.
curl -s "https://navvo.io/api/v1/geocode/search?q=Abdali%20Hospital%2C%20Amman&limit=5" \
-H "x-api-key: nvvo_YOUR_KEY"
Query parameters
Abdali Hospital, Amman. Must be non-empty.ar,en (Arabic-first). Used as the accept-language hint. name and display_name follow it for every result, Navvo's own street register included (locale=en: Makkah Al-Mukarramah Street, Amman, Jordan).20, hard-capped at 50.lon. See Nearest first.lat). lng is accepted as an alias.lat/lon is: device for the user's own position, or map (the default) for the centre of the map in view. It is echoed in origin.source.0 to search exactly the text as typed, with no spelling correction. See Spelling.west,south,east,north (longitude first).JO) or a country name (Jordan). Results in other countries are removed. This is the only parameter that removes results by place.Irbid. Results in that city rank first; results elsewhere are still returned, ranked lower.Cities and countries in the query
A city or country written in q is a hint, not a filter. Results in that place rank first, and a good match elsewhere is still returned, ranked lower. Only the country parameter removes results.
- A place named after a city is matched by its name.
Cairo Amman Bankfinds the bank's branches in Jordan, andMecca Mallfinds the mall in Amman. - When a query names more than one city, the last one is the location.
Cairo Amman Bank Irbidranks the branches in and around Irbid first. - City names match in Arabic and English.
King Fahd Road Riyadhfinds the road whether an answer labels the cityRiyadhorالرياض. - A city after an Arabic street name is the address, not part of the name.
شارع الملك فهد الرياضis King Fahd Street in Riyadh.streetandroad(شارعandطريق) are treated as the same word, so the query also finds the road that the map labelsطريق الملك فهد.
Nearest first
Send lat/lon with every search. Results that match equally well are then ordered outward from that point, in rings:
ring | Where |
|---|---|
nearby | within 2 km |
area | within 6 km |
city | in the same city, or within 15 km |
region | within 60 km: the towns around the city |
wider | within 200 km |
country | anywhere else in the same country |
neighbouring | another country, within 1,000 km |
abroad | further away |
Inside the nearer rings, the better match comes first. From wider outward, the order is by distance, so results in other countries start with the closest.
- Match quality comes first. A far exact match ranks above a nearby partial match. Among results that match equally well, the nearest is first. A name that is exactly the query ranks one ring nearer than its distance would put it, so
City Mall7 km away comes beforeCity Star Mall3 km away. - A place named in the query moves the centre. For
King Fahd Road Riyadhthe rings are measured from Riyadh, wherever the user is. When the city word is part of a name (Cairo Amman Bank,Mecca Mall), the user's position stays the centre. - The place the query names comes first.
Irbidreturns the city of Irbid before anything named after it. - Streets and businesses in another country rank after comparable results in the user's country, unless the query names a place there.
- Famous places abroad come first. Among results in other countries, a landmark the open map data links to an encyclopedia entry comes before a namesake in a nearer town.
Tahrir Squaresearched from Amman is Cairo's, then Baghdad's. - A street word on an area's name means the area when no street of that name exists in the user's country.
shar3 abdaliandAbdali Streetin Amman return the Abdali district. A realZahran Streetstill comes before the Zahran district. - The kind of place counts.
Tahrir Squareasks for a square: a bus stop calledAl Tahrirranks lower, and sharing only the word "Square" is no match. For a street query, the street comes before the businesses named after it (Mecca Street Amman), and the street before its numbered side lanes. - A circle and a square are the same kind of place. Amman's circles are mapped under either word, so
دوار باريسfinds Paris Circle (mapped asساحة باريس), andميدانandساحةmatch each other. A circle's point and the roads around it come back as one result: the circle itself. - Results at home come first. When the user's country has a match (
Clock Towerfrom Amman finds Irbid's), it is searched specifically, so it is never crowded out by better-known namesakes abroad. - Areas are measured to their edge. A city or district that contains the centre has
distanceKm: 0.
English names are also searched in Arabic. The street word moves to the front (Mecca Street → شارع مكة), titles and ordinals are translated (Prince Mohammed Street, Seventh Circle → الدوار السابع), and other names are spelled as the region's maps spell them (Tahrir → التحرير).
Each result carries distanceKm and ring, and the response carries origin: the point the rings were measured from, with its city and countryCode. Its source is one of:
source | Meaning |
|---|---|
device | The user's position (originType=device). |
map | The centre of the map in view (lat/lon without originType). |
bbox | The centre of bbox. |
query | The city the query named. |
default | No lat/lon/bbox was sent: Amman, Navvo's home market. |
Send the user's position whenever you have it: without it, the results are ordered from Amman.
Spelling
Address search corrects misspellings against Navvo's own vocabulary: place, street and city names across the region, chain and brand names, and category names. It never learns from what users type.
- Typos:
irbd→irbid,akaba→aqaba,kuwiat→kuwait,shiekh zayed road→sheikh zayed road. - Text typed in the wrong keyboard layout:
hgvdhqisالرياضtyped while the keyboard was set to English. - A word that does not fit its neighbour:
taj mal→taj mall.
A word Navvo's vocabulary knows well is never corrected. The correction is searched alongside the text as typed, and the results decide what comes back:
correctedQuery({ text, reason },reasonisspellingorkeyboard) when the results are for the correction. This happens when the typed text found nothing, found only weak matches, or matched no real place while the correction names one. Show "Showing results for …" with a link that searches the original text withspellcheck=0.didYouMean(plain text) when the results are for the text as typed but the correction matches at least as well. Offer it as a link.- Neither when the typed text matches a name well: it is a real name, however unusual.
Response
The envelope: provider ("navvo"), available (boolean), and data — an array of results, each with the shape below.
{
"provider": "navvo",
"available": true,
"data": [
{
"place_id": 12345678,
"osm_type": "way",
"osm_id": 98765432,
"lat": "31.9637400",
"lon": "35.9221300",
"category": "amenity",
"type": "hospital",
"name": "Abdali Hospital",
"display_name": "Abdali Hospital, Al Abdali, Amman, Jordan",
"address": { "suburb": "Al Abdali", "city": "Amman", "country": "Jordan", "country_code": "jo" },
"boundingbox": ["31.963", "31.964", "35.921", "35.923"]
}
]
}
Each result also carries distanceKm (from origin; 0 when the origin is inside the area) and ring, and notable: true when it is a landmark the open map data links to an encyclopedia entry (see Nearest first). The envelope carries origin, plus correctedQuery or didYouMean when Spelling applies:
{
"query": "irbd",
"correctedQuery": { "text": "irbid", "reason": "spelling" },
"origin": { "lat": 32.554, "lng": 35.849, "source": "query", "city": "Irbid", "countryCode": "JO" },
"data": [
{ "name": "Irbid", "matchLevel": "city", "distanceKm": 0, "ring": "nearby" }
]
}
When the geocoder fails or is not configured:
{ "provider": "navvo", "available": false, "status": 502 }
lat/lon come back as strings. Parse them before using as numbers.Errors
| Status | When |
|---|---|
400 | q missing/blank, or limit/lat/lon not numeric. |
401 / 403 | Missing/invalid key, or key lacks the geocode scope. |
Geocoder failures surface as available: false inside a 200, never as a 5xx.
GET /geocode/autocomplete
Lightweight typeahead — the endpoint to call on every keystroke of a search box. It applies the same Arabic/Arabizi-aware matching as /geocode/search but returns a trimmed, ready-to-render payload (id, label, numeric coordinates). Prefer this over polling /geocode/search for suggestions: smaller responses, numeric lat/lng, and a sensible default limit.
curl -s "https://navvo.io/api/v1/geocode/autocomplete?q=abdali&limit=8" \
-H "x-api-key: $NAVVO_API_KEY"
Query parameters
Same as /geocode/search (q required; optional locale, lat/lon proximity bias, bbox), except limit defaults to 8 and is capped at 15.
Response
{
"provider": "navvo-geocode",
"query": "abdali",
"suggestions": [
{
"id": "131530",
"label": "العبدلي, منطقة زهران, عمان, الأردن",
"name": "العبدلي",
"lat": 31.9593159,
"lng": 35.9187494,
"type": "neighbourhood",
"category": "place"
}
]
}
| Field | Type | Notes |
|---|---|---|
suggestions[].id | string | stable candidate id |
suggestions[].label | string | full display line for the dropdown row |
suggestions[].name | string | short primary name |
suggestions[].lat / lng | number | null | numeric coordinates (unlike /geocode/search, no string parsing needed) |
normalizedQuery | string | present when the query was normalized (Arabic variants / Arabizi) before matching |
GET /geocode/reverse
Reverse geocoding — resolve a coordinate to the nearest address. Always resolves at street/building detail (zoom=18).
Where no mapped street or address is close enough (open country, a road that is not mapped yet), the answer is the area: the nearest named place (district, town or city), its province and its country, from Navvo's register of places across the region. Such an answer has source: "navvo-localities", matchLevel: "city" and distanceKm, the distance from your point to that place. It is never an address, so don't show it as one. Nothing within 60 km (open sea, empty desert) means available: false.
curl -s "https://navvo.io/api/v1/geocode/reverse?lat=31.95&lon=35.91" \
-H "x-api-key: nvvo_YOUR_KEY"
Query parameters
-90 and 90. Outside that range is a 400, not an empty
result — a coordinate off the globe is a malformed request, not a hard query.lng is accepted as an alias — send either. Sending both with
different values is a 400, because there is no defensible way to pick a winner.lon, for callers using the lat/lng convention. Responses echo the longitude under
both names, so a client can never misread which one it got.ar, en, or a preference list like ar,en (the default). Controls the language of display_name and the address parts, same convention as forward geocoding.Response
The envelope data is a single object (the geocoder's raw reverse result):
{
"provider": "navvo",
"available": true,
"data": {
"place_id": 12345678,
"osm_type": "way",
"lat": "31.95",
"lon": "35.91",
"category": "highway",
"type": "residential",
"name": "King Hussein Street",
"display_name": "King Hussein Street, Al Abdali, Amman, Jordan",
"address": { "road": "King Hussein Street", "suburb": "Al Abdali", "city": "Amman", "country": "Jordan", "country_code": "jo" }
}
}
Errors
| Status | When |
|---|---|
400 | lat or lon missing / not numeric. |
401 / 403 | Missing/invalid key, or key lacks the geocode scope. |
POST /geocode/batch
Bulk forward geocoding — resolve many addresses in a single request (CSV imports, dataset enrichment). Returns the top match per query. Up to 50 queries per call; the same Arabic-/Arabizi-aware matching as /geocode/search applies to each.
curl -s -X POST "https://navvo.io/api/v1/geocode/batch" \
-H "x-api-key: $NAVVO_API_KEY" -H "content-type: application/json" \
-d '{ "queries": ["Amman", "Aqaba", "Irbid"], "locale": "ar" }'
| Field | Type | Notes |
|---|---|---|
queries | string | required — addresses/places to geocode (max 50) |
locale | string | optional result language hint |
bbox | string | optional minLng,minLat,maxLng,maxLat to bias results |
{
"provider": "navvo-geocode", "count": 3, "found": 3,
"results": [
{ "query": "Amman", "found": true, "lat": 31.9539, "lng": 35.9106, "displayName": "عمان, الأردن", "type": "city", "category": "place" },
{ "query": "Aqaba", "found": true, "lat": 29.58, "lng": 35.289, "displayName": "العقبة, الأردن", "type": "city", "category": "place" }
]
}
| Field | Type | Notes |
|---|---|---|
count | number | queries processed |
found | number | how many resolved to coordinates |
results[] | array | { query, found, lat, lng, displayName, type, category } — found:false (with null coords) when a query has no match |
Queries run with limited concurrency to respect upstream rate limits; expect a few hundred ms per ~4 addresses.
Errors
| Status | When |
|---|---|
400 | queries[] missing or empty. |
401 / 403 | Missing/invalid key, or key lacks the geocode scope. |
POST /geocode/reverse-batch
Bulk reverse geocoding — turn many coordinates into addresses in one request (the inverse of /geocode/batch). Top match per point; up to 50 points per call.
curl -s -X POST "https://navvo.io/api/v1/geocode/reverse-batch" \
-H "x-api-key: $NAVVO_API_KEY" -H "content-type: application/json" \
-d '{ "points": [ {"lat":31.9539,"lng":35.9106}, {"lat":29.532,"lng":35.006} ] }'
| Field | Type | Notes |
|---|---|---|
points | array | required — { lat, lng } (or lon) objects, max 50 |
locale | string | optional address language — ar, en, or ar,en (default), applied to every point |
{
"provider": "navvo-geocode", "count": 2, "found": 2,
"results": [
{ "lat": 31.9539, "lng": 35.9106, "found": true, "displayName": "الدوار الثالث, منطقة زهران, عمان, الأردن", "type": "…", "address": { } }
]
}
A point with no match (or invalid coordinates) returns found: false.
Errors
| Status | When |
|---|---|
400 | points[] missing or empty. |
401 / 403 | Missing/invalid key, or key lacks the geocode scope. |
GET /geo/addressing/config returns the platform's addressing settings — whether short location codes are enabled (plusCodesEnabled, defaultCodeLength), the share URL base, and national-address integration status — so clients can decide which address formats to render. See Addressing for the full addressing API.Route Optimization
Self-hosted OR-Tools route optimization — VRP/VRPTW with capacity, time windows, pickup-delivery and multi-depot, plus bin-packing, driver rostering, live re-optimization, and async optimization-as-a-job.
Quests (crowd data)
Gamified, crowd-sourced data improvement — surface nearby data-gap micro-tasks, collect answers into the moderation queue, and award contributor points.