▫️Geolocation
/geolocation
This endpoint accepts a GET request with a query parameter address
. It retrieves geolocation data for the provided address and returns the address along with its corresponding latitude and longitude. If the address parameter is missing, it returns a 400 error with a corresponding message. If no geolocation data is found for the provided address, it returns a 404 error with a corresponding message. If there is an error during the retrieval process, it returns a 500 error with a corresponding message.
Query Parameters
address
string
The address for which geolocation data is requested.
Responses
200 OK
: Geolocation data successfully retrieved.{ "address": "1600 Amphitheatre Parkway, Mountain View, CA, USA", "latitude": 37.423021, "longitude": -122.083739 }
400 Bad Request
: Missing or invalid query parameters.{ "error": "Address parameter is missing" }
404 Not Found
: Geolocation data not found for the provided address.{ "error": "Geolocation data not found for the provided address" }
500 Internal Server Error
: An unexpected error occurred while processing the request.{ "error": "Internal server error" }
Example
GET /geolocation?address=1600%20Amphitheatre%20Parkway,%20Mountain%20View,%20CA
Last updated