# Japan Railway Lines Reference API

> Japan Railway Lines Reference API is a paid API for AI agents from jp-data-api-production.up.railway.app, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-13).

Returns a reference list of major Japanese railway lines and key stations (in English), including operator, line type, major stops, and region

## Facts

- Endpoint: GET https://jp-data-api-production.up.railway.app/rail/lines
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/japan-railway-lines-reference-api-b819fdd3
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_cn8a__yWnw2V5mYwoa1Po

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-railway-lines-reference-api-b819fdd3
```

Example prompt: Can you give me a list of the major railway lines in Japan, including shinkansen and metro lines, along with their operators and key stations — I'm trying to plan a trip around the country?

## When to prefer this

Use this endpoint when you need structured, English-language reference data about Japanese railway lines for travel planning, transit context, or building itineraries — not for real-time route search, fare calculation, or live timetables.

## Known failure modes

- No results returned if keyword query matches nothing — check spelling or try broader terms
- Service may return incomplete coverage for minor or private regional lines not included in the reference dataset
- Network timeout or 402 payment failure if x402 micropayment is not properly handled

## How this service works

Major Japanese railway lines and key stations (English): operator, type (shinkansen/metro/JR), major stops, region. For travel planning and transit context. (Reference data; not route search.)

## Output

Returns a list of major Japanese railway lines with details including the operator (e.g. JR, Tokyo Metro), line type (shinkansen, metro, or JR), a list of major stops, and the region served — all in English. Optionally filtered by a line or station keyword.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [],
     "properties": {
      "q": {
       "type": "string",
       "description": "line or station keyword, or omit for all"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/japan-railway-lines-reference-api-b819fdd3/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from jp-data-api-production.up.railway.app](https://www.zero.xyz/host/jp-data-api-production.up.railway.app/llms.txt)
