Reverse Geocoding API — Get address from coordinates

Support DQE
Support DQE
  • Updated
Reverse Geocoding API

The SINGLE endpoint converts geographic coordinates (latitude and longitude) into a street address.

Related Geocoding documentation:

/SINGLE/

Request

Both GET and POST are supported.

{SERVER_ADDRESS} and {LICENCE_CODE} are provided by DQE upon account creation. Contact your DQE account manager to obtain these credentials.
GEThttps://{SERVER_ADDRESS}/SINGLE/?Pays={COUNTRY_CODE}&Licence={LICENCE_CODE}&Lat={LATITUDE}&Lon={LONGITUDE}&DistAdr={DISTANCE}

Code examples

Valid coordinates

curl "https://{SERVER_ADDRESS}/SINGLE/?Pays=FRA&Lat=48.836069&Lon=2.235501&DistAdr=1&Licence={LICENCE_CODE}"
fetch("https://{SERVER_ADDRESS}/SINGLE/?" + new URLSearchParams({ Pays: "FRA", Lat: "48.836069", Lon: "2.235501", DistAdr: "1", Licence: "{LICENCE_CODE}" })) .then(r => r.json()) .then(data => console.log(data));
import requests response = requests.get( "https://{SERVER_ADDRESS}/SINGLE/", params={ "Pays": "FRA", "Lat": "48.836069", "Lon": "2.235501", "DistAdr": "1", "Licence": "{LICENCE_CODE}", }, ) print(response.json())
<?php $params = http_build_query([ 'Pays' => 'FRA', 'Lat' => '48.836069', 'Lon' => '2.235501', 'DistAdr' => '1', 'Licence' => '{LICENCE_CODE}', ]); $ch = curl_init("https://{SERVER_ADDRESS}/SINGLE/?{$params}"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); $data = json_decode($response, true);
const axios = require('axios'); axios.get('https://{SERVER_ADDRESS}/SINGLE/', { params: { Pays: 'FRA', Lat: '48.836069', Lon: '2.235501', DistAdr: '1', Licence: '{LICENCE_CODE}' } }) .then(response => console.log(response.data));
HttpClient client = HttpClient.newHttpClient(); String url = "https://{SERVER_ADDRESS}/SINGLE/" + "?Pays=FRA&Lat=48.836069&Lon=2.235501&DistAdr=1&Licence={LICENCE_CODE}"; HttpRequest request = HttpRequest.newBuilder() .uri(URI.create(url)) .GET() .build(); HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString()); System.out.println(response.body());
using var client = new HttpClient(); var url = "https://{SERVER_ADDRESS}/SINGLE/" + "?Pays=FRA&Lat=48.836069&Lon=2.235501&DistAdr=1&Licence={LICENCE_CODE}"; var response = await client.GetAsync(url); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body);
package main import ( "fmt" "io" "net/http" ) func main() { url := "https://{SERVER_ADDRESS}/SINGLE/" + "?Pays=FRA&Lat=48.836069&Lon=2.235501&DistAdr=1&Licence={LICENCE_CODE}" resp, err := http.Get(url) if err != nil { panic(err) } defer resp.Body.Close() body, _ := io.ReadAll(resp.Body) fmt.Println(string(body)) }

Replace the values in braces with your own information:

Parameter Description Mand / Opt
SERVER_ADDRESS DQE server address used to process the request. Mandatory
Licence Your DQE licence code. Mandatory
Pays ISO 3-letter country code. Mandatory
Lat Latitude in decimal format. Mandatory
Lon Longitude in decimal format. Mandatory
DistAdr Search radius in kilometers. Mandatory
POSThttps://{SERVER_ADDRESS}/SINGLE/

Send all parameters in the request body using Content-Type: application/x-www-form-urlencoded. The server address remains in the URL.

Code examples

Valid coordinates

curl -X POST "https://{SERVER_ADDRESS}/SINGLE/" \ -H "Content-Type: application/x-www-form-urlencoded" \ -d "Licence={LICENCE_CODE}" \ -d "Pays=FRA" \ -d "Lat=48.836069" \ -d "Lon=2.235501" \ -d "DistAdr=1"
fetch("https://{SERVER_ADDRESS}/SINGLE/", { method: "POST", headers: { "Content-Type": "application/x-www-form-urlencoded" }, body: new URLSearchParams({ Licence: "{LICENCE_CODE}", Pays: "FRA", Lat: "48.836069", Lon: "2.235501", DistAdr: "1" }) }) .then(r => r.json()) .then(data => console.log(data));
import requests response = requests.post( "https://{SERVER_ADDRESS}/SINGLE/", data={ "Licence": "{LICENCE_CODE}", "Pays": "FRA", "Lat": "48.836069", "Lon": "2.235501", "DistAdr": "1", }, ) print(response.json())
<?php $ch = curl_init("https://{SERVER_ADDRESS}/SINGLE/"); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query([ 'Licence' => '{LICENCE_CODE}', 'Pays' => 'FRA', 'Lat' => '48.836069', 'Lon' => '2.235501', 'DistAdr' => '1', ])); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); $data = json_decode($response, true);
const axios = require('axios'); const qs = require('querystring'); axios.post('https://{SERVER_ADDRESS}/SINGLE/', qs.stringify({ Licence: '{LICENCE_CODE}', Pays: 'FRA', Lat: '48.836069', Lon: '2.235501', DistAdr: '1' })) .then(response => console.log(response.data));
HttpClient client = HttpClient.newHttpClient(); String form = "Licence={LICENCE_CODE}&Pays=FRA&Lat=48.836069&Lon=2.235501&DistAdr=1"; HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://{SERVER_ADDRESS}/SINGLE/")) .header("Content-Type", "application/x-www-form-urlencoded") .POST(HttpRequest.BodyPublishers.ofString(form)) .build(); HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString()); System.out.println(response.body());
using var client = new HttpClient(); var form = new Dictionary<string, string> { ["Licence"] = "{LICENCE_CODE}", ["Pays"] = "FRA", ["Lat"] = "48.836069", ["Lon"] = "2.235501", ["DistAdr"] = "1" }; var response = await client.PostAsync( "https://{SERVER_ADDRESS}/SINGLE/", new FormUrlEncodedContent(form)); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body);
package main import ( "fmt" "io" "net/http" "net/url" ) func main() { form := url.Values{} form.Set("Licence", "{LICENCE_CODE}") form.Set("Pays", "FRA") form.Set("Lat", "48.836069") form.Set("Lon", "2.235501") form.Set("DistAdr", "1") resp, err := http.PostForm("https://{SERVER_ADDRESS}/SINGLE/", form) if err != nil { panic(err) } defer resp.Body.Close() body, _ := io.ReadAll(resp.Body) fmt.Println(string(body)) }

Add the following parameters in the request body using x-www-form-urlencoded.

Parameter Description Mand / Opt
Licence Your DQE licence code. Mandatory
Pays ISO 3-letter country code. Mandatory
Lat Latitude in decimal format. Mandatory
Lon Longitude in decimal format. Mandatory
DistAdr Search radius in kilometers. Mandatory

Response

The JSON response is a dictionary whose keys are numbered from 1 to n. Each element contains the following keys:

Key Description France International
IDLocalite Unique code for each city. For France, this is the INSEE code. STRING(10) STRING(10)
Pays ISO country code. STRING(3) STRING(3)
CodePostal Postal code of the city. INTEGER(5) STRING(10)
Localite City name. STRING(38) STRING(50)
Cedex Indicates if it is a cedex. STRING(1) STRING(1)
IDVoie Unique street identifier. INTEGER(8) STRING(10)
CodeVoie Street's unique code. INTEGER(8) STRING(10)
Voie Street name. STRING(38) STRING(50)
Numero / Num Street number. INTEGER(4) INTEGER(4)
NbNumero Number of street numbers found. INTEGER(4) INTEGER(4)
Instance Value passed in the request and returned in the response. INTEGER(1) INTEGER(1)
Saisie Empty. - -
ListeNumero Empty. - -

Example:

{ "1": { "IDLocalite": "92044", "Saisie": "", "Nbnumero": "1", "Pays": "FRA", "IDVoie": "1749869", "Voie": "RUE VICTOR HUGO", "Numero": "104", "Instance": "", "ListeNumero": "", "Num": "104", "CodePostal": "92300", "NbNumero": "1", "Localite": "LEVALLOIS PERRET", "Cedex": "0", "CodeVoie": "1749869" } }

Test the API

Click the button below to test this endpoint live in your browser.

Open console

See also

Related to

Was this article helpful?

0 out of 0 found this helpful