This test demonstrates how to find pharmacies near specific geographic coordinates using the Mapbox Geocoding API.
The endpoint for finding nearby pharmacies is:
https://api.mapbox.com/geocoding/v5/mapbox.places/pharmacy.json?proximity=-79.8419,35.1849&access_token=YOUR_MAPBOX_ACCESS_TOKENThe endpoint utilizes the following parameters:
-
mapbox.places: This specifies the Mapbox Geocoding API endpoint for searching places. -
proximity: Specifies the longitude and latitude of the location you wish to search near. In this example, it is set to-79.8419,35.1849, corresponding to coordinates in North Carolina. -
access_token: Your Mapbox access token, required for authenticating the request. ReplaceYOUR_MAPBOX_ACCESS_TOKENwith your actual token.
By utilizing the mapbox.places endpoint with the pharmacy category and providing specific geographic coordinates through the proximity parameter, the API retrieves information about pharmacies near the specified location. This information can then be utilized in applications to assist users in finding nearby pharmacies efficiently.