Company Count
curl --request POST \
--url https://api.revenuebase.ai/v2/contact/company/count \
--header 'Content-Type: application/json' \
--header 'X-Key: <api-key>' \
--data '
{
"filter": {
"type": "group",
"op": "AND",
"children": [
{
"type": "condition",
"column": "HEADQUARTERS_COUNTRY_NAME_ORG",
"operator": "eq",
"value": "United States"
}
]
}
}
'import requests
url = "https://api.revenuebase.ai/v2/contact/company/count"
payload = { "filter": {
"type": "group",
"op": "AND",
"children": [
{
"type": "condition",
"column": "HEADQUARTERS_COUNTRY_NAME_ORG",
"operator": "eq",
"value": "United States"
}
]
} }
headers = {
"X-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
filter: {
type: 'group',
op: 'AND',
children: [
{
type: 'condition',
column: 'HEADQUARTERS_COUNTRY_NAME_ORG',
operator: 'eq',
value: 'United States'
}
]
}
})
};
fetch('https://api.revenuebase.ai/v2/contact/company/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.revenuebase.ai/v2/contact/company/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([
'filter' => [
'type' => 'group',
'op' => 'AND',
'children' => [
[
'type' => 'condition',
'column' => 'HEADQUARTERS_COUNTRY_NAME_ORG',
'operator' => 'eq',
'value' => 'United States'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Key: <api-key>"
],
]);
$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.revenuebase.ai/v2/contact/company/count"
payload := strings.NewReader("{\n \"filter\": {\n \"type\": \"group\",\n \"op\": \"AND\",\n \"children\": [\n {\n \"type\": \"condition\",\n \"column\": \"HEADQUARTERS_COUNTRY_NAME_ORG\",\n \"operator\": \"eq\",\n \"value\": \"United States\"\n }\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Key", "<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.revenuebase.ai/v2/contact/company/count")
.header("X-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"filter\": {\n \"type\": \"group\",\n \"op\": \"AND\",\n \"children\": [\n {\n \"type\": \"condition\",\n \"column\": \"HEADQUARTERS_COUNTRY_NAME_ORG\",\n \"operator\": \"eq\",\n \"value\": \"United States\"\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.revenuebase.ai/v2/contact/company/count")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"filter\": {\n \"type\": \"group\",\n \"op\": \"AND\",\n \"children\": [\n {\n \"type\": \"condition\",\n \"column\": \"HEADQUARTERS_COUNTRY_NAME_ORG\",\n \"operator\": \"eq\",\n \"value\": \"United States\"\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"companies": 7042375,
"contacts": 123034089,
"contactsWithEmail": 28863408,
"contactsWithCellphone": 36525227
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Company Endpoints
Company Count
Find the number of companies in an audience and the contact coverage at those companies.
POST
/
company
/
count
Company Count
curl --request POST \
--url https://api.revenuebase.ai/v2/contact/company/count \
--header 'Content-Type: application/json' \
--header 'X-Key: <api-key>' \
--data '
{
"filter": {
"type": "group",
"op": "AND",
"children": [
{
"type": "condition",
"column": "HEADQUARTERS_COUNTRY_NAME_ORG",
"operator": "eq",
"value": "United States"
}
]
}
}
'import requests
url = "https://api.revenuebase.ai/v2/contact/company/count"
payload = { "filter": {
"type": "group",
"op": "AND",
"children": [
{
"type": "condition",
"column": "HEADQUARTERS_COUNTRY_NAME_ORG",
"operator": "eq",
"value": "United States"
}
]
} }
headers = {
"X-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
filter: {
type: 'group',
op: 'AND',
children: [
{
type: 'condition',
column: 'HEADQUARTERS_COUNTRY_NAME_ORG',
operator: 'eq',
value: 'United States'
}
]
}
})
};
fetch('https://api.revenuebase.ai/v2/contact/company/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.revenuebase.ai/v2/contact/company/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([
'filter' => [
'type' => 'group',
'op' => 'AND',
'children' => [
[
'type' => 'condition',
'column' => 'HEADQUARTERS_COUNTRY_NAME_ORG',
'operator' => 'eq',
'value' => 'United States'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Key: <api-key>"
],
]);
$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.revenuebase.ai/v2/contact/company/count"
payload := strings.NewReader("{\n \"filter\": {\n \"type\": \"group\",\n \"op\": \"AND\",\n \"children\": [\n {\n \"type\": \"condition\",\n \"column\": \"HEADQUARTERS_COUNTRY_NAME_ORG\",\n \"operator\": \"eq\",\n \"value\": \"United States\"\n }\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Key", "<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.revenuebase.ai/v2/contact/company/count")
.header("X-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"filter\": {\n \"type\": \"group\",\n \"op\": \"AND\",\n \"children\": [\n {\n \"type\": \"condition\",\n \"column\": \"HEADQUARTERS_COUNTRY_NAME_ORG\",\n \"operator\": \"eq\",\n \"value\": \"United States\"\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.revenuebase.ai/v2/contact/company/count")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"filter\": {\n \"type\": \"group\",\n \"op\": \"AND\",\n \"children\": [\n {\n \"type\": \"condition\",\n \"column\": \"HEADQUARTERS_COUNTRY_NAME_ORG\",\n \"operator\": \"eq\",\n \"value\": \"United States\"\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"companies": 7042375,
"contacts": 123034089,
"contactsWithEmail": 28863408,
"contactsWithCellphone": 36525227
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Credits and plans
PAYG is Pay-as-you-go. AYCE is All-you-can-eat.| Usage | PAYG | AYCE |
|---|---|---|
| Count, including SmartSearch | Free 0 credits | Free 0 credits |
RBID_ORG. If you need company fields alongside individual people, contact records already include their available company data; requesting those fields does not add a separate company-row charge.
When to use Company Count
- Size a company audience before retrieving rows.
- Compare company criteria without spending credits.
- Count distinct companies represented by contacts who meet job or person criteria.
Example
SetREVENUEBASE_API_KEY to your API key.
curl --request POST 'https://api.revenuebase.ai/v2/contact/company/count' \
--header "X-Key: $REVENUEBASE_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"filter": {
"type": "group",
"op": "AND",
"children": [
{
"type": "condition",
"column": "HEADQUARTERS_COUNTRY_NAME_ORG",
"operator": "eq",
"value": "United States"
}
]
}
}'
{
"companies": 7042375,
"contacts": 123034089,
"contactsWithEmail": 28863408,
"contactsWithCellphone": 36525227
}
Read the result
| Field | Meaning |
|---|---|
companies | Exact number of matching companies. |
contacts | Total contact rows at the selected companies, when available. |
contactsWithEmail | Contacts with an email at those companies, when available. |
contactsWithCellphone | Contacts with a mobile at those companies, when available. |
Options and limits
Reuse the filter for Company Export. Company Count accepts company and contact criteria.mode is accepted for compatibility with Contact Count but does not change the result: company counts are exact. Omitting filter searches the whole company dataset.
Errors and retries
Correct unsupported fields or filters before retrying a 400 or 422 response. If a 429 response is returned, wait for Retry-After. Contact and company routes share the default 10 requests per second per user.Next steps
Company Preview returns a small inline list using company criteria. For a company list selected by person or job conditions, use Company Estimate and Company Export.Authorizations
Body
application/json
Response
Successful Response
The response is of type Response Company Count V1 Company Count Post · object.
Was this page helpful?
