Reverse Geocode
curl --request POST \
--url https://b.hudhud.sa/v1/geocoding/reverse \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"lat": 24.6756,
"lon": 46.7386
}
'import requests
url = "https://b.hudhud.sa/v1/geocoding/reverse"
payload = {
"lat": 24.6756,
"lon": 46.7386
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({lat: 24.6756, lon: 46.7386})
};
fetch('https://b.hudhud.sa/v1/geocoding/reverse', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://b.hudhud.sa/v1/geocoding/reverse",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'lat' => 24.6756,
'lon' => 46.7386
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://b.hudhud.sa/v1/geocoding/reverse"
payload := strings.NewReader("{\n \"lat\": 24.6756,\n \"lon\": 46.7386\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://b.hudhud.sa/v1/geocoding/reverse")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"lat\": 24.6756,\n \"lon\": 46.7386\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://b.hudhud.sa/v1/geocoding/reverse")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"lat\": 24.6756,\n \"lon\": 46.7386\n}"
response = http.request(request)
puts response.read_body{
"data": {
"address": {
"city": "Riyadh",
"country": "Saudi Arabia",
"country_code": "sa",
"municipality": "Riyadh Municipality",
"neighbourhood": "Al Malaz District",
"postcode": "12832",
"province": "Riyadh Province",
"road": "Mosab Ibn Umair St",
"suburb": "Al Malaz"
},
"addresstype": "tourism",
"boundingbox": [
"<string>"
],
"category": "leisure",
"display_name": "Riyadh Zoo, Mosab Ibn Umair St, Al Malaz, Riyadh 12832, Saudi Arabia",
"importance": 0.85,
"lat": "24.6756",
"lon": "46.7386",
"name": "Riyadh Zoo",
"place_id": 123456789,
"place_rank": 20,
"type": "zoo"
},
"error": "",
"ok": true
}{
"data": "<unknown>",
"error": "",
"ok": true
}{
"data": "<unknown>",
"error": "",
"ok": true
}{
"data": "<unknown>",
"error": "",
"ok": true
}Geocoding
Reverse Geocode
Convert geographic coordinates into a human-readable address. Returns structured address components including city, road, suburb, and postal code.
POST
/
geocoding
/
reverse
Reverse Geocode
curl --request POST \
--url https://b.hudhud.sa/v1/geocoding/reverse \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"lat": 24.6756,
"lon": 46.7386
}
'import requests
url = "https://b.hudhud.sa/v1/geocoding/reverse"
payload = {
"lat": 24.6756,
"lon": 46.7386
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({lat: 24.6756, lon: 46.7386})
};
fetch('https://b.hudhud.sa/v1/geocoding/reverse', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://b.hudhud.sa/v1/geocoding/reverse",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'lat' => 24.6756,
'lon' => 46.7386
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://b.hudhud.sa/v1/geocoding/reverse"
payload := strings.NewReader("{\n \"lat\": 24.6756,\n \"lon\": 46.7386\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://b.hudhud.sa/v1/geocoding/reverse")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"lat\": 24.6756,\n \"lon\": 46.7386\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://b.hudhud.sa/v1/geocoding/reverse")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"lat\": 24.6756,\n \"lon\": 46.7386\n}"
response = http.request(request)
puts response.read_body{
"data": {
"address": {
"city": "Riyadh",
"country": "Saudi Arabia",
"country_code": "sa",
"municipality": "Riyadh Municipality",
"neighbourhood": "Al Malaz District",
"postcode": "12832",
"province": "Riyadh Province",
"road": "Mosab Ibn Umair St",
"suburb": "Al Malaz"
},
"addresstype": "tourism",
"boundingbox": [
"<string>"
],
"category": "leisure",
"display_name": "Riyadh Zoo, Mosab Ibn Umair St, Al Malaz, Riyadh 12832, Saudi Arabia",
"importance": 0.85,
"lat": "24.6756",
"lon": "46.7386",
"name": "Riyadh Zoo",
"place_id": 123456789,
"place_rank": 20,
"type": "zoo"
},
"error": "",
"ok": true
}{
"data": "<unknown>",
"error": "",
"ok": true
}{
"data": "<unknown>",
"error": "",
"ok": true
}{
"data": "<unknown>",
"error": "",
"ok": true
}Authorizations
JWT Bearer token for authentication. Example: "Bearer YOUR_API_TOKEN_HERE"
Body
application/json
Coordinates to reverse geocode
