curl --request GET \
--url https://api.footstep.ai/v1/geocoding/search \
--header 'x-api-key: <api-key>'import requests
url = "https://api.footstep.ai/v1/geocoding/search"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.footstep.ai/v1/geocoding/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.footstep.ai/v1/geocoding/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 => [
"x-api-key: <api-key>"
],
]);
$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.footstep.ai/v1/geocoding/search"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
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.footstep.ai/v1/geocoding/search")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.footstep.ai/v1/geocoding/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"results": [
{
"coordinates": {
"lat": 51.5074,
"lng": -0.1278
},
"label": "London, England, United Kingdom",
"name": "London",
"country": "United Kingdom",
"country_code": "GBR",
"region": "England",
"locality": "London",
"confidence": 0.95,
"place_type": "locality"
}
],
"query": {
"text": "London",
"size": 10
}
}Search
Forward geocode: convert a text query (address, place name, landmark) into geographic coordinates. Results are ranked by relevance. Whenever you have any spatial context — the user’s visible viewport, last-known location, a prior result — supply focus.point.lat+focus.point.lon so common place names (‘Cambridge’, ‘Bath’, ‘Lebanon’) resolve to the one the caller means. Add boundary.country (comma-separated ISO 3166-1 alpha-3 codes) when the search context is country-bound.
curl --request GET \
--url https://api.footstep.ai/v1/geocoding/search \
--header 'x-api-key: <api-key>'import requests
url = "https://api.footstep.ai/v1/geocoding/search"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.footstep.ai/v1/geocoding/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.footstep.ai/v1/geocoding/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 => [
"x-api-key: <api-key>"
],
]);
$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.footstep.ai/v1/geocoding/search"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
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.footstep.ai/v1/geocoding/search")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.footstep.ai/v1/geocoding/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"results": [
{
"coordinates": {
"lat": 51.5074,
"lng": -0.1278
},
"label": "London, England, United Kingdom",
"name": "London",
"country": "United Kingdom",
"country_code": "GBR",
"region": "England",
"locality": "London",
"confidence": 0.95,
"place_type": "locality"
}
],
"query": {
"text": "London",
"size": 10
}
}Authorizations
Your Footstep API key
Query Parameters
Search text (address, place name, landmark)
Maximum number of results. The top match is the strongest hit; ask for more only when you need disambiguation candidates
1 <= x <= 40Latitude to bias results toward. Supply whenever you have spatial context — viewport centre, last-known location, a prior result. Same-name places nearby float above distant namesakes. Pair with focus.point.lon.
-90 <= x <= 90Longitude to bias results toward. Pair with focus.point.lat.
-180 <= x <= 180Comma-separated ISO 3166-1 alpha-3 country codes to restrict results (e.g. 'GBR' or 'GBR,USA'). Set when the search context is country-bound.
Comma-separated place types to filter: venue, address, street, locality, region, country