> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dojah.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Location reverse geocoding

> Convert a latitude and longitude coordinate into a structured street address.

<div className="dj-endpoint">
  <span className={`dj-method dj-method-get`}>GET</span>
  <code>/api/v1/kyc/address/reverse\_geocode</code>
</div>

Turn a GPS coordinate into a structured, human-readable address — street, locality, administrative areas, postal code and country — plus a formatted address string.

## Headers

| Header          | Required | Description                                         |
| --------------- | -------- | --------------------------------------------------- |
| `Authorization` | Yes      | Your app's secret key, sent as-is — *not* `Bearer`. |
| `AppId`         | Yes      | The App ID from your dashboard.                     |

## Query parameters

| Parameter   | Type   | Required | Description                    |
| ----------- | ------ | -------- | ------------------------------ |
| `latitude`  | string | Yes      | The latitude of the location.  |
| `longitude` | string | Yes      | The longitude of the location. |

## Response

Returns an `entity` with an `address_components` object (street, locality, administrative areas, postal code, country, neighbourhood) and a `formatted_address` string.

## Errors

| Code  | Meaning                                                                                       |
| ----- | --------------------------------------------------------------------------------------------- |
| `400` | Bad request — a required parameter is missing or malformed.                                   |
| `401` | Unauthorized — check your key and `AppId` (no `Bearer` prefix).                               |
| `402` | Insufficient wallet balance. [Fund your wallet](/api-reference/core-concepts/wallet-billing). |
| `404` | No record found for the supplied identifier.                                                  |
| `429` | Too many requests — back off and retry.                                                       |

<RequestExample>
  ```bash cURL theme={null}
  curl --request GET \
    "https://api.dojah.io/api/v1/kyc/address/reverse_geocode?latitude=37.7749&longitude=-122.4194" \
    -H "Authorization: {{secret_key}}" \
    -H "AppId: {{app_id}}"
  ```

  ```js Node.js theme={null}
  const params = new URLSearchParams({
    "latitude": "37.7749",
    "longitude": "-122.4194",
  });

  const url = "https://api.dojah.io/api/v1/kyc/address/reverse_geocode?" + params;
  const res = await fetch(url, {
    headers: {
      Authorization: process.env.DOJAH_SECRET_KEY,
      AppId: process.env.DOJAH_APP_ID,
    },
  });
  const data = await res.json();
  ```

  ```python Python theme={null}
  import os, requests

  res = requests.get(
      "https://api.dojah.io/api/v1/kyc/address/reverse_geocode",
      headers={
          "Authorization": os.environ["DOJAH_SECRET_KEY"],
          "AppId": os.environ["DOJAH_APP_ID"],
      },
      params={
          "latitude": "37.7749",
          "longitude": "-122.4194",
      },
  )
  data = res.json()
  ```
</RequestExample>

<ResponseExample>
  ```json GET /api/v1/kyc/address/reverse_geocode theme={null}
  {
    "entity": {
      "address_components": {
        "plus_code": "",
        "premise": "",
        "street_number": "2647",
        "route": "21st Street",
        "locality": "San Francisco",
        "postal_town": "",
        "administrative_area_level_2": "San Francisco County",
        "administrative_area_level_1": "California",
        "country": "United States",
        "postal_code": "94110",
        "neighborhood": "Mission District"
      },
      "formatted_address": "2647 21st St, San Francisco, CA 94110, USA"
    }
  }
  ```
</ResponseExample>
