Constructing a Request
A request to the Geocoder API includes the basic elements shown in the following table and, in addition, it may contain resource-specific parameters.
Element | Value/Example | Description |
---|---|---|
Base URL | | Production environment only |
Legacy Base URL |
| Production environment when you use an app_id/app_code pair. For more information, see the Identity & Access Management Developer Guide. |
Path | /6.2/ | |
Resource | | GET only except for |
Format specifier |
| Specifies whether XML or JSON output is required. The format specifier must follow the resource name, for example: The default output format is XML. |
API Key | &apiKey={YOUR_API_KEY} | Substitute your own unique apiKey . For more information, see the Identity & Access Management Developer Guide. |
Application Code - Legacy | &app_code={YOUR_APP_CODE} | Substitute your own unique app_code . For more information, see the Identity & Access Management Developer Guide. |
Application Id - Legacy | &app_id={YOUR_APP_ID} | Substitute your own unique app_id . For more information, see the Identity & Access Management Developer Guide. |
The following geocoding request combines the elements from the table above and adds the parameter searchtext
. The request specifies that the required output is XML.
https://geocoder.ls.hereapi.com/6.2/geocode.xml
?apiKey={YOUR_API_KEY}
&searchtext=425+W+Randolph+Chicago
For further information, see: