Search geo IDs
curl --request GET \
--url https://api.fetchin.io/api/v1/geo-id/search \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.fetchin.io/api/v1/geo-id/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.fetchin.io/api/v1/geo-id/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.fetchin.io/api/v1/geo-id/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.fetchin.io/api/v1/geo-id/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.fetchin.io/api/v1/geo-id/search")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fetchin.io/api/v1/geo-id/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{
"elements": [
{ "geoId": "103815258", "title": "Lyon, Auvergne-Rhône-Alpes, France" },
{ "geoId": "90009674", "title": "Greater Lyon Area" },
{ "geoId": "106252843", "title": "Lyons, Illinois, United States" },
{ "geoId": "104757301", "title": "South Lyon, Michigan, United States" },
{ "geoId": "104495668", "title": "Sainte-Foy-lès-Lyon, Auvergne-Rhône-Alpes, France" }
]
}
{
"error": "Missing search parameter",
"code": "MISSING_PARAMETER"
}
{
"error": "Invalid API key",
"code": "INVALID_API_KEY"
}
{
"error": "Quota exceeded. Upgrade your plan or wait for renewal.",
"code": "QUOTA_EXHAUSTED",
"details": {
"creditsRemaining": 0,
"subscriptionCreditsRemaining": 0,
"paygCreditsRemaining": 0,
"buyCreditsUrl": "https://fetchin.io/credits"
}
}
{
"error": "Service temporarily unable to serve this request. Please retry.",
"code": "SERVICE_UNAVAILABLE"
}
Jobs
Search Geo IDs
Find the geo ID of a place from its name, to filter job searches by location
GET
/
api
/
v1
/
geo-id
/
search
Search geo IDs
curl --request GET \
--url https://api.fetchin.io/api/v1/geo-id/search \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.fetchin.io/api/v1/geo-id/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.fetchin.io/api/v1/geo-id/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.fetchin.io/api/v1/geo-id/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.fetchin.io/api/v1/geo-id/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.fetchin.io/api/v1/geo-id/search")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fetchin.io/api/v1/geo-id/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{
"elements": [
{ "geoId": "103815258", "title": "Lyon, Auvergne-Rhône-Alpes, France" },
{ "geoId": "90009674", "title": "Greater Lyon Area" },
{ "geoId": "106252843", "title": "Lyons, Illinois, United States" },
{ "geoId": "104757301", "title": "South Lyon, Michigan, United States" },
{ "geoId": "104495668", "title": "Sainte-Foy-lès-Lyon, Auvergne-Rhône-Alpes, France" }
]
}
{
"error": "Missing search parameter",
"code": "MISSING_PARAMETER"
}
{
"error": "Invalid API key",
"code": "INVALID_API_KEY"
}
{
"error": "Quota exceeded. Upgrade your plan or wait for renewal.",
"code": "QUOTA_EXHAUSTED",
"details": {
"creditsRemaining": 0,
"subscriptionCreditsRemaining": 0,
"paygCreditsRemaining": 0,
"buyCreditsUrl": "https://fetchin.io/credits"
}
}
{
"error": "Service temporarily unable to serve this request. Please retry.",
"code": "SERVICE_UNAVAILABLE"
}
Endpoint
GET /api/v1/geo-id/search
Authentication
Include your API key in the request header:X-API-Key: your-api-key-here
Parameters
The place to look up, as you would type it in a location filter: a city
(
Lyon), a region (Île-de-France), a metropolitan area or a country
(France). At most 100 characters.Response
The places matching the text, best match first (up to 20), the same
suggestions a location filter’s autocompletion offers.
Show Place object
Show Place object
The place’s numeric ID, to pass as
geoId to
Search Jobs.Example Request
curl -G "https://api.fetchin.io/api/v1/geo-id/search" \
--data-urlencode "search=Lyon" \
-H "X-API-Key: your-api-key-here"
const response = await fetch(
`https://api.fetchin.io/api/v1/geo-id/search?search=${encodeURIComponent('Lyon')}`,
{ headers: { 'X-API-Key': 'your-api-key-here' } },
);
const { elements } = await response.json();
console.log(elements[0]); // { geoId: '103815258', title: 'Lyon, Auvergne-Rhône-Alpes, France' }
import requests
response = requests.get(
'https://api.fetchin.io/api/v1/geo-id/search',
headers={'X-API-Key': 'your-api-key-here'},
params={'search': 'Lyon'},
)
print(response.json()['elements'][:3])
Example Response
{
"elements": [
{ "geoId": "103815258", "title": "Lyon, Auvergne-Rhône-Alpes, France" },
{ "geoId": "90009674", "title": "Greater Lyon Area" },
{ "geoId": "106252843", "title": "Lyons, Illinois, United States" },
{ "geoId": "104757301", "title": "South Lyon, Michigan, United States" },
{ "geoId": "104495668", "title": "Sainte-Foy-lès-Lyon, Auvergne-Rhône-Alpes, France" }
]
}
{
"error": "Missing search parameter",
"code": "MISSING_PARAMETER"
}
{
"error": "Invalid API key",
"code": "INVALID_API_KEY"
}
{
"error": "Quota exceeded. Upgrade your plan or wait for renewal.",
"code": "QUOTA_EXHAUSTED",
"details": {
"creditsRemaining": 0,
"subscriptionCreditsRemaining": 0,
"paygCreditsRemaining": 0,
"buyCreditsUrl": "https://fetchin.io/credits"
}
}
{
"error": "Service temporarily unable to serve this request. Please retry.",
"code": "SERVICE_UNAVAILABLE"
}
Errors
See Error Handling for the full list of error codes and recommended handling.400—MISSING_PARAMETER/INVALID_PARAMETER401—INVALID_API_KEY402—QUOTA_EXHAUSTED429—RATE_LIMITED500—INTERNAL_ERROR503—SERVICE_UNAVAILABLE
200 with an empty elements list.
Notes
This endpoint consumes 1 credit per call. Errors are free. See Quotas.
A geo ID is stable: look it up once and keep it. Passing a
location
text to Search Jobs does this lookup
for you on every call and keeps the first suggestion.