Find a place by name or address and get its coordinates
curl --request GET \
--url https://api.justrouting.tech/geocode/v1/search \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.justrouting.tech/geocode/v1/search"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.justrouting.tech/geocode/v1/search', 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://api.justrouting.tech/geocode/v1/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.justrouting.tech/geocode/v1/search"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.justrouting.tech/geocode/v1/search")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.justrouting.tech/geocode/v1/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"results": [
{
"datasource": {
"sourcename": "<string>",
"attribution": "<string>",
"license": "<string>",
"url": "<string>"
},
"name": "<string>",
"housenumber": "<string>",
"street": "<string>",
"suburb": "<string>",
"district": "<string>",
"postcode": "<string>",
"city": "<string>",
"county": "<string>",
"state": "<string>",
"country": "<string>",
"country_code": "<string>",
"lon": 123,
"lat": 123,
"formatted": "<string>",
"address_line1": "<string>",
"address_line2": "<string>",
"category": "<string>",
"result_type": "<string>",
"rank": {
"importance": 123,
"popularity": 123,
"confidence": 123,
"confidence_city_level": 123,
"confidence_street_level": 123,
"match_type": "<string>"
},
"timezone": {
"name": "<string>",
"offset_STD": "<string>",
"offset_DST": "<string>",
"offset_STD_seconds": 123,
"offset_DST_seconds": 123,
"abbreviation_STD": "<string>",
"abbreviation_DST": "<string>"
},
"plus_code": "<string>",
"place_id": "<string>",
"bbox": {
"lon1": 123,
"lat1": 123,
"lon2": 123,
"lat2": 123
},
"distance": 123
}
],
"query": {
"text": "<string>",
"parsed": {}
}
}{
"statusCode": 123,
"error": "<string>",
"message": "<string>"
}{
"error": "<string>"
}{
"code": "rate_limited",
"message": "<string>"
}{
"statusCode": 123,
"error": "<string>",
"message": "<string>"
}OpenAPI
geocode
Find a place by name or address and get its coordinates
GET
/
geocode
/
v1
/
search
Find a place by name or address and get its coordinates
curl --request GET \
--url https://api.justrouting.tech/geocode/v1/search \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.justrouting.tech/geocode/v1/search"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.justrouting.tech/geocode/v1/search', 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://api.justrouting.tech/geocode/v1/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.justrouting.tech/geocode/v1/search"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.justrouting.tech/geocode/v1/search")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.justrouting.tech/geocode/v1/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"results": [
{
"datasource": {
"sourcename": "<string>",
"attribution": "<string>",
"license": "<string>",
"url": "<string>"
},
"name": "<string>",
"housenumber": "<string>",
"street": "<string>",
"suburb": "<string>",
"district": "<string>",
"postcode": "<string>",
"city": "<string>",
"county": "<string>",
"state": "<string>",
"country": "<string>",
"country_code": "<string>",
"lon": 123,
"lat": 123,
"formatted": "<string>",
"address_line1": "<string>",
"address_line2": "<string>",
"category": "<string>",
"result_type": "<string>",
"rank": {
"importance": 123,
"popularity": 123,
"confidence": 123,
"confidence_city_level": 123,
"confidence_street_level": 123,
"match_type": "<string>"
},
"timezone": {
"name": "<string>",
"offset_STD": "<string>",
"offset_DST": "<string>",
"offset_STD_seconds": 123,
"offset_DST_seconds": 123,
"abbreviation_STD": "<string>",
"abbreviation_DST": "<string>"
},
"plus_code": "<string>",
"place_id": "<string>",
"bbox": {
"lon1": 123,
"lat1": 123,
"lon2": 123,
"lat2": 123
},
"distance": 123
}
],
"query": {
"text": "<string>",
"parsed": {}
}
}{
"statusCode": 123,
"error": "<string>",
"message": "<string>"
}{
"error": "<string>"
}{
"code": "rate_limited",
"message": "<string>"
}{
"statusCode": 123,
"error": "<string>",
"message": "<string>"
}