The HIV/AIDS Prevention & Service Provider Locator is a first-of-its-kind, location-based search tool that allows you to search for testing services, housing providers, health centers and other service providers near your current location.
API stands for application programming interface, and is a way for data to be shared in a flexible and open way. This allows for many different uses of the data, by many different groups and individuals.
All of the same location data that you can find through the Locator tool: service provider names, addresses, phone numbers, locations, and so on, categorized by service type.
Through http://locator.aids.gov/data. The following parameters are available:
Perform a search by ZIP Code. Must be a 5 digit number.
Perform a search using latitude and longitude coordinates. Lat and long are rounded to 3 decimal places for consistency in search results. If lat, long and zip are provided, lat and long will be ignored.
A comma separated list of the types of services to search. The following are the currently available service types:
Search by distance in miles from the provided location. Accepts values between 1 and 50 in increments of 5. Invalid values will be clamped to the nearest multiple of 5. If no distance is provided, defaults to 1 mile.
Determines the format of the returned data. Currently available formats are:
If a callback parameter is included, the response will be sent using JSON-P.
If you don’t request a different format, the data in the response will be in JSON format. Here’s a quick example:
Sure, here are a few example requests:
http://locator.aids.gov/data?lat=36.180774&long=-86.735863
http://locator.aids.gov/data?lat=36.180774&long=-86.735863&distance=10
http://locator.aids.gov/data?lat=36.180774&long=-86.735863&format=html
http://locator.aids.gov/data?lat=36.180774&long=-86.735863&format=xml&distance=30
Below is an example which simply lists the results:
And one which displays the results on a map:
5-22-2012: 1.0.1 — Added fixes to properly escape ampersands in feed content, and other minor internal issues.
2-12-2012: 1.0.0 — Public API released.