Estimate Company Export
curl --request POST \
--url https://api.revenuebase.ai/v2/contact/company/exports/estimate \
--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"
}
]
},
"columns": [
"RBID_ORG",
"COMPANY_NAME_ORG",
"DOMAIN_ORG"
],
"format": "csv",
"compression": "none",
"maxRows": 100,
"filename": "us-companies"
}
'import requests
url = "https://api.revenuebase.ai/v2/contact/company/exports/estimate"
payload = {
"filter": {
"type": "group",
"op": "AND",
"children": [
{
"type": "condition",
"column": "HEADQUARTERS_COUNTRY_NAME_ORG",
"operator": "eq",
"value": "United States"
}
]
},
"columns": ["RBID_ORG", "COMPANY_NAME_ORG", "DOMAIN_ORG"],
"format": "csv",
"compression": "none",
"maxRows": 100,
"filename": "us-companies"
}
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'
}
]
},
columns: ['RBID_ORG', 'COMPANY_NAME_ORG', 'DOMAIN_ORG'],
format: 'csv',
compression: 'none',
maxRows: 100,
filename: 'us-companies'
})
};
fetch('https://api.revenuebase.ai/v2/contact/company/exports/estimate', 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/exports/estimate",
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'
]
]
],
'columns' => [
'RBID_ORG',
'COMPANY_NAME_ORG',
'DOMAIN_ORG'
],
'format' => 'csv',
'compression' => 'none',
'maxRows' => 100,
'filename' => 'us-companies'
]),
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/exports/estimate"
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 \"columns\": [\n \"RBID_ORG\",\n \"COMPANY_NAME_ORG\",\n \"DOMAIN_ORG\"\n ],\n \"format\": \"csv\",\n \"compression\": \"none\",\n \"maxRows\": 100,\n \"filename\": \"us-companies\"\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/exports/estimate")
.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 \"columns\": [\n \"RBID_ORG\",\n \"COMPANY_NAME_ORG\",\n \"DOMAIN_ORG\"\n ],\n \"format\": \"csv\",\n \"compression\": \"none\",\n \"maxRows\": 100,\n \"filename\": \"us-companies\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.revenuebase.ai/v2/contact/company/exports/estimate")
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 \"columns\": [\n \"RBID_ORG\",\n \"COMPANY_NAME_ORG\",\n \"DOMAIN_ORG\"\n ],\n \"format\": \"csv\",\n \"compression\": \"none\",\n \"maxRows\": 100,\n \"filename\": \"us-companies\"\n}"
response = http.request(request)
puts response.read_body{
"creditsEstimate": 100
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Company Endpoints
Estimate Company Export
Forecast the credit cost of a company file before starting its export job.
POST
/
company
/
exports
/
estimate
Estimate Company Export
curl --request POST \
--url https://api.revenuebase.ai/v2/contact/company/exports/estimate \
--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"
}
]
},
"columns": [
"RBID_ORG",
"COMPANY_NAME_ORG",
"DOMAIN_ORG"
],
"format": "csv",
"compression": "none",
"maxRows": 100,
"filename": "us-companies"
}
'import requests
url = "https://api.revenuebase.ai/v2/contact/company/exports/estimate"
payload = {
"filter": {
"type": "group",
"op": "AND",
"children": [
{
"type": "condition",
"column": "HEADQUARTERS_COUNTRY_NAME_ORG",
"operator": "eq",
"value": "United States"
}
]
},
"columns": ["RBID_ORG", "COMPANY_NAME_ORG", "DOMAIN_ORG"],
"format": "csv",
"compression": "none",
"maxRows": 100,
"filename": "us-companies"
}
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'
}
]
},
columns: ['RBID_ORG', 'COMPANY_NAME_ORG', 'DOMAIN_ORG'],
format: 'csv',
compression: 'none',
maxRows: 100,
filename: 'us-companies'
})
};
fetch('https://api.revenuebase.ai/v2/contact/company/exports/estimate', 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/exports/estimate",
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'
]
]
],
'columns' => [
'RBID_ORG',
'COMPANY_NAME_ORG',
'DOMAIN_ORG'
],
'format' => 'csv',
'compression' => 'none',
'maxRows' => 100,
'filename' => 'us-companies'
]),
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/exports/estimate"
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 \"columns\": [\n \"RBID_ORG\",\n \"COMPANY_NAME_ORG\",\n \"DOMAIN_ORG\"\n ],\n \"format\": \"csv\",\n \"compression\": \"none\",\n \"maxRows\": 100,\n \"filename\": \"us-companies\"\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/exports/estimate")
.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 \"columns\": [\n \"RBID_ORG\",\n \"COMPANY_NAME_ORG\",\n \"DOMAIN_ORG\"\n ],\n \"format\": \"csv\",\n \"compression\": \"none\",\n \"maxRows\": 100,\n \"filename\": \"us-companies\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.revenuebase.ai/v2/contact/company/exports/estimate")
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 \"columns\": [\n \"RBID_ORG\",\n \"COMPANY_NAME_ORG\",\n \"DOMAIN_ORG\"\n ],\n \"format\": \"csv\",\n \"compression\": \"none\",\n \"maxRows\": 100,\n \"filename\": \"us-companies\"\n}"
response = http.request(request)
puts response.read_body{
"creditsEstimate": 100
}{
"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 |
|---|---|---|
| Estimate; no job or hold | Free 0 credits | Free 0 credits |
When to use Company Estimate
Check a proposed company file before reserving credits. Send the same filter, columns, format, compression, and maxRows you intend to use for Company Export.Example
SetREVENUEBASE_API_KEY to your API key.
curl --request POST 'https://api.revenuebase.ai/v2/contact/company/exports/estimate' \
--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"
}
]
},
"columns": [
"RBID_ORG",
"COMPANY_NAME_ORG",
"DOMAIN_ORG"
],
"format": "csv",
"compression": "none",
"maxRows": 100,
"filename": "us-companies"
}'
{
"creditsEstimate": 100
}
Read the forecast
creditsEstimate is the amount the service would reserve for this PAYG request. It is null when export metering does not apply, including AYCE. The call creates no export job and reserves no credits.
The PAYG chart is 1 credit per company row, plus 10 per SmartSearch filter node per request. Selected company fields do not add contact email/mobile reveal charges.
Estimate, hold, and charge
Estimate and Start use the same calculation. They count matching companies up tomaxRows at one credit per company and add 10 credits per SmartSearch node. If 60 companies match and maxRows is 100, the reserve is 60 credits before any SmartSearch fees. A fresh calculation may change if the underlying data or request changes. The final charge uses the companies written plus any SmartSearch node fees.
Set a positive integer for maxRows to cap the job. Omit it or send null to use the service maximum of 1,000,000 rows. Sending 0 returns 422 INVALID_REQUEST. Company and person/job criteria are supported for company files.
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
Review the budget, then call Start Company Export with the same body. Reduce maxRows if the hold is too large.Body
application/json
Response
Successful Response
The response is of type Response Estimate Company Export V1 Company Exports Estimate Post · object.
Was this page helpful?
