Features
Instead
When a place's wait is long, Waity offers nearby places of the same kind with a shorter one, and says how much shorter and how much farther.
What it is
The answer for one place, GET /v1/places/{id} or the get_wait tool, carries instead: up to three alternatives, best first, each in the same shape as any place. An agent can say “the bridge is 55 min, Ysleta is 7” without a second search.
Ask for alternatives
instead is in the full view: send view=full to REST, or "view": "full" to get_wait, which defaults to minimal. Both views carry links.alternatives, a list call for the same places.
curl "https://api.waity.ai/v1/places/pl_6e3znhb7h9?view=full" \
-H "X-Api-Key: $WAITY_API_KEY"
How it chooses
- The same kind of place: the same category within 25 km, then 40, then 60. Airport lanes are compared with other lanes of the same airport; a border lane also with the same lane type at nearby ports.
- Only usable live waits: a place whose
now.usableis false, or that closes within the hour, is left out. - Shorter, never longer: an alternative's wait is shorter than the place asked about, or as short and nearer.
- Worth the drive: the minutes saved must be more than the extra drive, from a straight-line estimate. Alternatives are ranked by drive plus wait; the drive estimate is never returned.
- After an ER's alternatives, up to two urgent cares may follow. They never come alone, and their wait is never compared with the ER's.
- A closed place gets alternatives that are open now with a live wait. With
date, each alternative carries its quietest hour that day inbest_on_day.
Compared with the place asked about
Each alternative carries vs_requested:
wait_diff_min: the wait at the place asked about minus this one. Positive means this one is shorter; null when the two can't be compared.extra_km: how much farther this one is, in straight-line km.note: whywait_diff_minis null, or what to know about this place, such as a freestanding ER. Repeat it.
One entry of instead
{
"place": {
"id": "pl_nvk0wkb3ps",
"name": "Ysleta Passenger Vehicles, Standard",
"category": "border",
"parent": {
"id": "pl_q4znr9abbj",
"name": "Ysleta-Zaragoza Bridge"
},
"open_now": true,
"opens_at": null,
"closes_at": null,
"timezone": "America/Denver",
"sample": false,
"facility": null,
"audience": "all",
"lane": "standard",
"url": "https://waity.ai/places/ysleta-passenger-vehicles-standard-kb3ps",
"api_url": "https://api.waity.ai/v1/places/pl_nvk0wkb3ps"
},
"summary": "About 7 min to enter the US, estimated by the border agency, updated 2 min ago.",
"now": {
"status": "live",
"usable": true,
What it never does
- Never offers a children-only ER or urgent care to someone at an all-ages place. A children's ER gets other children's ERs first, then hospital ERs, never a freestanding one.
- Never offers a lane that needs more than the one asked about: no SENTRI, NEXUS or Ready Lane for someone in a general or standard lane, no SENTRI or NEXUS for a Ready Lane, and no PreCheck or CLEAR at an airport.
- Never compares minutes measured differently. An ER or urgent care is offered as shorter only when both waits come from the same source; otherwise the minutes aren't compared, and
vs_requested.notesays so. - Never hides what a freestanding ER is:
place.facility: "freestanding_ed"labels it, it comes after hospital ERs, and its note says it has no inpatient beds or surgery, so a serious case is transferred to a hospital. - Never suggests leaving an ER or urgent care because its wait is unknown.
- Never crosses a boundary a person can't: airport terminals not connected after security, or a place reached only through another country.
ER safety
Every ER answer says this in warnings[0] and notes. Read them to the user before any alternative.
When it's empty
When nothing qualifies, instead is an empty list and diagnostics says why: nothing is shorter once the drive is counted, the waits nearby come from a source that measures differently, or no other place nearby is one someone in this line can use.
Related
Reading an answer explains every field of an alternative. The parameters are in REST API and MCP, and every field is in the API reference.