Get Company Finder search results
curl --request GET \
--url https://app.bettercontact.rocks/api/v2/company_finder/async/{request_id} \
--header 'X-API-Key: <api-key>'import requests
url = "https://app.bettercontact.rocks/api/v2/company_finder/async/{request_id}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://app.bettercontact.rocks/api/v2/company_finder/async/{request_id}', 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://app.bettercontact.rocks/api/v2/company_finder/async/{request_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-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"
"net/http"
"io"
)
func main() {
url := "https://app.bettercontact.rocks/api/v2/company_finder/async/{request_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.bettercontact.rocks/api/v2/company_finder/async/{request_id}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.bettercontact.rocks/api/v2/company_finder/async/{request_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "bc39ffbfc24cf043b748",
"status": "terminated",
"credits_consumed": "2.5",
"credits_left": "998.5",
"summary": {
"companies_found": 68067,
"limit": 25,
"offset": 0
},
"companies": [
{
"company_id": 42,
"company_name": "Acme",
"company_domain": "acme.com",
"company_website": "acme.com",
"company_linkedin_url": "https://www.linkedin.com/company/acme",
"company_crunchbase_url": "https://www.crunchbase.com/organization/acme",
"company_logo_url": "https://logo.example/acme.png",
"company_industry": "Software",
"company_type": "Privately Held",
"company_description": "<string>",
"company_founded_year": 2012,
"company_keywords": [
"saas"
],
"company_technologies": [
"Ruby",
"PostgreSQL"
],
"company_employees_range_start": 51,
"company_employees_range_end": 200,
"company_employees_count": 120,
"company_employees_by_department": {
"Engineering": 40,
"Sales": 15
},
"company_size_range": "51-200",
"company_revenue_range": "$10M-$50M",
"company_locations_count": 3,
"company_last_funding_round_name": "Series B",
"company_last_amount_raised_usd": 25000000,
"company_total_amount_raised_usd": 40000000,
"company_last_funding_date": "2024-06-01",
"company_head_quarters_city": "Austin",
"company_head_quarters_state": "Texas",
"company_head_quarters_country": "United States",
"company_head_quarters_address": "<string>",
"company_active_job_postings_count": 8
}
]
}{
"id": "bc39ffbfc24cf043b748",
"status": "processing",
"credits_left": "999.0",
"credits_consumed": "0.0"
}{
"success": false,
"error": "Your are not authorized. Please check your api_key."
}{
"success": false,
"message": "Company finder request not found."
}Company Finder - Get new companies
Get a Company Finder Search results
Get companies from a submitted Company Finder search.
GET
/
company_finder
/
async
/
{request_id}
Get Company Finder search results
curl --request GET \
--url https://app.bettercontact.rocks/api/v2/company_finder/async/{request_id} \
--header 'X-API-Key: <api-key>'import requests
url = "https://app.bettercontact.rocks/api/v2/company_finder/async/{request_id}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://app.bettercontact.rocks/api/v2/company_finder/async/{request_id}', 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://app.bettercontact.rocks/api/v2/company_finder/async/{request_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-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"
"net/http"
"io"
)
func main() {
url := "https://app.bettercontact.rocks/api/v2/company_finder/async/{request_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.bettercontact.rocks/api/v2/company_finder/async/{request_id}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.bettercontact.rocks/api/v2/company_finder/async/{request_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "bc39ffbfc24cf043b748",
"status": "terminated",
"credits_consumed": "2.5",
"credits_left": "998.5",
"summary": {
"companies_found": 68067,
"limit": 25,
"offset": 0
},
"companies": [
{
"company_id": 42,
"company_name": "Acme",
"company_domain": "acme.com",
"company_website": "acme.com",
"company_linkedin_url": "https://www.linkedin.com/company/acme",
"company_crunchbase_url": "https://www.crunchbase.com/organization/acme",
"company_logo_url": "https://logo.example/acme.png",
"company_industry": "Software",
"company_type": "Privately Held",
"company_description": "<string>",
"company_founded_year": 2012,
"company_keywords": [
"saas"
],
"company_technologies": [
"Ruby",
"PostgreSQL"
],
"company_employees_range_start": 51,
"company_employees_range_end": 200,
"company_employees_count": 120,
"company_employees_by_department": {
"Engineering": 40,
"Sales": 15
},
"company_size_range": "51-200",
"company_revenue_range": "$10M-$50M",
"company_locations_count": 3,
"company_last_funding_round_name": "Series B",
"company_last_amount_raised_usd": 25000000,
"company_total_amount_raised_usd": 40000000,
"company_last_funding_date": "2024-06-01",
"company_head_quarters_city": "Austin",
"company_head_quarters_state": "Texas",
"company_head_quarters_country": "United States",
"company_head_quarters_address": "<string>",
"company_active_job_postings_count": 8
}
]
}{
"id": "bc39ffbfc24cf043b748",
"status": "processing",
"credits_left": "999.0",
"credits_consumed": "0.0"
}{
"success": false,
"error": "Your are not authorized. Please check your api_key."
}{
"success": false,
"message": "Company finder request not found."
}Poll on
status, not on the HTTP status code.While the search is running this endpoint answers 202 Accepted with a body that has no
companies and no summary. Once it is done it answers 200 OK with status set to
terminated.Always branch on body.status, never on the HTTP code alone.
See Request statuses for the full lifecycle and a polling recipe.Reading the result
status | HTTP | What you get |
|---|---|---|
not_started, processing | 202 | id, status, credits_left, credits_consumed. Poll again. |
terminated | 200 | summary and companies. When nothing matched, companies is [] and summary.companies_found is 0. |
Put a timeout on your polling loop. If the search provider fails, the request can stay in
processing instead of moving to a final status.credits_left and credits_consumed are returned as decimal strings, for example "998.5". Parse
them before doing arithmetic.Response
Search finished. status is terminated, with companies and summary present, companies possibly empty.
See Request statuses. A search that matched nothing is reported as terminated with an empty companies array.
Available options:
not_started, processing, terminated Example:
"terminated"
Was this page helpful?