Places
Businesses and places near a point, by text, and one place’s details.
Send your key as key=YOUR_API_KEY on the address, or in the X-NWays-Api-Key header. API keys
Base address: https://nways.ng/maps/v1
Businesses and places near a point
GET https://nways.ng/maps/v1/places/nearby
By category (ranked by nearness and prominence, 40 a page; ATM and cash lists put paying machines first) and/or name. fields= sets the SKU: basic fields (default) search; any contact field places_contact; any atmosphere field places_atmosphere. Reasons: LAT_LNG_REQUIRED, CATEGORY_INVALID, CATEGORY_OR_QUERY_REQUIRED, RADIUS_INVALID, PAGE_TOKEN_INVALID, FIELDS_INVALID.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
lat | query | number | Required. |
lng | query | number | Required. |
category | query | string | One of: petrol, charging, food, fastfood, cafe, bar, pos, bank, atm, cash, mechanic, vulcanizer, carwash, police, hospital, pharmacy, hotel, supermarket, shop, market, motorpark, parking, church, mosque, phones, salon, school, office, attraction, estate, residential, government, university. |
q | query | string | Up to 60 characters. |
radius | query | number | ≥ 200, ≤ 50000. |
limit | query | integer | Default: 40. ≥ 1, ≤ 40. |
pageToken | query | string | |
fields | query | string | Basic (SKU search): id, name, category, location, formattedAddress, plusCode, country, distanceM, businessStatus, attribution. Contact (places_contact): phone, email, website, openingHours. Atmosphere (places_atmosphere): rating, amenities, details. Default: basic. |
curl "https://nways.ng/maps/v1/places/nearby?lat=6.4474&lng=3.472" \
-H "X-NWays-Api-Key: YOUR_API_KEY"const res = await fetch('https://nways.ng/maps/v1/places/nearby?lat=6.4474&lng=3.472', {
headers: { 'X-NWays-Api-Key': process.env.NWAYS_API_KEY },
})
const data = await res.json()import os
import requests
res = requests.get(
"https://nways.ng/maps/v1/places/nearby?lat=6.4474&lng=3.472",
headers={"X-NWays-Api-Key": os.environ["NWAYS_API_KEY"]},
timeout=10,
)
data = res.json()Response
Places
| Field | Type | Description |
|---|---|---|
places | Place[] | Required. |
places[].id | string | Required. |
places[].name | string | |
places[].category | string | |
places[].location | Point | |
places[].location.type | string | Required. |
places[].location.coordinates | number[] | Required. [lng, lat] At least 2 items, at most 2 items. |
places[].formattedAddress | string | |
places[].plusCode | string | |
places[].country | string | |
places[].distanceM | number | |
places[].businessStatus | string | One of: OPERATIONAL, UNVERIFIED, REPORTED_CLOSED. |
places[].attribution | string | |
places[].phone | string | Contact tier |
places[].email | string | Contact tier |
places[].website | string | Contact tier |
places[].openingHours | object | Contact tier |
places[].openingHours.text | string | Required. OpenStreetMap opening_hours syntax |
places[].openingHours.source | string | Required. One of: listed, owner, brand, usual. |
places[].openingHours.confirmed | integer | |
places[].rating | object | Atmosphere tier |
places[].rating.score | number | 1–5, smoothed |
places[].rating.count | integer | |
places[].rating.percentUp | integer | |
places[].rating.reviewCount | integer | |
places[].amenities | object | Atmosphere tier: what it offers, as OpenStreetMap tags (payment:*, wheelchair, delivery…). |
places[].details | object | Atmosphere tier: per-industry details. |
nextPageToken | string | |
attribution | string | Required. |
{
"places": [
{
"id": "osm:n2987189855",
"name": "Shoprite",
"category": "supermarket",
"location": {
"type": "string",
"coordinates": [
0
]
},
"formattedAddress": "string",
"plusCode": "string",
"country": "string",
"distanceM": 0,
"businessStatus": "OPERATIONAL",
"attribution": "string",
"phone": "string",
"email": "string",
"website": "string",
"openingHours": {
"text": "Mo-Su 09:00-21:00",
"source": "listed",
"confirmed": 0
},
"rating": {
"score": 0,
"count": 0,
"percentUp": 0,
"reviewCount": 0
},
"amenities": {},
"details": {}
}
],
"nextPageToken": "string",
"attribution": "string"
}Errors
defaultError
Businesses and places by text
GET https://nways.ng/maps/v1/places/search
"Zenith Bank Ikeja", "pharmacy near Yaba". SKUs as /places/nearby. Reasons: as /geocode, and RADIUS_INVALID, FIELDS_INVALID.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
q | query | string | Required. |
near | query | string | lat,lng: rank and pick results near it. |
radius | query | number | With near. ≥ 200, ≤ 50000. |
country | query | string | Comma list of NG, GH, BJ, TG, GA, CI, LR, GN, SL, GW, SN, CM, BF, CV, GM. |
limit | query | integer | Default: 10. ≥ 1, ≤ 20. |
lang | query | string | One of: en, fr, pt. Default: en. |
fields | query | string | Basic (SKU search): id, name, category, location, formattedAddress, plusCode, country, distanceM, businessStatus, attribution. Contact (places_contact): phone, email, website, openingHours. Atmosphere (places_atmosphere): rating, amenities, details. Default: basic. |
curl "https://nways.ng/maps/v1/places/search?q=pharmacy+Yaba" \
-H "X-NWays-Api-Key: YOUR_API_KEY"const res = await fetch('https://nways.ng/maps/v1/places/search?q=pharmacy+Yaba', {
headers: { 'X-NWays-Api-Key': process.env.NWAYS_API_KEY },
})
const data = await res.json()import os
import requests
res = requests.get(
"https://nways.ng/maps/v1/places/search?q=pharmacy+Yaba",
headers={"X-NWays-Api-Key": os.environ["NWAYS_API_KEY"]},
timeout=10,
)
data = res.json()Response
Places
| Field | Type | Description |
|---|---|---|
places | Place[] | Required. |
places[].id | string | Required. |
places[].name | string | |
places[].category | string | |
places[].location | Point | |
places[].location.type | string | Required. |
places[].location.coordinates | number[] | Required. [lng, lat] At least 2 items, at most 2 items. |
places[].formattedAddress | string | |
places[].plusCode | string | |
places[].country | string | |
places[].distanceM | number | |
places[].businessStatus | string | One of: OPERATIONAL, UNVERIFIED, REPORTED_CLOSED. |
places[].attribution | string | |
places[].phone | string | Contact tier |
places[].email | string | Contact tier |
places[].website | string | Contact tier |
places[].openingHours | object | Contact tier |
places[].openingHours.text | string | Required. OpenStreetMap opening_hours syntax |
places[].openingHours.source | string | Required. One of: listed, owner, brand, usual. |
places[].openingHours.confirmed | integer | |
places[].rating | object | Atmosphere tier |
places[].rating.score | number | 1–5, smoothed |
places[].rating.count | integer | |
places[].rating.percentUp | integer | |
places[].rating.reviewCount | integer | |
places[].amenities | object | Atmosphere tier: what it offers, as OpenStreetMap tags (payment:*, wheelchair, delivery…). |
places[].details | object | Atmosphere tier: per-industry details. |
nextPageToken | string | |
attribution | string | Required. |
{
"places": [
{
"id": "osm:n2987189855",
"name": "Shoprite",
"category": "supermarket",
"location": {
"type": "string",
"coordinates": [
0
]
},
"formattedAddress": "string",
"plusCode": "string",
"country": "string",
"distanceM": 0,
"businessStatus": "OPERATIONAL",
"attribution": "string",
"phone": "string",
"email": "string",
"website": "string",
"openingHours": {
"text": "Mo-Su 09:00-21:00",
"source": "listed",
"confirmed": 0
},
"rating": {
"score": 0,
"count": 0,
"percentUp": 0,
"reviewCount": 0
},
"amenities": {},
"details": {}
}
],
"nextPageToken": "string",
"attribution": "string"
}Errors
defaultError
One place's details
GET https://nways.ng/maps/v1/places/{id}
fields is required: the fields you need (they set the SKU), or * for all (places_atmosphere). Reasons: PLACE_ID_INVALID, FIELDS_REQUIRED, FIELDS_INVALID, PLACE_NOT_FOUND.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id | path | string | Required. |
fields | query | string | Required. |
curl "https://nways.ng/maps/v1/places/osm%3An2987189855?fields=name%2Clocation%2Cphone%2CopeningHours" \
-H "X-NWays-Api-Key: YOUR_API_KEY"const res = await fetch('https://nways.ng/maps/v1/places/osm%3An2987189855?fields=name%2Clocation%2Cphone%2CopeningHours', {
headers: { 'X-NWays-Api-Key': process.env.NWAYS_API_KEY },
})
const data = await res.json()import os
import requests
res = requests.get(
"https://nways.ng/maps/v1/places/osm%3An2987189855?fields=name%2Clocation%2Cphone%2CopeningHours",
headers={"X-NWays-Api-Key": os.environ["NWAYS_API_KEY"]},
timeout=10,
)
data = res.json()Response
The place
| Field | Type | Description |
|---|---|---|
id | string | Required. |
name | string | |
category | string | |
location | Point | |
location.type | string | Required. |
location.coordinates | number[] | Required. [lng, lat] At least 2 items, at most 2 items. |
formattedAddress | string | |
plusCode | string | |
country | string | |
distanceM | number | |
businessStatus | string | One of: OPERATIONAL, UNVERIFIED, REPORTED_CLOSED. |
attribution | string | |
phone | string | Contact tier |
email | string | Contact tier |
website | string | Contact tier |
openingHours | object | Contact tier |
openingHours.text | string | Required. OpenStreetMap opening_hours syntax |
openingHours.source | string | Required. One of: listed, owner, brand, usual. |
openingHours.confirmed | integer | |
rating | object | Atmosphere tier |
rating.score | number | 1–5, smoothed |
rating.count | integer | |
rating.percentUp | integer | |
rating.reviewCount | integer | |
amenities | object | Atmosphere tier: what it offers, as OpenStreetMap tags (payment:*, wheelchair, delivery…). |
details | object | Atmosphere tier: per-industry details. |
{
"id": "osm:n2987189855",
"name": "Shoprite",
"category": "supermarket",
"location": {
"type": "string",
"coordinates": [
0
]
},
"formattedAddress": "string",
"plusCode": "string",
"country": "string",
"distanceM": 0,
"businessStatus": "OPERATIONAL",
"attribution": "string",
"phone": "string",
"email": "string",
"website": "string",
"openingHours": {
"text": "Mo-Su 09:00-21:00",
"source": "listed",
"confirmed": 0
},
"rating": {
"score": 0,
"count": 0,
"percentUp": 0,
"reviewCount": 0
},
"amenities": {},
"details": {}
}Errors
defaultError