---
title: "JSON - Path Between Stations"
method: GET
path: "/json/jPath"
---

# JSON - Path Between Stations

`GET /json/jPath`

<h4 class="text-primary">Description</h4>

<p>Returns a set of ordered stations and distances between two stations on the
<em>same line</em>.</p>

<p>Note that this method is not suitable on its own as a pathfinding solution
between stations.</p>

<h4 class="text-primary">Response Elements</h4>

<table class="table table-condensed table-hover">
<thead>
<tr>
<th class="col-md-3">Element</th>

<th>Description</th>
</tr>
</thead>

<tbody>
<tr>
<td>Path</td>

<td>
Array containing path details (<a href=
"#MetroPathItem">MetroPathItem</a>)
</td>
</tr>

<tr>
<td colspan="2">
<div class="text-primary" style="margin-top: 1em">
<a id="MetroPathItem" name="MetroPathItem">MetroPathItem
Elements</a>
</div>
</td>
</tr>

<tr>
<td>DistanceToPrev</td>

<td>Distance in feet to the previous station in the list.</td>
</tr>

<tr>
<td>LineCode</td>

<td>Two-letter abbreviation for the line (e.g.: RD, BL, YL, OR, GR,
or SV) this station's platform is on.</td>
</tr>

<tr>
<td>SeqNum</td>

<td>Ordered sequence number.</td>
</tr>

<tr>
<td>StationCode</td>

<td>Station code for this station. Use this value in other
rail-related APIs to retrieve data about a station.</td>
</tr>

<tr>
<td>StationName</td>

<td>Full name for this station, as shown on the WMATA website.</td>
</tr>
</tbody>
</table>

## Query parameters

- `FromStationCode` 'N06', required
- `ToStationCode` 'G05', required

## Response `200`

Default response code.

---

[API](https://skmtc.net/wmata/apis/rail-station.md) · [All operations](https://skmtc.net/wmata/apis/rail-station/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/wmata/rail-station/versions/7725c49a1ed9/schema)
