Search Existing Markets
curl --request POST \
--url https://api.forestreet.com/markets/search \
--header 'Content-Type: application/json' \
--data '
{
"keyword": "<string>",
"company": "<string>",
"marketId": 123,
"hsCode": [
{}
],
"page": 123,
"itemsPerPage": 123,
"collectionId": 123
}
'import requests
url = "https://api.forestreet.com/markets/search"
payload = {
"keyword": "<string>",
"company": "<string>",
"marketId": 123,
"hsCode": [{}],
"page": 123,
"itemsPerPage": 123,
"collectionId": 123
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
keyword: '<string>',
company: '<string>',
marketId: 123,
hsCode: [{}],
page: 123,
itemsPerPage: 123,
collectionId: 123
})
};
fetch('https://api.forestreet.com/markets/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.forestreet.com/markets/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'keyword' => '<string>',
'company' => '<string>',
'marketId' => 123,
'hsCode' => [
[
]
],
'page' => 123,
'itemsPerPage' => 123,
'collectionId' => 123
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.forestreet.com/markets/search"
payload := strings.NewReader("{\n \"keyword\": \"<string>\",\n \"company\": \"<string>\",\n \"marketId\": 123,\n \"hsCode\": [\n {}\n ],\n \"page\": 123,\n \"itemsPerPage\": 123,\n \"collectionId\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.forestreet.com/markets/search")
.header("Content-Type", "application/json")
.body("{\n \"keyword\": \"<string>\",\n \"company\": \"<string>\",\n \"marketId\": 123,\n \"hsCode\": [\n {}\n ],\n \"page\": 123,\n \"itemsPerPage\": 123,\n \"collectionId\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.forestreet.com/markets/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"keyword\": \"<string>\",\n \"company\": \"<string>\",\n \"marketId\": 123,\n \"hsCode\": [\n {}\n ],\n \"page\": 123,\n \"itemsPerPage\": 123,\n \"collectionId\": 123\n}"
response = http.request(request)
puts response.read_body{
"meta": {
"currentPage": 1,
"itemsPerPage": 25,
"totalItems": 13,
"totalPages": 1,
"collectionId": 123,
},
"data": {
"_id": "6690ff4679b5056b6bedfab3",
"marketId": 4815,
"name": "Stainless Steel Manufacturers",
"subtitle": "Stainless Steel Manufacturers",
"description": "Externally created study",
"headerImageUrl": "https://ailsa-study-thumbnails.s3.eu-west-2.amazonaws.com/default-thumbnail%402x.jpg",
"companyCount": 30,
"hsCodes": [
"7202",
"7218",
"7221",
"7222",
"7223",
"7224",
"7225",
"7226"
],
"topMeanScore": 0.84506,
"createdAt": "2024-07-12T09:57:27.000Z",
"versionDate": "2024-07-12T10:02:46.976Z",
"searchCriteria": [
{
"marketName": "Stainless Steel Manufacturers",
"countries": [
"all"
],
"keywords": [
"SHS",
"UC",
"Universal Beam",
"Structural Steel",
"S275",
"S355"
],
"createdAt": "2024-07-12T09:57:27.540Z"
},
{
"marketName": "Stainless Steel Manufacturers",
"countries": [
"all"
],
"keywords": [
"Stainless steel production"
],
"createdAt": "2024-05-15T12:50:28.396Z"
}
]
}
}
Markets
Search Existing Markets
Search the list of available markets.
POST
/
markets
/
search
Search Existing Markets
curl --request POST \
--url https://api.forestreet.com/markets/search \
--header 'Content-Type: application/json' \
--data '
{
"keyword": "<string>",
"company": "<string>",
"marketId": 123,
"hsCode": [
{}
],
"page": 123,
"itemsPerPage": 123,
"collectionId": 123
}
'import requests
url = "https://api.forestreet.com/markets/search"
payload = {
"keyword": "<string>",
"company": "<string>",
"marketId": 123,
"hsCode": [{}],
"page": 123,
"itemsPerPage": 123,
"collectionId": 123
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
keyword: '<string>',
company: '<string>',
marketId: 123,
hsCode: [{}],
page: 123,
itemsPerPage: 123,
collectionId: 123
})
};
fetch('https://api.forestreet.com/markets/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.forestreet.com/markets/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'keyword' => '<string>',
'company' => '<string>',
'marketId' => 123,
'hsCode' => [
[
]
],
'page' => 123,
'itemsPerPage' => 123,
'collectionId' => 123
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.forestreet.com/markets/search"
payload := strings.NewReader("{\n \"keyword\": \"<string>\",\n \"company\": \"<string>\",\n \"marketId\": 123,\n \"hsCode\": [\n {}\n ],\n \"page\": 123,\n \"itemsPerPage\": 123,\n \"collectionId\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.forestreet.com/markets/search")
.header("Content-Type", "application/json")
.body("{\n \"keyword\": \"<string>\",\n \"company\": \"<string>\",\n \"marketId\": 123,\n \"hsCode\": [\n {}\n ],\n \"page\": 123,\n \"itemsPerPage\": 123,\n \"collectionId\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.forestreet.com/markets/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"keyword\": \"<string>\",\n \"company\": \"<string>\",\n \"marketId\": 123,\n \"hsCode\": [\n {}\n ],\n \"page\": 123,\n \"itemsPerPage\": 123,\n \"collectionId\": 123\n}"
response = http.request(request)
puts response.read_body{
"meta": {
"currentPage": 1,
"itemsPerPage": 25,
"totalItems": 13,
"totalPages": 1,
"collectionId": 123,
},
"data": {
"_id": "6690ff4679b5056b6bedfab3",
"marketId": 4815,
"name": "Stainless Steel Manufacturers",
"subtitle": "Stainless Steel Manufacturers",
"description": "Externally created study",
"headerImageUrl": "https://ailsa-study-thumbnails.s3.eu-west-2.amazonaws.com/default-thumbnail%402x.jpg",
"companyCount": 30,
"hsCodes": [
"7202",
"7218",
"7221",
"7222",
"7223",
"7224",
"7225",
"7226"
],
"topMeanScore": 0.84506,
"createdAt": "2024-07-12T09:57:27.000Z",
"versionDate": "2024-07-12T10:02:46.976Z",
"searchCriteria": [
{
"marketName": "Stainless Steel Manufacturers",
"countries": [
"all"
],
"keywords": [
"SHS",
"UC",
"Universal Beam",
"Structural Steel",
"S275",
"S355"
],
"createdAt": "2024-07-12T09:57:27.540Z"
},
{
"marketName": "Stainless Steel Manufacturers",
"countries": [
"all"
],
"keywords": [
"Stainless steel production"
],
"createdAt": "2024-05-15T12:50:28.396Z"
}
]
}
}
Body Request Object Example
{
"page": 1,
"itemsPerPage": 5,
"keyword": "",
"collectionId": 123
}
Body
The Regular Expression string to search for a phrase or keyword within a Market’s name, description, or subtitle.With a few notable exceptions below, this value can be treated as a case-insensitive string search for the market title.Special Characters:
(Foo)- Due to these being capture groups in Regex, these will need to be escaped as\\(Some Text\\)if you want to search for literal(). Actual capture groups are not used by this endpoint, however you can still use them to define group patterns, such as(Stainless )?Steel (Manufacturer|Supplier).[Foo]- Character Class. Square brackets are used to define a character class, which allows you to match any one of the characters inside the brackets. For example,[abc]matches eithera,b, orc. If you want to search literal[Foo], escape the query as\\[Foo\\].{Foo}-Quantifier. Curly braces are used as quantifiers to specify the number of times an element should be matched. For example,a{2,3}matches the letteraif it appears 2 or 3 times. To search for literal{Foo}, use\\{\\}.
[] or {}.The string to search for a phrase or keyword within a Company’s name, domain, or dunsNumber. If both
keyword and
company are provided, it will prioritise company search.If you would data about a specific market, you can pass the marketId here.
An array of HS Codes to filter the markets by.
The page to return from the paginated results
The number of markets to return per page
The collection to search in.If not specified, the user’s default collection will be used.
Response
Pagination details and metadata about the search results.
Show meta
Show meta
The current page number.
The number of items per page.
The total number of items in the search results.
The total number of pages in the search results.
The collection that this search was performed in.This will still be provided if no
collectionId was given
as parameter, for the purpose of validation.The body of the search response.
Show marketData
Show marketData
Forestreet internal identifier for the market data.
The unique identifier for the market.
The name of the market.
The subtitle of the market.
A brief description of the market, if the user had specified any.
The URL pointing to the market’s header image.
The total number of companies in the market.
An array of HS Codes associated with the market.These may not be populuated in earlier markets.
The confidence score for the study. This is calculated by taking the
mean of the top half of all confidence scores in the study.This value can range from -1 to 3; but in practice it can be capped to
0 to 1 as values outside of this range are only meaningful academically.This may not be populuated in earlier markets.
The date when the market was originally created.
The date when the market was last updated.
An array of search criteria used to create the market.As markets could be manually merged, this provides a way to keep track of
the original searches that were used to create the market, e.g. to understand
if a keyword had been searched for a specific country.
Show searchCriteria
Show searchCriteria
The name of the market as provided for this search.
The role of the market as provided for this search.The current 4 possible values are:
manufacturerdistributorservice providerconsultant
Some markets were created before the market role feature was introduced. The market role for these markets
would have been inferred from the market name after the fact - they would not have contributed to the search.
A generic
provider is sometimes used on older markets. This is no longer an acceptable input value for marketRole.An array of countries associated with this search instance.
An array of keywords associated with this search instance.
The date when this particular search was performed.
{
"meta": {
"currentPage": 1,
"itemsPerPage": 25,
"totalItems": 13,
"totalPages": 1,
"collectionId": 123,
},
"data": {
"_id": "6690ff4679b5056b6bedfab3",
"marketId": 4815,
"name": "Stainless Steel Manufacturers",
"subtitle": "Stainless Steel Manufacturers",
"description": "Externally created study",
"headerImageUrl": "https://ailsa-study-thumbnails.s3.eu-west-2.amazonaws.com/default-thumbnail%402x.jpg",
"companyCount": 30,
"hsCodes": [
"7202",
"7218",
"7221",
"7222",
"7223",
"7224",
"7225",
"7226"
],
"topMeanScore": 0.84506,
"createdAt": "2024-07-12T09:57:27.000Z",
"versionDate": "2024-07-12T10:02:46.976Z",
"searchCriteria": [
{
"marketName": "Stainless Steel Manufacturers",
"countries": [
"all"
],
"keywords": [
"SHS",
"UC",
"Universal Beam",
"Structural Steel",
"S275",
"S355"
],
"createdAt": "2024-07-12T09:57:27.540Z"
},
{
"marketName": "Stainless Steel Manufacturers",
"countries": [
"all"
],
"keywords": [
"Stainless steel production"
],
"createdAt": "2024-05-15T12:50:28.396Z"
}
]
}
}
⌘I