# Japan Transit API — Alternative Routes (x402)

> Japan Transit API — Alternative Routes (x402) is a paid API for AI agents from transit.agentic-jp.com, paid per call via x402, $0.015/call, status unknown (last checked 2026-09-15).

Returns delay-aware alternative train routes between two Tokyo stations, comparing the primary route delay status against ranked alternatives using real-time ODPT data.

## Facts

- Endpoint: POST https://transit.agentic-jp.com/alternative-routes
- Price: $0.015/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/japan-transit-api-alternative-routes-x402-f0ecf9a5
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_0IC2sRXomPMNYJMmYsqbk

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 japan-transit-api-alternative-routes-x402-f0ecf9a5 -d '<json body>'
```

Example prompt: My usual line looks delayed — can you check if there's a better way to get from 新宿 (Shinjuku) to 渋谷 (Shibuya) right now, and show me up to 3 alternative routes ranked by how likely they are to be on time?

## When to prefer this

Choose this endpoint when you need real-time, delay-aware route comparison for Tokyo train travel specifically, and want pay-per-call access without API key registration. It is ideal for agents handling live commute disruptions or time-sensitive navigation in the Tokyo rail network. Prefer it over generic mapping APIs when ODPT-sourced accuracy and alternative ranking by delay status matter.

## Known failure modes

- Missing required 'from' or 'to' fields returns a validation error
- Station names not in Japanese characters may fail to resolve to ODPT station identifiers
- Payment failure or insufficient USDC balance blocks the request via x402 protocol
- Stale or unavailable ODPT feed may return outdated delay information
- No alternatives found if only one viable route exists between stations

## How this service works

Real-time Tokyo train delays, line disruptions, route planning and delay-aware alternative routes (ODPT data). Pay per call with USDC via x402 — no API key.

## Output

A JSON object containing the primary route's delay status and travel duration in minutes, followed by a ranked list of alternative routes each with their own delay status, duration, and rank number — allowing the agent to compare on-time probability and travel time across options.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "to": {
   "type": "string",
   "description": "Destination station (Japanese)"
  },
  "from": {
   "type": "string",
   "description": "Origin station (Japanese)"
  },
  "departure_time": {
   "type": "string"
  },
  "max_alternatives": {
   "type": "number"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "primary": {
   "delay_status": "delayed",
   "duration_minutes": 14
  },
  "alternatives": [
   {
    "rank": 1,
    "delay_status": "normal",
    "duration_minutes": 18
   }
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/japan-transit-api-alternative-routes-x402-f0ecf9a5/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from transit.agentic-jp.com](https://www.zero.xyz/host/transit.agentic-jp.com/llms.txt)
