Skip to main content

Geocoding

Contents

Geocoding retrieves longitude and latitude coordinates for a given address, as well as additional information about that address.

If the geocoding service finds multiple results that match the address, the best match is returned by default. To receive multiple results, set the optional list property to the desired amount.

GET /locations

Resource URL

https://pcmiler.alk.com/apis/rest/v1.0/service.svc/locations

Parameters

The table below includes the most frequently used parameters. Please see the Geocoding Overview page for a full list. If you would like to test out this API, enter values in the table and scroll down the page to submit your request. Required fields are city, state and country; or postcode; or splc. To geocode a location outside of North America, the region field is also required. Check the box next to any additional parameters you would like to set.

Request

API KEY
GET

Response

Geocode Response

Data ElementDescriptionData TypeValue/Example
AddressEncapsulates the details about the location
complex
CoordsEncapsulates the details about the longitude/latitude
complex
RegionIndicates the region of the location
Enum
0 - Unknown
1 - AF
2 - AS
3 - EU
4 - NA(default)
5 - OC
6 - SA
7 - ME
LabelThe label to be displayed on maps and reports in association with a stop
string
PlaceNameThe place name which corresponds to custom place.
string
TimeZoneTime zone that the geocoded result is situated within.
string
ErrorsEncapsulated the details about the errors associated with the geocode locationList of Complex Objects
ConfidenceLevelThe confidence level of the match. See detailed definition in Glossary.
string
Exact, Good, Uncertain, Failed
DistanceFromRoadThe distance from coordinate to nearest road.
double
SpeedLimitInfoSpeed limit of the geocoded coordinates. Read more about retrieving posted speed limits, if the account is licensed for them.
Complex
SpeedLimitHeadingHeading used for reverse geocoding to properly snap to the right link.
double

Address

Data ElementDescriptionData TypeValue/Example
StreetAddressThe house number and street name
string
1 Independence Way
CityThe name of the city
string
Princeton
StateThe two letter state abbreviation. This parameter has been deprecated. Use the results returned by StateName and StateAbbreviation instead.
string
NJ
ZipThe postal code or zip
string
08540
CountyThe county or jurisdiction.
string
Mercer
CountryThe name of the country
string
SPLCThe Standard Point Location code to use in place of street/city/state/zip
string
183444301
CountryPostalFilterThe postal code filter; use this to filter zip codes by country
Enum
0 - US
1- Mexico
2 - Both
AbbreviationFormatThe abbreviation format for the country code. This is not applicable for NA dataset. See country code table in Appendix.
Enum
0 - FIPS
1 - ISO2
2 - ISO3
3 - GENC2
4 - GENC3
StateNameThe full name of the state.
string
New Jersey, Queensland
StateAbbreviationThe abbreviation for the state.
string
NJ, QLD
CountryAbbreviationAbbreviated country code corresponding to requested format.
string

Coordinates

Data ElementDescriptionData TypeValue/Example
LatLatitude
string
LonLongitude
string

Errors

Data ElementDescriptionData TypeValue/Example
TypeIndicates whether the error is an exception or warning
Enum
Warning
Exception
CodeError code
Enum
Please refer to Appendix for complete list
LegacyErrorCodeThe legacy error code with is an integer valued code that would have been returned in PC*MILER Web Services v25 and earlier.
Int
DescriptionThe detailed error description.
string
Last updated February 23, 2022.
Contents