Company Search
Search Companies
Search companies with filters in a JSON body (POST variant).
POST
/
v1
/
companies
/
search
Search Companies
curl --request POST \
--url https://api.extruct.ai/v1/companies/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"q": "<string>",
"filters": {
"include": {
"size": [],
"country": [
"<string>"
],
"city": [
"<string>"
]
},
"exclude": {
"size": [],
"country": [
"<string>"
],
"city": [
"<string>"
],
"domains": [
"<string>"
]
},
"range": {
"founded": {
"min": 123,
"max": 123
}
}
},
"pagination": {
"offset": 123,
"limit": 123
}
}
'import requests
url = "https://api.extruct.ai/v1/companies/search"
payload = {
"q": "<string>",
"filters": {
"include": {
"size": [],
"country": ["<string>"],
"city": ["<string>"]
},
"exclude": {
"size": [],
"country": ["<string>"],
"city": ["<string>"],
"domains": ["<string>"]
},
"range": { "founded": {
"min": 123,
"max": 123
} }
},
"pagination": {
"offset": 123,
"limit": 123
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
q: '<string>',
filters: {
include: {size: [], country: ['<string>'], city: ['<string>']},
exclude: {size: [], country: ['<string>'], city: ['<string>'], domains: ['<string>']},
range: {founded: {min: 123, max: 123}}
},
pagination: {offset: 123, limit: 123}
})
};
fetch('https://api.extruct.ai/v1/companies/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.extruct.ai/v1/companies/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([
'q' => '<string>',
'filters' => [
'include' => [
'size' => [
],
'country' => [
'<string>'
],
'city' => [
'<string>'
]
],
'exclude' => [
'size' => [
],
'country' => [
'<string>'
],
'city' => [
'<string>'
],
'domains' => [
'<string>'
]
],
'range' => [
'founded' => [
'min' => 123,
'max' => 123
]
]
],
'pagination' => [
'offset' => 123,
'limit' => 123
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.extruct.ai/v1/companies/search"
payload := strings.NewReader("{\n \"q\": \"<string>\",\n \"filters\": {\n \"include\": {\n \"size\": [],\n \"country\": [\n \"<string>\"\n ],\n \"city\": [\n \"<string>\"\n ]\n },\n \"exclude\": {\n \"size\": [],\n \"country\": [\n \"<string>\"\n ],\n \"city\": [\n \"<string>\"\n ],\n \"domains\": [\n \"<string>\"\n ]\n },\n \"range\": {\n \"founded\": {\n \"min\": 123,\n \"max\": 123\n }\n }\n },\n \"pagination\": {\n \"offset\": 123,\n \"limit\": 123\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.extruct.ai/v1/companies/search")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"q\": \"<string>\",\n \"filters\": {\n \"include\": {\n \"size\": [],\n \"country\": [\n \"<string>\"\n ],\n \"city\": [\n \"<string>\"\n ]\n },\n \"exclude\": {\n \"size\": [],\n \"country\": [\n \"<string>\"\n ],\n \"city\": [\n \"<string>\"\n ],\n \"domains\": [\n \"<string>\"\n ]\n },\n \"range\": {\n \"founded\": {\n \"min\": 123,\n \"max\": 123\n }\n }\n },\n \"pagination\": {\n \"offset\": 123,\n \"limit\": 123\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.extruct.ai/v1/companies/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"q\": \"<string>\",\n \"filters\": {\n \"include\": {\n \"size\": [],\n \"country\": [\n \"<string>\"\n ],\n \"city\": [\n \"<string>\"\n ]\n },\n \"exclude\": {\n \"size\": [],\n \"country\": [\n \"<string>\"\n ],\n \"city\": [\n \"<string>\"\n ],\n \"domains\": [\n \"<string>\"\n ]\n },\n \"range\": {\n \"founded\": {\n \"min\": 123,\n \"max\": 123\n }\n }\n },\n \"pagination\": {\n \"offset\": 123,\n \"limit\": 123\n }\n}"
response = http.request(request)
puts response.read_body{
"results": [
{
"id": "<string>",
"domain": "<string>",
"name": "<string>",
"short_description": "<string>",
"full_description": "<string>",
"products_services": "<string>",
"use_cases": "<string>",
"target_audience": "<string>",
"other_considerations": "<string>",
"founding_year": 123,
"employee_count": "<string>",
"hq_country": "<string>",
"hq_state_province": "<string>",
"hq_city": "<string>",
"hq_full_address": "<string>",
"social_profiles": {},
"website_authority": {
"score": 123,
"tier": "<string>",
"tier_label": "<string>"
},
"relevance_score": 123
}
],
"request": {
"offset": 123,
"limit": 123,
"query": "<string>",
"filters": {
"include": {
"size": [],
"country": [
"<string>"
],
"city": [
"<string>"
]
},
"exclude": {
"size": [],
"country": [
"<string>"
],
"city": [
"<string>"
],
"domains": [
"<string>"
]
},
"range": {
"founded": {
"min": 123,
"max": 123
}
}
}
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Overview
ThePOST variant of Semantic Search takes the same parameters in a JSON body, with filters as a native object instead of a URL-encoded string. Use it when an exclude.domains list is too large to fit a GET URL.
Example request
export EXTRUCT_API_TOKEN="YOUR_API_TOKEN"
curl -X POST "https://api.extruct.ai/v1/companies/search" \
-H "Authorization: Bearer ${EXTRUCT_API_TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"q": "b2b treasury automation",
"filters": {
"include": {"country": ["United States"], "size": ["51-200"]},
"exclude": {"domains": ["stripe.com", "adyen.com"]}
},
"pagination": {"offset": 0, "limit": 20}
}'
Key parameters
q(required): Natural-language query.filters(optional): SearchFilters as a JSON object. See Search Filters Reference.pagination(optional):{ "offset": <int>, "limit": <int> };limitup to250per request.
Endpoint behavior
- Identical ranking and results to
GET /v1/companies/search; only the transport differs. - Prefer
POSTwhenexclude.domainsis large; otherwise either method works. - A single request returns at most
250results. Page withpagination.offsetto read deeper: paid plans (Starter, Pro) can reach up to2,000results per query; the free tier is capped at25.
Success signal
Returnsresults and request metadata, the same shape as the GET endpoint. Reuse results[].id or results[].domain as downstream identifiers.
Common errors
401 Unauthorized
Check that your header is Authorization: Bearer ${EXTRUCT_API_TOKEN}.
422 Unprocessable Entity
An invalid domain in exclude.domains, more than 1000 domains after de-duplication, or a malformed body. Validate before sending:
echo '<body-json>' | jq empty
Related endpoints
Related guides
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Previous
Find Similar CompaniesFind similar companies with filters in a JSON body (POST variant).
Next
⌘I
Search Companies
curl --request POST \
--url https://api.extruct.ai/v1/companies/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"q": "<string>",
"filters": {
"include": {
"size": [],
"country": [
"<string>"
],
"city": [
"<string>"
]
},
"exclude": {
"size": [],
"country": [
"<string>"
],
"city": [
"<string>"
],
"domains": [
"<string>"
]
},
"range": {
"founded": {
"min": 123,
"max": 123
}
}
},
"pagination": {
"offset": 123,
"limit": 123
}
}
'import requests
url = "https://api.extruct.ai/v1/companies/search"
payload = {
"q": "<string>",
"filters": {
"include": {
"size": [],
"country": ["<string>"],
"city": ["<string>"]
},
"exclude": {
"size": [],
"country": ["<string>"],
"city": ["<string>"],
"domains": ["<string>"]
},
"range": { "founded": {
"min": 123,
"max": 123
} }
},
"pagination": {
"offset": 123,
"limit": 123
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
q: '<string>',
filters: {
include: {size: [], country: ['<string>'], city: ['<string>']},
exclude: {size: [], country: ['<string>'], city: ['<string>'], domains: ['<string>']},
range: {founded: {min: 123, max: 123}}
},
pagination: {offset: 123, limit: 123}
})
};
fetch('https://api.extruct.ai/v1/companies/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.extruct.ai/v1/companies/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([
'q' => '<string>',
'filters' => [
'include' => [
'size' => [
],
'country' => [
'<string>'
],
'city' => [
'<string>'
]
],
'exclude' => [
'size' => [
],
'country' => [
'<string>'
],
'city' => [
'<string>'
],
'domains' => [
'<string>'
]
],
'range' => [
'founded' => [
'min' => 123,
'max' => 123
]
]
],
'pagination' => [
'offset' => 123,
'limit' => 123
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.extruct.ai/v1/companies/search"
payload := strings.NewReader("{\n \"q\": \"<string>\",\n \"filters\": {\n \"include\": {\n \"size\": [],\n \"country\": [\n \"<string>\"\n ],\n \"city\": [\n \"<string>\"\n ]\n },\n \"exclude\": {\n \"size\": [],\n \"country\": [\n \"<string>\"\n ],\n \"city\": [\n \"<string>\"\n ],\n \"domains\": [\n \"<string>\"\n ]\n },\n \"range\": {\n \"founded\": {\n \"min\": 123,\n \"max\": 123\n }\n }\n },\n \"pagination\": {\n \"offset\": 123,\n \"limit\": 123\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.extruct.ai/v1/companies/search")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"q\": \"<string>\",\n \"filters\": {\n \"include\": {\n \"size\": [],\n \"country\": [\n \"<string>\"\n ],\n \"city\": [\n \"<string>\"\n ]\n },\n \"exclude\": {\n \"size\": [],\n \"country\": [\n \"<string>\"\n ],\n \"city\": [\n \"<string>\"\n ],\n \"domains\": [\n \"<string>\"\n ]\n },\n \"range\": {\n \"founded\": {\n \"min\": 123,\n \"max\": 123\n }\n }\n },\n \"pagination\": {\n \"offset\": 123,\n \"limit\": 123\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.extruct.ai/v1/companies/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"q\": \"<string>\",\n \"filters\": {\n \"include\": {\n \"size\": [],\n \"country\": [\n \"<string>\"\n ],\n \"city\": [\n \"<string>\"\n ]\n },\n \"exclude\": {\n \"size\": [],\n \"country\": [\n \"<string>\"\n ],\n \"city\": [\n \"<string>\"\n ],\n \"domains\": [\n \"<string>\"\n ]\n },\n \"range\": {\n \"founded\": {\n \"min\": 123,\n \"max\": 123\n }\n }\n },\n \"pagination\": {\n \"offset\": 123,\n \"limit\": 123\n }\n}"
response = http.request(request)
puts response.read_body{
"results": [
{
"id": "<string>",
"domain": "<string>",
"name": "<string>",
"short_description": "<string>",
"full_description": "<string>",
"products_services": "<string>",
"use_cases": "<string>",
"target_audience": "<string>",
"other_considerations": "<string>",
"founding_year": 123,
"employee_count": "<string>",
"hq_country": "<string>",
"hq_state_province": "<string>",
"hq_city": "<string>",
"hq_full_address": "<string>",
"social_profiles": {},
"website_authority": {
"score": 123,
"tier": "<string>",
"tier_label": "<string>"
},
"relevance_score": 123
}
],
"request": {
"offset": 123,
"limit": 123,
"query": "<string>",
"filters": {
"include": {
"size": [],
"country": [
"<string>"
],
"city": [
"<string>"
]
},
"exclude": {
"size": [],
"country": [
"<string>"
],
"city": [
"<string>"
],
"domains": [
"<string>"
]
},
"range": {
"founded": {
"min": 123,
"max": 123
}
}
}
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}