---
title: Address Reverse Geocode Match
slug: api-marketplace/address-reverse-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

The Reverse Geocoding API by Signzy offers a seamless solution for converting geographical coordinates into detailed physical addresses. This intuitive API takes latitude and longitude inputs and returns a comprehensive address, including city, state, country, and zip code, accurately mapped to the specified coordinates. With a straightforward cURL request, users can effortlessly obtain an address along with a confidence score that indicates the accuracy of the geocoding result. This API is a reliable tool for bridging the gap between coordinate data and real-world locations, ensuring precise and efficient address retrieval.

***

## API details

### Endpoint

:::CodeblockTabs
Production Endpoint

```text
POST https://api.signzy.app/api/v3/geocoding/reverse-geocode
```
:::

:::CodeblockTabs
UAT Endpoint

```text
POST https://api-preproduction.signzy.app/api/v3/geocoding/reverse-geocode
```
:::

***

### Request body parameters

| **Parameter**   | **Data Type** | **Description**                           | **Required** |
| --------------- | ------------- | ----------------------------------------- | ------------ |
| latitude        | String        | Latitude coordinates                      | Mandatory    |
| longitude       | String        | Longitude coordinates                     | Mandatory    |
| pinocdePriority | boolean       | Only pass true if pincode is prioritized. | Optional     |

```json
{
    "latitude": "12.21",
    "longitude": "12.23",
    "pinocdePriority":false
}
```

***

### 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/reverse-geocode' \
--header 'Content-Type: application/json' \
--header 'Authorization: <Authorization token>' \
--data '{
    "latitude": "12.21",
    "longitude": "12.23",
    "pinocdePriority":false
}'
```

Node.js

```nodejs
const axios = require('axios');
let data = JSON.stringify({
  "latitude": "12.21",
  "longitude": "12.23",
  "pinocdePriority":false

});

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

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

```

Python

```python
import requests
import json

url = "https://api-preproduction.signzy.app/api/v3/geocoding/reverse-geocode"

payload = json.dumps({
  "latitude": "12.21",
  "longitude": "12.23",
  "pinocdePriority":false

})
headers = {
  'Content-Type': 'application/json',
  'Authorization': '<Authorization token>'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

```

GO

```go
package main

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

func main() {

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

  payload := strings.NewReader(`{
    "latitude": "12.21",
    "longitude": "12.23",
    "pinocdePriority":false

}`)

  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       | Confidence score of the address information<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                                                                                                                                                                                                                          |

:::CodeblockTabs
200

```json
{
    "address": "665H+XX MATERAM, NIGERIA",
    "latitude": "12.21",
    "longitude": "12.23",
    "confidenceScore": 0.7,
    "city": "MATERAM",
    "state": "YOBE",
    "stateCode": "YB",
    "country": "NIGERIA",
    "countryCode": "NG",
    "zipcode": "620102"
}
```

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 (Message can vary based on missing field)
{
    "error": {
        "name": "error",
        "message": "\"requestBody.latitude\" must be a string",
        "status": "Bad Request",
        "statusCode": 400
    }
}

// Passing empty latitiude
{
    "name": "error",
    "message": "\"latitude\" is not allowed to be empty",
    "status": 400,
    "type": "Bad Request"
}

// Passing empty longitude
{
    "name": "error",
    "message": "\"longitude\" is not allowed to be empty",
    "status": 400,
    "type": "Bad Request"
}
```

401

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

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

409

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

404

```json
{
    "error": {
        "name": "error",
        "message": "Pincode not found for given Lat/Lon",
        "status": 404,
        "reason": "Error",
        "type": "Not Found",
        "statusCode": 404
    }
}
---------------------------------------------------------------------------------
{
    "error": {
        "name": "error",
        "message": "Latitude not found for given Lat/Lon",
        "status": 404,
        "reason": "Error",
        "type": "Not Found",
        "statusCode": 404
    }
}
```
:::

***

**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!

