Get an ordered list of exits for a particular highway in a particular state.
JSON Response
Key | Value | Description |
---|---|---|
highway_in_state | Highway In State | As the root object for this response, the Highway In State object will contain a Highway and State object. Any child Exit object in need of the State or Highway data should pull it from the root Highway In State |
previous_highway_in_state | Highway In State | [optional] The Highway In State object for the previous State this Highway passed through. For example, for I-65 in Tennessee Northbound, the previous Highway In State would be I-65 in Alabama. |
next_highway_in_state | Highway In State | [optional] The Highway In State object for the next State this Highway passes through. For example, for I-65 in Alabama Northbound, the next Highway In State would be I-65 in Tennessee. |
exits | Array of Exits | An ordered (based on direction query parameter) array of Exits for this Highway in this State. The structure of this data is different depending on if a search_result_id was supplied to the API. Please read below for more details. |
As you can see above, this API accepts an optional search_result_id
parameter. We will refer to this API with no search_result_id
as Regular Mode and this API with an included search_result_id
as Search Mode.
It is very important to realize that the exits
responses returned from Regular Mode are quite different in structure than Search Mode. The data for highway_in_state
, previous_highway_in_state
, and next_highway_in_state
are the same regardless of which mode you are in, but exits
will be different.
Regular Mode
When in Regular Mode, the Exit objects in the exits
array will have an optional categories
child object. The categories
object contains what major amenity categories (eg: Gas, Food, Lodging, etc) are found at that exit.
Search Mode
When in Search Mode, the Exit objects in the exits
array will have an optional 'businesses' child object. The businesses
object contains an array of Business / POI objects that are found at that exit, each of which contains with Exit Mapping object that tells which side of the exit that business is located.
Key | Value | Description |
---|---|---|
businesses | Array of Business / POIs | Array of Business / POI objects that are found at the parent Exit. |
Common Next API(s)
- Exit Details (by using
exits[]
.id
) - POI Details (by using
exits[]
.businesses[]
.id
when in Search Mode) - Exits for Highway in State (by using
previous_highway_in_state
.id
andhighway_in_state
.direction
.current_direction
, ornext_highway_in_state
.id
andhighway_in_state
.direction
.current_direction
)