curl --request POST \
--url https://api.companyenrich.com/v2/companies/search/export \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"limit": 500000,
"expand": [],
"filter": {
"query": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"domain": "<string>",
"keywords": "<string>",
"technologies": "<string>",
"region": "<string>",
"country": "<string>",
"state": 123,
"city": 123,
"workforceGrowth": {
"min": 123,
"max": 123
},
"workforceSize": [
{
"min": 123,
"max": 123
}
],
"naicsCodes": "<string>",
"foundedYear": {
"min": 123,
"max": 123
},
"fundingAmount": {
"min": 123,
"max": 123
},
"fundingYear": {
"min": 123,
"max": 123
}
},
"semantic": {
"query": "<string>",
"weight": 0.5,
"autoFilter": true
},
"lookalike": {
"domains": [
"<string>"
],
"weight": 0,
"minScore": 0.5
}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
limit: 500000,
expand: [],
filter: {
query: '<string>',
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
domain: '<string>',
keywords: '<string>',
technologies: '<string>',
region: '<string>',
country: '<string>',
state: 123,
city: 123,
workforceGrowth: {min: 123, max: 123},
workforceSize: [{min: 123, max: 123}],
naicsCodes: '<string>',
foundedYear: {min: 123, max: 123},
fundingAmount: {min: 123, max: 123},
fundingYear: {min: 123, max: 123}
},
semantic: {query: '<string>', weight: 0.5, autoFilter: true},
lookalike: {domains: ['<string>'], weight: 0, minScore: 0.5}
})
};
fetch('https://api.companyenrich.com/v2/companies/search/export', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.companyenrich.com/v2/companies/search/export"
payload = {
"limit": 500000,
"expand": [],
"filter": {
"query": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"domain": "<string>",
"keywords": "<string>",
"technologies": "<string>",
"region": "<string>",
"country": "<string>",
"state": 123,
"city": 123,
"workforceGrowth": {
"min": 123,
"max": 123
},
"workforceSize": [
{
"min": 123,
"max": 123
}
],
"naicsCodes": "<string>",
"foundedYear": {
"min": 123,
"max": 123
},
"fundingAmount": {
"min": 123,
"max": 123
},
"fundingYear": {
"min": 123,
"max": 123
}
},
"semantic": {
"query": "<string>",
"weight": 0.5,
"autoFilter": True
},
"lookalike": {
"domains": ["<string>"],
"weight": 0,
"minScore": 0.5
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "<string>",
"status": "pending",
"progress": {
"total": 123,
"pending": 123,
"running": 123,
"succeeded": 123,
"failed": 123,
"unknown": 123,
"cancelled": 123
},
"creditsCharged": 123,
"createdAt": "2023-11-07T05:31:56Z",
"statusUrl": "<string>",
"resultsUrl": "<string>",
"rawResultsUrl": "<string>",
"recordCount": 123,
"recordLimit": 123,
"completedAt": "2023-11-07T05:31:56Z"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"errors": {}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}Export a company search asynchronously
Pages through a company search in the background, up to limit results, and stores the records for download. The query is the same as POST /v2/companies/search, without pageSize and cursor. Requires an API key. Each page is an ordinary search request at the normal per-record price, with the requested expansions; the last page asks only for the results still missing, and results whose record is unavailable are skipped. There is no upfront balance check: a failed page, such as a 402 once credits run out, stops the export, and the records already exported stay downloadable. limit cannot exceed your plan’s search limit. GET /v2/batches/{id} reports progress with recordCount and recordLimit, and resultsUrl downloads the records.
curl --request POST \
--url https://api.companyenrich.com/v2/companies/search/export \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"limit": 500000,
"expand": [],
"filter": {
"query": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"domain": "<string>",
"keywords": "<string>",
"technologies": "<string>",
"region": "<string>",
"country": "<string>",
"state": 123,
"city": 123,
"workforceGrowth": {
"min": 123,
"max": 123
},
"workforceSize": [
{
"min": 123,
"max": 123
}
],
"naicsCodes": "<string>",
"foundedYear": {
"min": 123,
"max": 123
},
"fundingAmount": {
"min": 123,
"max": 123
},
"fundingYear": {
"min": 123,
"max": 123
}
},
"semantic": {
"query": "<string>",
"weight": 0.5,
"autoFilter": true
},
"lookalike": {
"domains": [
"<string>"
],
"weight": 0,
"minScore": 0.5
}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
limit: 500000,
expand: [],
filter: {
query: '<string>',
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
domain: '<string>',
keywords: '<string>',
technologies: '<string>',
region: '<string>',
country: '<string>',
state: 123,
city: 123,
workforceGrowth: {min: 123, max: 123},
workforceSize: [{min: 123, max: 123}],
naicsCodes: '<string>',
foundedYear: {min: 123, max: 123},
fundingAmount: {min: 123, max: 123},
fundingYear: {min: 123, max: 123}
},
semantic: {query: '<string>', weight: 0.5, autoFilter: true},
lookalike: {domains: ['<string>'], weight: 0, minScore: 0.5}
})
};
fetch('https://api.companyenrich.com/v2/companies/search/export', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.companyenrich.com/v2/companies/search/export"
payload = {
"limit": 500000,
"expand": [],
"filter": {
"query": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"domain": "<string>",
"keywords": "<string>",
"technologies": "<string>",
"region": "<string>",
"country": "<string>",
"state": 123,
"city": 123,
"workforceGrowth": {
"min": 123,
"max": 123
},
"workforceSize": [
{
"min": 123,
"max": 123
}
],
"naicsCodes": "<string>",
"foundedYear": {
"min": 123,
"max": 123
},
"fundingAmount": {
"min": 123,
"max": 123
},
"fundingYear": {
"min": 123,
"max": 123
}
},
"semantic": {
"query": "<string>",
"weight": 0.5,
"autoFilter": True
},
"lookalike": {
"domains": ["<string>"],
"weight": 0,
"minScore": 0.5
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "<string>",
"status": "pending",
"progress": {
"total": 123,
"pending": 123,
"running": 123,
"succeeded": 123,
"failed": 123,
"unknown": 123,
"cancelled": 123
},
"creditsCharged": 123,
"createdAt": "2023-11-07T05:31:56Z",
"statusUrl": "<string>",
"resultsUrl": "<string>",
"rawResultsUrl": "<string>",
"recordCount": 123,
"recordLimit": 123,
"completedAt": "2023-11-07T05:31:56Z"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"errors": {}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}Authorizations
Body
Additional company data to include. Each requested expansion is charged per returned company, on top of the base cost:
financial: 1 creditkeywords: 1 creditnaicsCodes: 1 credittechnologies: 1 creditworkforce: 1 credit. Includes the latest 12 months of history; each earlier 12-month page fromGET /v2/companies/workforcecosts another 1 credit.
financial, keywords, naicsCodes, technologies, workforce Response
Accepted