IBM Support

EIS Alerts 2.0 – How to use APIs to get the GEO coordinates for an address

Question & Answer


Question

Can you please give me an example on how to use APIs to get the GEO coordinates for an address?

Answer

Here’s how to use the Standard API documentation to pull the geo coordinates for an address.

image-20230816130732-1

2.  Scroll down in the middle of the page until you see “For more information about the standard data package, see the Standard API documentation.

3. Click on the link to “Standard API documentation.”  It will redirect you to new page, "Leaving the IBM Web site", then click on the link,(i.e., "ibm.co/3ddEGm5", - EIS Standard.

4.  Here you’ll see details of the weather APIs that would be available to you.  In that list, under Weather Company Data - Utility. 

image-20230816130732-2

5.  You should see another link for API documentation for "Location Services – Search" - (i.e.,"https://ibm.co/3jfqOM2"), click on the link, it will take you to the documentation on the APIs for location Services – Search.

image-20230816130732-3

6.  Once on that page, it will detail the API that you could use.  You will see some examples under URL Construction (look at the 2nd example).
Ex.  https://api.weather.com/v3/location/search?query=Lincoln Memorial Circle SW&locationType=address&language=en-US&format=json&apiKey=yourApiKey 

7.  As listed in the above example, you would set query={to the address you want information on}.  You would set the locationType={to ‘address’}.  And you would need your apiKey={yourApiKey} that you would get as part of your weather data APIs.

8. Additional Information:  There are other params you can pass along, but that’s what you would want for your use case.  If you scroll further down that document page, you will see the data elements “JSON Sample” of the returned response.  Notice, in the various data elements returned, you should see "latitude" and "longitude".image-20230816130732-4

[{"Type":"MASTER","Line of Business":{"code":"LOB59","label":"Sustainability Software"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSRQLT","label":"IBM Environmental Intelligence Suite"},"ARM Category":[{"code":"a8m3p000000hCGKAA2","label":"EIS Alerts Console-\u003EAlerts 2.0 Console"},{"code":"a8m3p000000LRfYAAW","label":"EIS Product APIs (Keys, etc)"}],"ARM Case Number":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions"}]

Document Information

Modified date:
16 August 2023

UID

ibm17027846