curl --request POST \
--url https://api.generect.com/api/v1/search/realtime/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/realtime/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/realtime/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/realtime/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/realtime/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/realtime/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/realtime/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.04
}
}{
"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 realtime companies
Count fresh companies matching filters. Billed per request.
curl --request POST \
--url https://api.generect.com/api/v1/search/realtime/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/realtime/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/realtime/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/realtime/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/realtime/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/realtime/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/realtime/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.04
}
}{
"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 realtime companies before running a fresh company search.Pricing
This is a billable endpoint — you are charged per count request.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.
Include results_count — how many companies match the filters in total, beyond the page you asked for — in the response. Without it the response carries only the page itself. The companies counterpart of the lead-search flag of the same name, and likewise an estimate rather than an exact total.
Was this page helpful?