Start Company Export
curl --request POST \
--url https://api.revenuebase.ai/v2/contact/company/exports \
--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"
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', 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",
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"
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")
.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")
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{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Company Endpoints
Start Company Export
Create an asynchronous job for a downloadable company file.
POST
/
company
/
exports
Start Company Export
curl --request POST \
--url https://api.revenuebase.ai/v2/contact/company/exports \
--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"
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', 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",
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"
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")
.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")
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{
"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 |
|---|---|---|
| Company row | 1 credit per written row | Unlimited 0 credits |
| SmartSearch filter node | +10 credits per node per request | Included 0 credits |
| Rows per file | 1,000,000 maximum | 1,000,000 maximum |
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 Export
Download a company list as a file, including larger lists than an inline Preview can return. Company and person/job conditions are supported: a person filter selects the distinct companies represented by matching contacts.Example
SetREVENUEBASE_API_KEY to your API key.
curl --request POST 'https://api.revenuebase.ai/v2/contact/company/exports' \
--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"
}'
Read the start response
HTTP 202 means the job was accepted. Save exportId; the response does not contain the company records or a finished file. maxRows is the applied row cap. A metered start response reports its reservation in X-Credits-Held.Choose your file and budget
Set columns explicitly or use["*"] for all company catalog fields. Use format and compression to choose the file representation; the example requests an uncompressed CSV. A filename is a base name, up to 150 characters, using letters, digits, spaces, and . _ ( ) -.
Choose a positive integer for maxRows. Omit it or send null to use the service maximum of 1,000,000 rows. Sending 0 returns 422 INVALID_REQUEST. PAYG reserves one credit per matching company up to the row cap plus 10 per SmartSearch node, using the same calculation as Estimate or the amount from a valid confirmed quote. If the balance cannot cover the hold, 402 INSUFFICIENT_CREDITS rejects the request before starting a job.
Completion settles the written rows and node fees, then releases unused held credits. A successful empty export with SmartSearch nodes can still have the flat node charge. An unfinished failed or cancelled export releases its hold. Completed work is charged whether or not you download it.
Poll and download
Poll Company Export Status until COMPLETED, ERROR, or CANCELLED. Continue polling through QUEUED, PROCESSING, FINALIZING, or CANCELLING. Download the completed file using downloadUrl. A signed link lasts one hour; re-read status for a fresh link.Errors and retries
Correct invalid filters, fields, or file options before retrying 400 or 422. Respect Retry-After for 429 or a transient credit-service failure. A repeated start POST creates another job and can charge again; avoid automatically resubmitting after an ambiguous response.Next steps
Get status using exportId. Cancel when you no longer need an unfinished job.Body
application/json
Response
Successful Response
Was this page helpful?
