N-Ways
Developer docsSearch and places

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

ParameterDescription
lat, lngRequired. The point to search around.
categoryOne 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.
qA name to match, up to 60 characters: Total, Medplus. Give a category, a name or both.
radiusIn metres, 200 to 50,000.
limit, pageTokenUp to 40 a page; the answer’s nextPageToken gets the next page.
fieldsThe fields you want: they set the price tier.
cURL
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"
JavaScript
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')
200 OK
{
  "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"
}

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
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

TierFields
Basic (the default)id, name, category, location, formattedAddress, plusCode, country, distanceM, businessStatus, attribution
ContactBasic, plus phone, email, website, openingHours (with where the hours come from and how many people confirmed them)
AtmosphereContact, 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

GroupCategories
On the roadpetrol, charging, mechanic, vulcanizer, carwash, parking, motorpark, police
Moneybank, atm (banks and ATMs, paying ones first), pos, cash (ATMs and POS agents, paying first)
Food and drinkfood, fastfood, cafe, bar
Healthhospital, pharmacy
Shoppingsupermarket, shop, market, phones, salon
Placeshotel, 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
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/….