# 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

| Parameter | Type   | Description                                          |
| --------- | ------ | ---------------------------------------------------- |
| address   | string | The address for which geolocation data is requested. |

## **Responses**

* `200 OK`: Geolocation data successfully retrieved.

  ```json
  {
    "address": "1600 Amphitheatre Parkway, Mountain View, CA, USA",
    "latitude": 37.423021,
    "longitude": -122.083739
  }
  ```
* `400 Bad Request`: Missing or invalid query parameters.

  ```json
  {
    "error": "Address parameter is missing"
  }
  ```
* `404 Not Found`: Geolocation data not found for the provided address.

  ```json
  {
    "error": "Geolocation data not found for the provided address"
  }
  ```
* `500 Internal Server Error`: An unexpected error occurred while processing the request.

  ```json
  {
    "error": "Internal server error"
  }
  ```

**Example**

```
GET /geolocation?address=1600%20Amphitheatre%20Parkway,%20Mountain%20View,%20CA
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ziomark.xyz/get-endpoints/geolocation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
