Get enrichment results
curl --request GET \
--url https://app.bettercontact.rocks/api/v2/async/{request_id} \
--header 'X-API-Key: <api-key>'import requests
url = "https://app.bettercontact.rocks/api/v2/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/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/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/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/async/{request_id}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.bettercontact.rocks/api/v2/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": "fefbc2203558eb3adcea",
"status": "terminated",
"message": "Enrichment is not terminated yet. Please try later",
"credits_consumed": 1,
"credits_left": 331,
"summary": {
"total": 10,
"valid": 6,
"catch_all": 2,
"catch_all_not_safe": 1,
"undeliverable": 0,
"not_found": 1,
"found": 4,
"email_enrichment": {
"enriched": 6,
"not_enriched": 4
},
"phone_enrichment": {
"enriched": 4,
"not_enriched": 6
},
"profile_enrichment": {
"enriched": 9,
"not_enriched": 1
}
},
"data": [
{
"enriched": true,
"contact_id": 128374651,
"custom_fields": [
{
"name": "uuid",
"value": "crm-8821",
"position": 0
},
{
"name": "list_name",
"value": "Q3 outbound",
"position": 1
}
],
"contact_first_name": "Elon",
"contact_last_name": "Musk",
"contact_full_name": "Elon Musk",
"contact_job_title": "Ceo of tesla",
"contact_seniority": "Cxo",
"contact_industry": "Automotive",
"contact_linkedin_headline": "<string>",
"contact_linkedin_profile_url": "https://www.linkedin.com/in/elonmusk",
"contact_location_continent": "North america",
"contact_location_country": "United states",
"contact_location_state": "Texas",
"contact_location_city": "Austin",
"contact_email_address": "[email protected]",
"contact_email_address_status": "deliverable",
"contact_email_address_provider": "Secret Provider",
"email_provider": "google",
"contact_phone_number": "+14155550101",
"contact_phone_number_provider": "Secret Provider",
"company_name": "Tesla",
"company_domain": "tesla.com",
"company_description": "<string>",
"company_linkedin_url": "https://www.linkedin.com/company/tesla-motors",
"company_industry": "Automotive",
"company_type": "Public Company",
"company_keywords": [
"wine industry",
"wine"
],
"company_founded_year": 2003,
"company_employees_range_start": 10001,
"company_employees_range_end": 50000,
"company_headquarters_city": "Austin",
"company_headquarters_country": "United states"
}
]
}{
"id": "fefbc2203558eb3adcea",
"status": "processing",
"credits_left": 331,
"message": "Enrichment is not terminated yet. Please try later"
}{
"success": false,
"error": "Your are not authorized. Please check your api_key."
}{
"error": "Unvalid request_id."
}{
"success": false,
"error": "An error occured"
}Waterfall enrichment - Get phone and email
Get Enrichment Results
Retrieve the enrichment results for a specific request ID.
GET
/
async
/
{request_id}
Get enrichment results
curl --request GET \
--url https://app.bettercontact.rocks/api/v2/async/{request_id} \
--header 'X-API-Key: <api-key>'import requests
url = "https://app.bettercontact.rocks/api/v2/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/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/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/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/async/{request_id}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.bettercontact.rocks/api/v2/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": "fefbc2203558eb3adcea",
"status": "terminated",
"message": "Enrichment is not terminated yet. Please try later",
"credits_consumed": 1,
"credits_left": 331,
"summary": {
"total": 10,
"valid": 6,
"catch_all": 2,
"catch_all_not_safe": 1,
"undeliverable": 0,
"not_found": 1,
"found": 4,
"email_enrichment": {
"enriched": 6,
"not_enriched": 4
},
"phone_enrichment": {
"enriched": 4,
"not_enriched": 6
},
"profile_enrichment": {
"enriched": 9,
"not_enriched": 1
}
},
"data": [
{
"enriched": true,
"contact_id": 128374651,
"custom_fields": [
{
"name": "uuid",
"value": "crm-8821",
"position": 0
},
{
"name": "list_name",
"value": "Q3 outbound",
"position": 1
}
],
"contact_first_name": "Elon",
"contact_last_name": "Musk",
"contact_full_name": "Elon Musk",
"contact_job_title": "Ceo of tesla",
"contact_seniority": "Cxo",
"contact_industry": "Automotive",
"contact_linkedin_headline": "<string>",
"contact_linkedin_profile_url": "https://www.linkedin.com/in/elonmusk",
"contact_location_continent": "North america",
"contact_location_country": "United states",
"contact_location_state": "Texas",
"contact_location_city": "Austin",
"contact_email_address": "[email protected]",
"contact_email_address_status": "deliverable",
"contact_email_address_provider": "Secret Provider",
"email_provider": "google",
"contact_phone_number": "+14155550101",
"contact_phone_number_provider": "Secret Provider",
"company_name": "Tesla",
"company_domain": "tesla.com",
"company_description": "<string>",
"company_linkedin_url": "https://www.linkedin.com/company/tesla-motors",
"company_industry": "Automotive",
"company_type": "Public Company",
"company_keywords": [
"wine industry",
"wine"
],
"company_founded_year": 2003,
"company_employees_range_start": 10001,
"company_employees_range_end": 50000,
"company_headquarters_city": "Austin",
"company_headquarters_country": "United states"
}
]
}{
"id": "fefbc2203558eb3adcea",
"status": "processing",
"credits_left": 331,
"message": "Enrichment is not terminated yet. Please try later"
}{
"success": false,
"error": "Your are not authorized. Please check your api_key."
}{
"error": "Unvalid request_id."
}{
"success": false,
"error": "An error occured"
}Poll on
status, not on the HTTP status code.While the enrichment is running this endpoint answers 202 Accepted with a body that has no data
and no summary. Once it is done it answers 200 OK with status: "terminated".Some HTTP clients treat any 2xx as success, so a naive integration reads an empty data and
concludes the lead could not be enriched. Always branch on body.status === "terminated".See Request statuses for the full lifecycle and a polling recipe.Prefer the
webhook attribute of POST /async over polling.
Results are pushed as soon as they are ready, with no rate limit spent.
See Webhooks.Authorizations
Path Parameters
Response
Request finished. status is terminated and data holds the enriched leads.
The request_id of this enrichment.
Example:
"fefbc2203558eb3adcea"
See Request statuses. Only terminated guarantees data and summary are present.
Available options:
processing, on_hold, terminated Example:
"terminated"
Human readable hint. Only present while the request is not terminated.
Example:
"Enrichment is not terminated yet. Please try later"
Credits spent by this request so far.
Example:
1
Credits remaining on the account.
Example:
331
Only present once status is terminated.
Show child attributes
Show child attributes
Only present once status is terminated.
Show child attributes
Show child attributes
Was this page helpful?
⌘I