curl --request POST \
--url https://api.generect.com/api/v1/search/database/companies/count/ \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"industries": [
"Software Development"
],
"headcounts": [
"51-200"
],
"locations": [
"United States"
],
"limit_by": 50
}
'import requests
url = "https://api.generect.com/api/v1/search/database/companies/count/"
payload = {
"industries": ["Software Development"],
"headcounts": ["51-200"],
"locations": ["United States"],
"limit_by": 50
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
industries: ['Software Development'],
headcounts: ['51-200'],
locations: ['United States'],
limit_by: 50
})
};
fetch('https://api.generect.com/api/v1/search/database/companies/count/', 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.generect.com/api/v1/search/database/companies/count/",
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([
'industries' => [
'Software Development'
],
'headcounts' => [
'51-200'
],
'locations' => [
'United States'
],
'limit_by' => 50
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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.generect.com/api/v1/search/database/companies/count/"
payload := strings.NewReader("{\n \"industries\": [\n \"Software Development\"\n ],\n \"headcounts\": [\n \"51-200\"\n ],\n \"locations\": [\n \"United States\"\n ],\n \"limit_by\": 50\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
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.generect.com/api/v1/search/database/companies/count/")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"industries\": [\n \"Software Development\"\n ],\n \"headcounts\": [\n \"51-200\"\n ],\n \"locations\": [\n \"United States\"\n ],\n \"limit_by\": 50\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.generect.com/api/v1/search/database/companies/count/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"industries\": [\n \"Software Development\"\n ],\n \"headcounts\": [\n \"51-200\"\n ],\n \"locations\": [\n \"United States\"\n ],\n \"limit_by\": 50\n}"
response = http.request(request)
puts response.read_body{
"data": {
"results_count": 530
},
"meta": {
"amount_charged": 0
}
}{
"status": "error",
"status_code": 400,
"detail": {
"headcounts": [
"Object with name=999 does not exist."
]
}
}{
"status": "error",
"status_code": 401,
"detail": "Authentication credentials were not provided."
}{
"status": "error",
"status_code": 402,
"detail": "Insufficient funds in the account."
}{
"status": "error",
"status_code": 403,
"detail": "You do not have permission to perform this action."
}{
"status": "error",
"status_code": 429,
"detail": "Request was throttled."
}Count database companies
Count cached companies matching filters. Always free.
curl --request POST \
--url https://api.generect.com/api/v1/search/database/companies/count/ \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"industries": [
"Software Development"
],
"headcounts": [
"51-200"
],
"locations": [
"United States"
],
"limit_by": 50
}
'import requests
url = "https://api.generect.com/api/v1/search/database/companies/count/"
payload = {
"industries": ["Software Development"],
"headcounts": ["51-200"],
"locations": ["United States"],
"limit_by": 50
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
industries: ['Software Development'],
headcounts: ['51-200'],
locations: ['United States'],
limit_by: 50
})
};
fetch('https://api.generect.com/api/v1/search/database/companies/count/', 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.generect.com/api/v1/search/database/companies/count/",
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([
'industries' => [
'Software Development'
],
'headcounts' => [
'51-200'
],
'locations' => [
'United States'
],
'limit_by' => 50
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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.generect.com/api/v1/search/database/companies/count/"
payload := strings.NewReader("{\n \"industries\": [\n \"Software Development\"\n ],\n \"headcounts\": [\n \"51-200\"\n ],\n \"locations\": [\n \"United States\"\n ],\n \"limit_by\": 50\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
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.generect.com/api/v1/search/database/companies/count/")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"industries\": [\n \"Software Development\"\n ],\n \"headcounts\": [\n \"51-200\"\n ],\n \"locations\": [\n \"United States\"\n ],\n \"limit_by\": 50\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.generect.com/api/v1/search/database/companies/count/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"industries\": [\n \"Software Development\"\n ],\n \"headcounts\": [\n \"51-200\"\n ],\n \"locations\": [\n \"United States\"\n ],\n \"limit_by\": 50\n}"
response = http.request(request)
puts response.read_body{
"data": {
"results_count": 530
},
"meta": {
"amount_charged": 0
}
}{
"status": "error",
"status_code": 400,
"detail": {
"headcounts": [
"Object with name=999 does not exist."
]
}
}{
"status": "error",
"status_code": 401,
"detail": "Authentication credentials were not provided."
}{
"status": "error",
"status_code": 402,
"detail": "Insufficient funds in the account."
}{
"status": "error",
"status_code": 403,
"detail": "You do not have permission to perform this action."
}{
"status": "error",
"status_code": 429,
"detail": "Request was throttled."
}Use Case:
Count matching cached companies before running a database company search.Pricing
This endpoint is free — it does not incur any charges.Authorizations
Body
Controls how the industries filter maps onto LinkedIn's industry taxonomy. By default (false), a selected industry also matches companies in its sub-industries. Set to true to match only the industries you specify and exclude their sub-industries, for finer sub-category targeting — for example, "Manufacturing" without "Chemicals".
Apply Generect's blocked-domain list, which removes staffing agencies, directories and similar low-signal records that match broad industry filters. Set to false to receive them. On by default on the company search endpoints, in both database and realtime mode; the company-leads endpoints do not apply it. In database search the exclusion happens before results_count, so the count always matches what the pages can deliver; in realtime the records are dropped after retrieval, so a page may hold fewer companies than results_count implies.
Also return companies that have a LinkedIn page but no website, such as many hospitals, clinics and local businesses. Off by default: the company search endpoints drop every company without a website, in both database and realtime mode. Such a company has no website and no domain, so there are no corporate emails to find for its people and lead matching by domain does not work for it; an exclude_domains entry cannot remove it (use exclude_ids). Each one is returned and billed as a result like any other, and many of them have few or no leads on LinkedIn. The other quality rules stay: a company with zero employees on LinkedIn is still dropped, and the blocked-domain list still applies to companies that have a website. In database search these companies are counted in results_count; the realtime count comes from LinkedIn and always included them. The company-leads endpoints do not read it.
Row shape. full (the default) returns full rows, billed per row. thin returns the company's name, industry, size and location at no charge, up to a daily quota per account (currently 2,000 rows per UTC day); a thin row has no domain, website, LinkedIn URL or contacts. A spent quota is refused with 429 until 00:00 UTC, never billed. Accounts on a custom API contract get 400 unless their contract includes thin search. The count endpoints ignore this field: counts are always free.
full, thin Founding year of the company — the "company age" filter. Accepts either an explicit list of years, or a {"min", "max"} range of founding years; both bounds are inclusive and either may be omitted (an omitted max means "up to the current year").
Database mode only. Realtime company search has no founded-year facet upstream, so it rejects this field rather than accepting it and returning a wider result set than you asked for.
Coverage matters here: the founding year is known for roughly 57% of companies, and a company without one never matches. Filtering by company age therefore also drops records that simply lack the data, not only those outside your range.
{ "min": 2010, "max": 2020 }
Was this page helpful?