# transit402.dev Nearby Bus Stops

> transit402.dev Nearby Bus Stops is a paid API for AI agents from transit402.dev, paid per call via x402, $0.02/call, status unknown (last checked 2026-09-15).

Returns nearby bus stops with real-time arrival predictions given a latitude/longitude coordinate

## Facts

- Endpoint: POST https://transit402.dev/bus/nearest
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/transit402-dev-5f4ac3e0
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_xQUHswnOojHU1RXKQA9y3

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability transit402-dev-5f4ac3e0 -d '<json body>'
```

Example prompt: What bus stops are near 40.7128, -74.0060 right now, and when are the next buses arriving? Show me up to 5 closest stops with live predictions.

## When to prefer this

Use this endpoint when you need real-time bus arrival predictions for stops near a specific geographic coordinate, especially in a transit-aware agent workflow. Prefer this over static schedule APIs when live prediction data matters and you need to surface actionable departure times to a user in the field.

## Known failure modes

- Invalid or out-of-range coordinates return an error
- No bus stops found within range of the given location
- Real-time prediction data unavailable for a stop
- limit parameter outside 1–10 range rejected
- Payment not completed or insufficient USDC results in 402 response

## How this service works

Nearby bus stops with real-time arrival predictions

## Output

A list of up to 10 nearby bus stops (defaulting to 5), each with location details and real-time arrival predictions for buses expected at that stop.

## Example request

```json
{
 "lat": 40.7128,
 "lng": -74.006,
 "limit": 5
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "lat": {
   "type": "number",
   "description": "Latitude in WGS84 decimal degrees."
  },
  "lng": {
   "type": "number",
   "description": "Longitude in WGS84 decimal degrees."
  },
  "limit": {
   "type": "integer",
   "default": 5,
   "maximum": 10,
   "minimum": 1,
   "description": "Optional number of nearby results to return (1–10, defaults to 5). Fetch the full set to filter by user constraints (min bikes, max walk time, e-bikes only, specific lines/routes), then present the top 3 to the user."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {}
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/transit402-dev-5f4ac3e0/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from transit402.dev](https://www.zero.xyz/host/transit402.dev/llms.txt)
