Countries
curl --request GET \
--url https://api.forestreet.com/markets/{marketId}/companies/countriesimport requests
url = "https://api.forestreet.com/markets/{marketId}/companies/countries"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.forestreet.com/markets/{marketId}/companies/countries', 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.forestreet.com/markets/{marketId}/companies/countries",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.forestreet.com/markets/{marketId}/companies/countries"
req, _ := http.NewRequest("GET", url, nil)
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.forestreet.com/markets/{marketId}/companies/countries")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.forestreet.com/markets/{marketId}/companies/countries")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"meta": {
"totalItems": 26,
"totalUniqueCompanies": 164
},
"currentQuery": {
"marketId": 2
},
"data": {
"United States": 94,
"United Kingdom": 18,
"Canada": 8,
"Germany": 5,
"Australia": 4,
"France": 4,
"Netherlands": 4,
"Spain": 4,
"Israel": 3,
"India": 2,
"Italy": 2,
"South Africa": 2,
"Austria": 1,
"Bangladesh": 1,
"Colombia": 1,
"Cyprus": 1,
"Czech Republic": 1,
"Finland": 1,
"Hong Kong": 1,
"Hungary": 1,
"People's Republic of China": 1,
"Poland": 1,
"Republic of Ireland": 1,
"Russia": 1,
"Switzerland": 1,
"Turkey": 1
}
}
Deprecated
Countries
This endpoint retrieves all the headquarter countries identified in the given market.
This is commonly used with the /markets/{marketId}/companies endpoint to ensure that the filter is acting on an available country.
GET
/
markets
/
{marketId}
/
companies
/
countries
Countries
curl --request GET \
--url https://api.forestreet.com/markets/{marketId}/companies/countriesimport requests
url = "https://api.forestreet.com/markets/{marketId}/companies/countries"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.forestreet.com/markets/{marketId}/companies/countries', 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.forestreet.com/markets/{marketId}/companies/countries",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.forestreet.com/markets/{marketId}/companies/countries"
req, _ := http.NewRequest("GET", url, nil)
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.forestreet.com/markets/{marketId}/companies/countries")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.forestreet.com/markets/{marketId}/companies/countries")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"meta": {
"totalItems": 26,
"totalUniqueCompanies": 164
},
"currentQuery": {
"marketId": 2
},
"data": {
"United States": 94,
"United Kingdom": 18,
"Canada": 8,
"Germany": 5,
"Australia": 4,
"France": 4,
"Netherlands": 4,
"Spain": 4,
"Israel": 3,
"India": 2,
"Italy": 2,
"South Africa": 2,
"Austria": 1,
"Bangladesh": 1,
"Colombia": 1,
"Cyprus": 1,
"Czech Republic": 1,
"Finland": 1,
"Hong Kong": 1,
"Hungary": 1,
"People's Republic of China": 1,
"Poland": 1,
"Republic of Ireland": 1,
"Russia": 1,
"Switzerland": 1,
"Turkey": 1
}
}
This endpoint is deprecated and will be removed in the future. Please use Attributes instead.
Path
string
The ID of the market which you want to retrieve countries of. This can be retrieved by searching for markets.
Response
object
object
A mapping of all countries to their number of occurrences, sorted by - descending number of occurrences, and then -
alphabetical order of the countries.
{
"meta": {
"totalItems": 26,
"totalUniqueCompanies": 164
},
"currentQuery": {
"marketId": 2
},
"data": {
"United States": 94,
"United Kingdom": 18,
"Canada": 8,
"Germany": 5,
"Australia": 4,
"France": 4,
"Netherlands": 4,
"Spain": 4,
"Israel": 3,
"India": 2,
"Italy": 2,
"South Africa": 2,
"Austria": 1,
"Bangladesh": 1,
"Colombia": 1,
"Cyprus": 1,
"Czech Republic": 1,
"Finland": 1,
"Hong Kong": 1,
"Hungary": 1,
"People's Republic of China": 1,
"Poland": 1,
"Republic of Ireland": 1,
"Russia": 1,
"Switzerland": 1,
"Turkey": 1
}
}
⌘I