N-Ways
Developer docsTraffic feed and offline packs

Traffic feed and offline packs

Live road speeds for your systems, and map packs your apps download for use without a network.

On this page
Note:

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

Road speeds in a box (product traffic_feed; enterprise)

GET https://nways.ng/maps/v1/fleet/traffic-feed

Aggregated speeds per road and direction from N-Ways' self-learning traffic, only where enough distinct devices contributed: live readings (last 30 minutes) need 2, typical speeds (by day type and 15-minute slot) need 3. Never a trace, a device count or a session. Geometry is the OSM way (GeoJSON [lng, lat]); direction is along (forward) or against (backward) its drawing. level: 0 free, 1 slow, 2 heavy, 3 standstill, against the road's free-flow speed.

Parameters

NameInTypeDescription
bboxquerystringRequired. minLng,minLat,maxLng,maxLat; at most 2° across.
kindquerystringOne of: live, typical. Default: live.
atquerystring (date-time)kind=typical: the time of week (local day type and 15-minute slot); default now.
modequerystringOne of: car, motorcycle. Default: car.
formatquerystringndjson: a FeedInfo line, then one Feature per line (application/x-ndjson). One of: geojson, ndjson. Default: geojson.
cURL
curl "https://nways.ng/maps/v1/fleet/traffic-feed?bbox=3.30%2C6.42%2C3.45%2C6.55" \
  -H "X-NWays-Api-Key: YOUR_API_KEY"
JavaScript
const res = await fetch('https://nways.ng/maps/v1/fleet/traffic-feed?bbox=3.30%2C6.42%2C3.45%2C6.55', {
  headers: { 'X-NWays-Api-Key': process.env.NWAYS_API_KEY },
})
const data = await res.json()
Python
import os
import requests

res = requests.get(
    "https://nways.ng/maps/v1/fleet/traffic-feed?bbox=3.30%2C6.42%2C3.45%2C6.55",
    headers={"X-NWays-Api-Key": os.environ["NWAYS_API_KEY"]},
    timeout=10,
)
data = res.json()

Response

Feed

FieldTypeDescription
typeanyRequired.
propertiesobjectRequired.
properties.kindstringOne of: live, typical.
properties.modestringOne of: car, motorcycle.
properties.bboxnumber[]At least 4 items, at most 4 items.
properties.atstring (date-time)
properties.generatedAtstring (date-time)
properties.minDevicesintegerThe k-anonymity threshold applied (live 2, typical 3).
properties.attributionstring
featuresobject[]Required.
features[].typeanyRequired.
features[].geometryobjectRequired. GeoJSON LineString
features[].propertiesobjectRequired.
features[].properties.wayIdintegerRequired. OpenStreetMap way id.
features[].properties.directionstringRequired. One of: forward, backward.
features[].properties.speedKmhnumberRequired.
features[].properties.freeFlowKmhnumberRequired.
features[].properties.levelintegerRequired. ≥ 0, ≤ 3.
features[].properties.sourcestringRequired. One of: live, typical.
features[].properties.updatedAtstring (date-time)Live only, to the minute.
200 OK
{
  "type": "string",
  "properties": {
    "kind": "live",
    "mode": "car",
    "bbox": [
      0
    ],
    "at": "2026-10-15T09:00:00+01:00",
    "generatedAt": "2026-10-15T09:00:00+01:00",
    "minDevices": 0,
    "attribution": "string"
  },
  "features": [
    {
      "type": "string",
      "geometry": {},
      "properties": {
        "wayId": 0,
        "direction": "forward",
        "speedKmh": 0,
        "freeFlowKmh": 0,
        "level": 0,
        "source": "live",
        "updatedAt": "2026-10-15T09:00:00+01:00"
      }
    }
  ]
}

Errors

  • default Error

Regions offline packs are made for

GET https://nways.ng/maps/v1/fleet/offline/regions

cURL
curl "https://nways.ng/maps/v1/fleet/offline/regions" \
  -H "X-NWays-Api-Key: YOUR_API_KEY"
JavaScript
const res = await fetch('https://nways.ng/maps/v1/fleet/offline/regions', {
  headers: { 'X-NWays-Api-Key': process.env.NWAYS_API_KEY },
})
const data = await res.json()
Python
import os
import requests

res = requests.get(
    "https://nways.ng/maps/v1/fleet/offline/regions",
    headers={"X-NWays-Api-Key": os.environ["NWAYS_API_KEY"]},
    timeout=10,
)
data = res.json()

Response

Regions

FieldTypeDescription
regionsRegion[]Required.
regions[].idstringRequired.
regions[].namestringRequired.
regions[].countrystringRequired.
regions[].bboxnumber[]Required. At least 4 items, at most 4 items.
maxzoomintegerRequired.
customobjectRequired.
custom.maxDegreesnumber
custom.stepnumber
200 OK
{
  "regions": [
    {
      "id": "lagos",
      "name": "string",
      "country": "NG",
      "bbox": [
        0
      ]
    }
  ],
  "maxzoom": 15,
  "custom": {
    "maxDegrees": 0.6,
    "step": 0.05
  }
}

Errors

  • default Error

A region's pack manifest (202 while it's built; ask again after Retry-After)

GET https://nways.ng/maps/v1/fleet/offline/packs/{region}

A pack is the region's map (map.pmtiles, an extract of the archive the Maps SDK draws; open it with MapLibre Native's pmtiles:// support) and its routing graph tiles (routing.tar, Valhalla level 0–2 tiles with the engine's own paths) for on-device routing. Built once per map and graph version; version changes when either does.

Parameters

NameInTypeDescription
regionpathstringRequired. A region id, or custom with bbox.
bboxquerystringregion=custom: minLng,minLat,maxLng,maxLat, snapped outwards to 0.05°, at most 0.6° across.
maxzoomqueryintegerDefault: 15. ≥ 8, ≤ 15.
cURL
curl "https://nways.ng/maps/v1/fleet/offline/packs/lagos" \
  -H "X-NWays-Api-Key: YOUR_API_KEY"
JavaScript
const res = await fetch('https://nways.ng/maps/v1/fleet/offline/packs/lagos', {
  headers: { 'X-NWays-Api-Key': process.env.NWAYS_API_KEY },
})
const data = await res.json()
Python
import os
import requests

res = requests.get(
    "https://nways.ng/maps/v1/fleet/offline/packs/lagos",
    headers={"X-NWays-Api-Key": os.environ["NWAYS_API_KEY"]},
    timeout=10,
)
data = res.json()

Response

Ready

FieldTypeDescription
regionRegionRequired.
region.idstringRequired.
region.namestringRequired.
region.countrystringRequired.
region.bboxnumber[]Required. At least 4 items, at most 4 items.
maxzoomintegerRequired.
versionstringRequired.
statusstringRequired. One of: building, ready.
builtAtstring (date-time)
filesobject[]Required.
files[].namestringRequired. One of: map.pmtiles, routing.tar.
files[].bytesintegerRequired.
files[].sha256stringRequired.
files[].urlstringRequired. Path to download (add your key).
notesstring[]
200 OK
{
  "region": {
    "id": "lagos",
    "name": "string",
    "country": "NG",
    "bbox": [
      0
    ]
  },
  "maxzoom": 0,
  "version": "string",
  "status": "building",
  "builtAt": "2026-10-15T09:00:00+01:00",
  "files": [
    {
      "name": "map.pmtiles",
      "bytes": 0,
      "sha256": "string",
      "url": "string"
    }
  ],
  "notes": [
    "string"
  ]
}

Errors

  • default Error

Download a pack file (Range requests supported; ETag = its hash)

GET https://nways.ng/maps/v1/fleet/offline/packs/{region}/{file}

Parameters

NameInTypeDescription
regionpathstringRequired. A region id, or custom with bbox.
filepathstringRequired. One of: map.pmtiles, routing.tar.
bboxquerystringregion=custom: minLng,minLat,maxLng,maxLat, snapped outwards to 0.05°, at most 0.6° across.
maxzoomqueryintegerDefault: 15. ≥ 8, ≤ 15.
cURL
curl "https://nways.ng/maps/v1/fleet/offline/packs/lagos/map.pmtiles" \
  -H "X-NWays-Api-Key: YOUR_API_KEY"
JavaScript
const res = await fetch('https://nways.ng/maps/v1/fleet/offline/packs/lagos/map.pmtiles', {
  headers: { 'X-NWays-Api-Key': process.env.NWAYS_API_KEY },
})
const data = await res.json()
Python
import os
import requests

res = requests.get(
    "https://nways.ng/maps/v1/fleet/offline/packs/lagos/map.pmtiles",
    headers={"X-NWays-Api-Key": os.environ["NWAYS_API_KEY"]},
    timeout=10,
)
data = res.json()

Response

The file

Errors

  • 409 Error
  • default Error