Get all the highways that pass through a particular state.
JSON Response
Key | Value | Description |
---|---|---|
state | State | The State defined by the query parameter ID |
highway_in_states | Array of Highway In States | An array of Highway In State objects |
The first step of the Exit Lookup feature is to select a State. You do this with the States API.
Upon choosing a State (in the below case, Alabama), you can feed its id
to this API and receive all Highways that pass through this State. These results are called Highway In State objects.
It is important to know the difference between a Highway and a Highway In State. A Highway defines a limited access road that might span multiple states. I-65, for instance, spans 4 states (Alabama, Tennessee, Kentucky, and Indiana), and thus there are 4 Highway In States associated with the I-65 Highway.
Common Next API(s)
- Exits For Highway In State (read below)
Choosing a highway_in_state[]
.id
is not enough to move on to the Exits For Highway In State API. We also need to select a direction for the chosen Highway In State.
I-65, for instance, travels northbound and southbound, and each side is different, so a direction is required for the Exits For Highway In State API. This direction options come from the string
values in highway_in_state
.highway
.positive_direction
and highway_in_state
.highway
.negative_direction
.
Note about "positive" and "negative" directions
We use the term "positive" and "negative" directions as cardinal-direction-agnostic terms for highway travel. For a North/South Highway, North is the "positive" direction and "South is the "negative" direction. For an East/West Highway, East is "positive" and West is "negative".