Enterprise
Operator feeds: live traffic and transit delays
oslew routes on free-flow speeds unless an operator applies a feed. On the Enterprise plan, the operator product pushes live traffic into the driving network — as TomTom Flow Segment Data, HERE Traffic v7 flow JSON or oslew’s own edge list — and GTFS-Realtime delays into departures and journeys. Feeds are pushed rather than fetched, held only in the memory of the pod that received them, and every route answer says which weights produced it.
Last reviewed
Every driving time oslew gives is, by default, a free-flow time: the road’s posted limit or the typical speed for its class, with nothing for signals, queues or the hour of the day. That is a sound default for planning and a poor one for a dispatcher at rush hour, and free-flow versus traffic-aware routing explains where the difference matters. Operator feeds are how the difference is closed, for an organisation that holds current traffic or transit data and wants the router to use it.
Two routes that write
Almost everything in the API reads. Two routes change what the service answers:
POST /v1/trafficreweights the driving network from a traffic feed, so routes, matrices and isochrones asked for on live weights reflect the roads as they are now.POST /v1/transit_rtapplies a GTFS-Realtime feed, so transit departures and journeys carry delays and skipped stops.
Each has a status call (GET /v1/traffic, GET /v1/transit_rt) and a DELETE that drops the feed. All of them belong to the operator product, which exists only on the Enterprise plan and has its own bucket of 10 requests a second sustained, burst 20. Any other key is refused with a 403. It is a separate product because applying a feed is an operator’s decision about what every caller on that pod will be told, not something a subscriber switches on for themselves.
Traffic: three ways to send it
| Format | Body | What is read |
|---|---|---|
| none (the default) | oslew’s edge list | Each entry names a road by a point on it, at, and optionally a second point, to, covering every edge between them in both directions; it sets either speed_kmh or a factor on the release’s time, and the speed wins when both are given. |
tomtom |
TomTom Traffic API Flow Segment Data, as returned | The segment’s current speed and its coordinates; each consecutive pair of points becomes one entry. |
here |
HERE Traffic API v7 flow, as returned | Each result’s current speed and the points of its shape; a result with no speed, which is a closed road, becomes a heavy slowdown rather than a removal. |
A few rules decide how a feed behaves in practice. Each POST replaces the whole live state: roads it does not mention go back to the release’s times, so a feed is always the complete picture, sent in one body of at most 2 MiB. A HERE response covers many segments and applies in one request; a TomTom Flow Segment Data response covers one, so several have to be merged into one edge list before they are sent. One entry that cannot be placed — a point with no road nearby, a stretch the network cannot join — refuses the whole feed with a 400, rather than applying the rest silently.
Live weights belong to the driving network only. Walking, cycling and rail keep their own weights; snapping and map matching always use the release’s speeds; and route optimisation takes live leg times for its visit order while the legs’ distances and paths stay on the release. A feed takes effect at once: until the fast search structure for the new weights is rebuilt in the background, live routes are found by a slower plain search, which barely matters for one route and matters a great deal for a large live matrix.
Transit: GTFS-Realtime delays
The transit body is a GTFS-Realtime FeedMessage in protobuf, as a realtime feed publishes it. Trip updates are matched to the loaded static timetable by trip_id, and each stop update to its call by stop sequence or stop id. The delay at a stop is its departure delay, else its arrival delay, else the difference between its absolute and scheduled times, and it carries forward to later stops until the next update changes it — the propagation GTFS-Realtime defines. A stop marked SKIPPED is removed from that trip. Vehicle positions, alerts and trip-level schedule changes are not applied.
The timetable whose trip ids the message matches most is the one that takes it, and each POST replaces that timetable’s delays entirely. A message that matches no loaded timetable is refused, and a deployment with no transit layer says so. A departures answer carries the realtime feed’s own timestamp when delays are in force, and null when they are not.
Where feed state lives
Live traffic and GTFS-Realtime feeds are pushed to a pod over HTTP by an operator and held only in that pod’s memory; the server does not fetch them. Nothing copies a feed from one pod to another, and nothing writes it to disk. Behind a load balancer, that has consequences an operator has to design for: a POST changes whichever pod the balancer chose; the next route request may reach a pod that never saw it; a status call reports only the pod that answered it; and a DELETE clears one pod. Two status calls in a row can disagree.
The working pattern follows from that. Keep the source of truth in your own system and re-send the current feed on a schedule: every POST is a full snapshot, so sending it again is harmless and restores a pod that restarted, and traffic data goes stale within minutes anyway. Check the answers that matter rather than the status. For a buyer’s privacy review the same property is reassuring — feed contents are never stored, as the data residency page records.
Every answer says which weights it used
A route answered on a feed reports engine as live/dijkstra while the new weights’ search structure is still being built and live/hierarchy once it is ready. A route answered on the release’s free-flow speeds reports base/hierarchy — and so does a request that asked for live weights on a pod with no feed, because that request is answered rather than refused. An application that labels a time as including traffic should check engine before it does.
curl -s -H "Authorization: Bearer $OSLEW_KEY" \
"https://api.oslew.com/v1/route?from=19.4406,-99.2047&to=19.4326,-99.1332&traffic=live&geometry=false" \
| jq '{duration_s, engine}'Not an agent’s tool
Every MCP tool is read-only; the write paths, POST /v1/traffic and POST /v1/transit_rt, are operator HTTP routes and not tools. An agent connected over MCP can ask for a live-weighted route where a feed exists, but it cannot apply one, clear one or be talked into either, because no tool does it.
Limits stated plainly
- Feed state is per pod and in memory. There is no replication across a fleet and no persistence across a restart.
- Only the roads a feed names change. Live answers are exactly as current and as complete as the feed the operator sends.
- Only travel times change. The network, its access rules and its distances are the release’s, so a road closed by an incident is slow in a feed, not missing.
- oslew supplies no traffic or realtime data and fetches none: the feed, and whatever terms it was obtained under, are the operator’s.
- There is no model of typical traffic by time of day. Without a feed, a driving time is free-flow.
- The operator product is part of an Enterprise agreement; see procurement.
Bottom line
If you hold current traffic or transit data, the Enterprise operator product lets the router answer with it, in the formats TomTom and HERE already return or in a simple edge list of your own. Plan around the one property that shapes everything else — a feed lives in one pod’s memory — by re-sending it on a schedule and trusting the engine field over any status call.
Questions
Does oslew routing account for traffic?
Only where an operator on the Enterprise plan has applied a traffic feed. Otherwise every driving time is a free-flow time, from the road’s posted limit or its class speed, with nothing added for congestion or time of day. Treat those times as the best case in a city at rush hour.
Which traffic formats can an operator send?
Three. The default is oslew’s own edge list, where each entry names a road by a point on it, or a stretch between two points, with a speed or a factor on the release’s time. With a format parameter, the body can instead be a TomTom Flow Segment Data response or a HERE Traffic v7 flow response, exactly as that API returned it.
What happens to a feed when a server restarts?
It is gone. A feed lives only in the memory of the pod that received it, and nothing copies it to other pods or writes it down. After a restart that pod answers from the release again, which is why an operator should re-send the current feed on a schedule rather than once.
How can I tell whether a route used the operator’s feed?
Read the engine field on the answer. It starts with live when a feed’s weights answered and with base when the release’s free-flow speeds did. A request that asks for live weights on a pod with no feed is not refused; it is answered on base weights, and the engine field is the only sign.
Can an AI agent apply a traffic feed through MCP?
No. Every MCP tool is read-only, and the feed routes are an operator’s HTTP routes rather than tools, on purpose: applying a feed changes what the service answers for everyone on that pod, and nothing an agent can call is allowed to do that.