Geography
Get apilocationscountries
Get a list of countries that have companies
GET
/
api
/
locations
/
countries
/
cURL
curl -X GET 'https://www.spherescout.io/api/locations/countries/' \
-H 'Authorization: Token YOUR_API_KEY' \
-H 'User-Agent: SphereScout/1.0'import requests
response = requests.get(
"https://www.spherescout.io/api/locations/countries/",
headers={
"Authorization": "Token YOUR_API_KEY",
"User-Agent": "SphereScout/1.0",
},
)
print(response.json())const response = await fetch("https://www.spherescout.io/api/locations/countries/", {
headers: {
"Authorization": "Token YOUR_API_KEY",
"User-Agent": "SphereScout/1.0",
},
});
const data = await response.json();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://www.spherescout.io/api/locations/countries/",
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: <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://www.spherescout.io/api/locations/countries/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<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://www.spherescout.io/api/locations/countries/")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.spherescout.io/api/locations/countries/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"name": "<string>",
"name_fr": "<string>",
"name_he": "<string>",
"code": "<string>",
"alpha2": "<string>",
"id": "<string>"
}
]Authorizations
API key. Format: Token
Response
200 - application/json
Country name in English.
Country name in French.
Country name in Hebrew.
ISO 3166-1 numeric or alpha-3 code.
ISO 3166-1 alpha-2 code (e.g. 'FR', 'AU').
Alias for alpha2, used as unique identifier.
⌘I
cURL
curl -X GET 'https://www.spherescout.io/api/locations/countries/' \
-H 'Authorization: Token YOUR_API_KEY' \
-H 'User-Agent: SphereScout/1.0'import requests
response = requests.get(
"https://www.spherescout.io/api/locations/countries/",
headers={
"Authorization": "Token YOUR_API_KEY",
"User-Agent": "SphereScout/1.0",
},
)
print(response.json())const response = await fetch("https://www.spherescout.io/api/locations/countries/", {
headers: {
"Authorization": "Token YOUR_API_KEY",
"User-Agent": "SphereScout/1.0",
},
});
const data = await response.json();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://www.spherescout.io/api/locations/countries/",
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: <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://www.spherescout.io/api/locations/countries/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<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://www.spherescout.io/api/locations/countries/")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.spherescout.io/api/locations/countries/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"name": "<string>",
"name_fr": "<string>",
"name_he": "<string>",
"code": "<string>",
"alpha2": "<string>",
"id": "<string>"
}
]