# transit402.dev Nearby Subway Stations with Real-Time Arrivals

> transit402.dev Nearby Subway Stations with Real-Time Arrivals 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 the nearest subway stations to a given coordinate with live train arrival times

## Facts

- Endpoint: POST https://transit402.dev/subway/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-1080ac8e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap__knFmHs_ZVY_LTmlgMdQI

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-1080ac8e -d '<json body>'
```

Example prompt: What subway stations are near 40.7484, -73.9967 right now — show me the closest 5 with live train arrival times.

## When to prefer this

Use this endpoint when you need real-time subway arrival information anchored to a geographic coordinate — ideal for location-aware transit routing, last-mile navigation, or comparing subway options against bikes and buses from the sibling endpoints on the same provider.

## Known failure modes

- Invalid or out-of-range latitude/longitude returns a 4xx error
- Limit value outside 1–10 range is rejected
- Real-time arrival data may be unavailable for certain stations or during service disruptions
- Payment failure or insufficient funds returns a 402 response
- Network timeout if the upstream transit data feed is slow

## How this service works

Nearby subway stations with real-time train arrivals

## Output

A list of up to 10 nearby subway stations (default 5), each with name, distance from the queried coordinates, available subway lines, and real-time train arrival predictions for each line.

## Example request

```json
{
 "lat": 40.7484,
 "lng": -73.9967,
 "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-1080ac8e/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)
