# StatePulse Rail Status

> StatePulse Rail Status is a paid API for AI agents from statepulse-api.hahavoid0.workers.dev, paid per call via x402, $0.02/call, status unknown (last checked 2026-09-14).

Returns live train departure times, delays, and directions for a given rail station

## Facts

- Endpoint: POST https://statepulse-api.hahavoid0.workers.dev/transit/rail-status
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/statepulse-rail-status-3b248579
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_9zATdHTOtz_gxYhhkvYbu

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 statepulse-rail-status-3b248579 -d '<json body>'
```

Example prompt: What trains are currently departing from Zurich HB and are any of them delayed right now?

## When to prefer this

Use this endpoint when you need real-time rail departure and delay information for a specific station, particularly for European rail networks like Swiss Federal Railways. Prefer this over static schedule APIs when live delay data matters. Best suited for agents that need pay-per-call access without API key management.

## Known failure modes

- Station not recognized or unsupported — returns supported:false with low confidence
- No live data available for the requested station at this time
- Payment failure via x402/USDC causing 402 response before data is returned
- Network timeout from the Cloudflare Worker backend

## How this service works

Queries live train departures and schedule delays for European transit hubs using transport.opendata.ch.

## Output

A JSON object containing an array of upcoming trains with their name, scheduled departure time (UTC), direction/destination, and delay in minutes, along with the station name, a supported flag, and a confidence level for the data.

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "result": {
   "trains": [
    {
     "name": "IR 37",
     "departure": "2026-06-25T08:30:00Z",
     "direction": "Basel SBB",
     "delay_minutes": 2
    }
   ],
   "station": "Zurich HB"
  },
  "supported": true,
  "confidence": "high"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/statepulse-rail-status-3b248579/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from statepulse-api.hahavoid0.workers.dev](https://www.zero.xyz/host/statepulse-api.hahavoid0.workers.dev/llms.txt)
