Search and places
Businesses and places near a point: fuel stations, POS agents and ATMs that pay, pharmacies, motor parks, restaurants, with hours, phone numbers and ratings where people gave them.
On this page
Base address: https://nways.ng/maps/v1. Three ways in: places near a point by category or name, places by text, and one place’s details. Reference
Places near a point
GET /maps/v1/places/nearby
| Parameter | Description |
|---|---|
lat, lng | Required. The point to search around. |
category | One of the categories. With a category, results are ranked by nearness and prominence, 40 a page; ATM and cash lists put machines that pay first. |
q | A name to match, up to 60 characters: Total, Medplus. Give a category, a name or both. |
radius | In metres, 200 to 50,000. |
limit, pageToken | Up to 40 a page; the answer’s nextPageToken gets the next page. |
fields | The fields you want: they set the price tier. |
curl "https://nways.ng/maps/v1/places/nearby?lat=6.6018&lng=3.3515&category=pharmacy&radius=1500" \
-H "X-NWays-Api-Key: YOUR_API_KEY"import { createClient } from '@nways/maps'
const nways = createClient({ key: process.env.NWAYS_API_KEY })
const { places } = await nways.placesNearby({ lat: 6.6018, lng: 3.3515 }, { category: 'petrol', radius: 3000 })
for (const p of places) console.log(p.name, Math.round(p.distanceM), 'm'){
"places": [
{
"id": "ov:860b85b1-e8dd-488d-bb83-e8e65a6965e1",
"name": "Access Bank",
"category": "bank",
"location": { "type": "Point", "coordinates": [3.491648, 6.438141] },
"formattedAddress": "999C Danmole Street, Victoria Island",
"plusCode": "6FR5CFQR+7M2",
"country": "NG",
"distanceM": 2403,
"businessStatus": "OPERATIONAL",
"attribution": "© OpenStreetMap contributors, N-Ways"
}
],
"nextPageToken": "…",
"attribution": "© OpenStreetMap contributors, N-Ways"
}Places by text
GET /maps/v1/places/search?q=… for “Zenith Bank Ikeja” or “pharmacy near Yaba”: it understands a category in a place. Add near (lat,lng) and radius to search around a point, country to stay in one country, and limit (up to 20).
curl "https://nways.ng/maps/v1/places/search?q=pharmacy+Yaba&limit=5" -H "X-NWays-Api-Key: YOUR_API_KEY"Fields and price tiers
Ask only for what you show: the fields set what a call costs. Pricing
| Tier | Fields |
|---|---|
| Basic (the default) | id, name, category, location, formattedAddress, plusCode, country, distanceM, businessStatus, attribution |
| Contact | Basic, plus phone, email, website, openingHours (with where the hours come from and how many people confirmed them) |
| Atmosphere | Contact, plus rating, amenities and details (fuel prices, whether a POS has cash, a hotel’s amenities…) |
One field from a tier puts the call in that tier: fields=name,location,phone is a Contact call.
Categories
| Group | Categories |
|---|---|
| On the road | petrol, charging, mechanic, vulcanizer, carwash, parking, motorpark, police |
| Money | bank, atm (banks and ATMs, paying ones first), pos, cash (ATMs and POS agents, paying first) |
| Food and drink | food, fastfood, cafe, bar |
| Health | hospital, pharmacy |
| Shopping | supermarket, shop, market, phones, salon |
| Places | hotel, church, mosque, school, university, office, government, attraction, estate, residential |
Place details
GET /maps/v1/places/{id}?fields=…: one place, by the id from a list or a geocoding result’s placeId. fields is required here (or * for everything, an Atmosphere call).
curl "https://nways.ng/maps/v1/places/osm:n2987189855?fields=name,location,phone,openingHours" \
-H "X-NWays-Api-Key: YOUR_API_KEY"Where the data comes from
OpenStreetMap, the Overture Maps Foundation’s places, and what N-Ways users add, confirm and correct. If you show places from N-Ways, show the attribution and the credits on Attribution and terms.
The earlier address
https://nways.ng/v1/places keeps working for partners who started with it for at least 12 months, but its answer follows the N-Ways app. Move to /maps/v1/places/….