Get an ordered list of exits for a particular highway in a particular state.

JSON Response

KeyValueDescription
highway_in_stateHighway In StateAs 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_stateHighway 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_stateHighway 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.
exitsArray of ExitsAn 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.

KeyValueDescription
categoriesArray of CategorysArray of Category objects for each major amenity category (eg: Gas, Food, Lodging, etc) found at that exit.
720

The Exits For Highway In State API in Regular Mode rendered in the iExit Android app.

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.

KeyValueDescription
businessesArray of Business / POIsArray of Business / POI objects that are found at the parent Exit.
720

The Exits For Highway In State API in Search Mode (searching for Gas) rendered in the iExit Android app.

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 and highway_in_state.direction.current_direction, or next_highway_in_state.id and highway_in_state.direction.current_direction)
Language
Authorization
Header
Click Try It! to start a request and see the response here!