---
title: Address Geocode Match
slug: api-marketplace/address-geocode-match
description: Learn how to use the Address Geocoder API to effortlessly convert address information into geographic coordinates and vice versa. This comprehensive document includes sample curl commands, input and response parameters for address geocoding and reverse ge
createdAt: 2023-03-23T09:18:39.000Z
---

# Introduction

Address geocoding, or simply geocoding, is the process of taking a text-based description of a location, such as an address or the name of a place, and returning geographic coordinates, frequently latitude/longitude pair, to identify a location on the Earth's surface.

The Address Geocoder product takes the address and returns the latitude/longitude of the shared location.

***

## API details

### Endpoint

:::CodeblockTabs
Production Endpoint

```text
POST https://api.signzy.app/api/v3/geocoding/address-geocoder
```
:::

:::CodeblockTabs
UAT Endpoint

```text
POST https://api-preproduction.signzy.app/api/v3/geocoding/address-geocoder
```
:::

***

### Request body parameters

| **Parameter** | **Data Type** | **Description**                                                                                                                                                                        | **Required**            |
| ------------- | ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------- |
| address       | String        | The address information                                                                                                                                                                | Mandatory               |
| latitude      | String        | Latitude coordinate. It will be utilized alongside the coordinates provided by the API to determine the distance between the two sets of coordinates. Needs to be used with longitude. | Conditionally Mandatory |
| longitude     | String        | Longitude coordinate. It will be utilized alongside the coordinates provided by the API to determine the distance between the two sets of coordinates. Needs to be used with latitude. | Conditionally Mandatory |

```json
{
    "address": "BTM layout, BENGALURU",
    "latitude": "",
    "longitude": ""
}
```

***

### Request Headers

| **Name&#x20;** | **Value**        | **Required** | **Description**                                                                                            |
| -------------- | ---------------- | ------------ | ---------------------------------------------------------------------------------------------------------- |
| Content-type   | application/json | Mandatory    | The type of content that the request body contains.                                                        |
| Authorization  | XXXXXXXXXXXXXXX  | Mandatory    | An authentication token to authorize the request. Reach out to the Signzy support team to get one created. |

***

### Code Samples

:::CodeblockTabs
Curl

```curl
curl --location 'https://api-preproduction.signzy.app/api/v3/geocoding/address-geocoder' \
--header 'Content-Type: application/json' \
--header 'Authorization: <Authorization Token>' \
--data '{
    "address": "BTM layout, BENGALURU",
    "latitude": "",
    "longitude": ""
}'
```

Node.js

```nodejs
const axios = require('axios');
let data = JSON.stringify({
  "uid": "<Aadhaar Number>"
});

let config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: 'https://api-preproduction.signzy.app/api/v3/aadhaar/verify',
  headers: { 
    'Content-Type': 'application/json', 
    'Authorization': '<Token>'
  },
  data : data
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});

```

Python

```python
import http.client
import json

conn = http.client.HTTPSConnection("api-preproduction.signzy.app")
payload = json.dumps({
  "address": "BTM layout, BENGALURU",
  "latitude": "",
  "longitude": ""
})
headers = {
  'Content-Type': 'application/json',
  'Authorization': '<Authorization Token>'
}
conn.request("POST", "/api/v3/geocoding/address-geocoder", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
```

GO

```go
package main

import (
  "fmt"
  "strings"
  "net/http"
  "io/ioutil"
)

func main() {

  url := "https://api-preproduction.signzy.app/api/v3/geocoding/address-geocoder"
  method := "POST"

  payload := strings.NewReader(`{
    "address": "BTM layout, BENGALURU",
    "latitude": "",
    "longitude": ""
}`)

  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, payload)

  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("Content-Type", "application/json")
  req.Header.Add("Authorization", "<Authorization Token>")

  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := ioutil.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}
```
:::

***

### Response body parameters

| **Parameter**   | **Data type** | **Description**                                                                                                                                                                                                                                            |
| --------------- | ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| address         | String        | The complete address including location details                                                                                                                                                                                                            |
| latitude        | String        | The latitude coordinate of the address                                                                                                                                                                                                                     |
| longitude       | String        | The longitude coordinate of the address                                                                                                                                                                                                                    |
| confidenceScore | Integer       | The confidence score of the returned coordinates.<br />1 means precise street address location information,<br />0.9 means approximations based on road intersections.<br />0.7 means centered on a location's geometry.<br />0.5 means broadly estimated. |
| city            | String        | The city name                                                                                                                                                                                                                                              |
| state           | String        | The state name                                                                                                                                                                                                                                             |
| stateCode       | String        | The state code                                                                                                                                                                                                                                             |
| country         | String        | The country name                                                                                                                                                                                                                                           |
| countryCode     | String        | The country code                                                                                                                                                                                                                                           |
| zipcode         | String        | The postal code or ZIP code                                                                                                                                                                                                                                |
| distanceInKms   | String        | Distance in kilometers from the latitude and longitude provided in the input request body.                                                                                                                                                                 |

:::CodeblockTabs
200

```json
{
    "address": "BTM LAYOUT, BENGALURU, KARNATAKA, INDIA",
    "latitude": "12.91495",
    "longitude": "77.61",
    "confidenceScore": 1,
    "city": "BENGALURU",
    "state": "KARNATAKA",
    "stateCode": "KA",
    "country": "INDIA",
    "countryCode": "IN",
    "zipcode": "560076",
    "distanceInKms": ""
}
```

400

```json
// Passing invalid latitude
{
    "name": "error",
    "message": "Must be a valid latitude",
    "status": 400,
    "type": "Bad Request"
}

// Passing invalid longitude
{
    "name": "error",
    "message": "Must be a valid longitude",
    "status": 400,
    "type": "Bad Request"
}

// Passing wrong data type for any of the field
{
    "error": {
        "name": "error",
        "message": "\"requestBody.address\" must be a string",
        "status": "Bad Request",
        "statusCode": 400
    }
}

// Passing empty address
{
    "error": {
        "name": "error",
        "message": "\"requestBody.address\" is not allowed to be empty",
        "status": "Bad Request",
        "statusCode": 400
    }
}
```

401

```json
// If Authorization token is not passed
{
    "message": "No API key found in request"
}

// If Authorization token is invalid
{
    "message": "Invalid authentication credentials"
}
```

404

```json
// Address not found
{
    "name": "error",
    "message": "Lat/Lon not found for given Address",
    "status": 404,
    "type": "Not Found"
}
```

409

```json
{
    "error": {
        "reason": "Error From Upstream",
        "status": 409,
        "message": "Upstream Down",
        "type": "Conflict",
        "statusCode": 409,
        "name": "error"
    }
}
```
:::

***

**Contact Us for Any Assistance**

If you have any questions or need assistance, please reach out to our customer support team. You can contact us via email at <font color="#2166ae">**help\@signzy.com**</font>. We strive to provide prompt and reliable assistance, ensuring your queries are addressed effectively.

We value your feedback and are committed to making your experience smooth and enjoyable. Our team is dedicated to assisting you with any needs you may have. Thank you for choosing our services. We look forward to helping you!

