Quick start
A PlaceRouter request has four parts: where, which fields, the requirements the answer must satisfy, and the rights under which you will use it. You never name a provider.
requestjavascript
const result = await placerouter.query({
location: { ids: ["site_0001", "site_0002"] },
fields: ["traffic.speed", "road.closure", "weather.visibility", "road.surface"],
requirements: { max_age: "15m", min_confidence: "high" },
rights: "commercial"
});
- location
- Identifiers, coordinates, an area, or a resolved PlaceRouter entity. Resolved before routing.
- fields
- The information required. Each field may be routed independently.
- requirements
- Freshness, confidence and other constraints the answer must satisfy.
- rights
- How the information will be used, so only sources whose terms allow it are considered.
Requests
A request describes an information requirement, not a provider call. The same request can be routed differently over time and across regions as source performance changes.
request · one field, strict freshnessjavascript
await placerouter.query({
location: { lat: 25.79, lng: -80.13 },
fields: ["air.pm25"],
requirements: { max_age: "10m", min_confidence: "high" }
});
Responses
Every value comes back with its source, timestamp and confidence. The routing object records which routes were evaluated and selected.
responsejson
{
"values": {
"traffic.speed": { "value": 54, "unit": "km/h", "source": "commercial_traffic", "timestamp": "2026-09-11T14:02:00Z", "confidence": 0.94 }
},
"provenance": {},
"routing": { "evaluated": [], "selected": [], "fallbacks": [] }
}
- values
- One entry per requested field: value, unit, source, timestamp, confidence.
- provenance
- Per-field origin, verification time and corroborating sources.
- routing
- Routes evaluated, selected, and fallen back to.
Routing policies
A policy tells PlaceRouter how to choose between routes: what to optimize for, freshness and cost limits, approved providers, minimum confidence, fallback behavior.
policyjson
{
"optimize_for": "reliability",
"max_age": "15m",
"max_cost_per_request": 0.01,
"providers": "approved_only",
"fallback": true,
"min_confidence": "high"
}
Every dimension the router evaluates can appear in a policy. The interactive version is on the Product page.
Provenance
Provenance is part of the answer. Each field records its source, when the source last verified it, how confident the router is, and which alternatives disagreed.
provenance · one fieldjson
{
"road.closure": {
"value": true,
"source": "state_dot",
"authority": "government",
"verified_at": "2026-09-11T13:58:00Z",
"confidence": 0.98,
"corroborated_by": ["commercial_traffic"],
"conflicts": []
}
}
Errors & fallbacks
A source failing is not an error for the application. PlaceRouter records the fallback and answers from the next route within policy. An error is returned only when no route can.
routing · with fallbackjson
{
"routing": {
"evaluated": ["road_sensors", "weather_network", "historical_model"],
"selected": ["weather_network"],
"fallbacks": [{ "from": "road_sensors", "reason": "no_coverage" }]
}
}
error · no route satisfies requirementsjson
{
"error": "no_route_within_requirements",
"nearest": { "source": "historical_model", "violates": ["max_age"] }
}