Bulk Enrich With Custom Enrichment
curl --request POST \
--url https://api.explorium.ai/v1/custom_enrichments/{enrichment_id}/bulk_enrich \
--header 'Content-Type: application/json' \
--header 'api_key: <api-key>' \
--data '
{
"business_ids": [
"<string>"
],
"request_context": null,
"parameters": {}
}
'import requests
url = "https://api.explorium.ai/v1/custom_enrichments/{enrichment_id}/bulk_enrich"
payload = {
"business_ids": ["<string>"],
"request_context": None,
"parameters": {}
}
headers = {
"api_key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {api_key: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({business_ids: ['<string>'], request_context: null, parameters: {}})
};
fetch('https://api.explorium.ai/v1/custom_enrichments/{enrichment_id}/bulk_enrich', 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.explorium.ai/v1/custom_enrichments/{enrichment_id}/bulk_enrich",
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([
'business_ids' => [
'<string>'
],
'request_context' => null,
'parameters' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.explorium.ai/v1/custom_enrichments/{enrichment_id}/bulk_enrich"
payload := strings.NewReader("{\n \"business_ids\": [\n \"<string>\"\n ],\n \"request_context\": null,\n \"parameters\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("api_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.explorium.ai/v1/custom_enrichments/{enrichment_id}/bulk_enrich")
.header("api_key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"business_ids\": [\n \"<string>\"\n ],\n \"request_context\": null,\n \"parameters\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.explorium.ai/v1/custom_enrichments/{enrichment_id}/bulk_enrich")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["api_key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"business_ids\": [\n \"<string>\"\n ],\n \"request_context\": null,\n \"parameters\": {}\n}"
response = http.request(request)
puts response.read_body{
"response_context": {
"correlation_id": "<string>",
"request_status": "success",
"time_took_in_seconds": 123
},
"data": [
{
"business_id": "<string>",
"data": {}
}
],
"total_results": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Bulk Enrich With Custom Enrichment
Enrich businesses using a custom enrichment. Returns enriched data with the results from the custom enrichment.
POST
/
v1
/
custom_enrichments
/
{enrichment_id}
/
bulk_enrich
Bulk Enrich With Custom Enrichment
curl --request POST \
--url https://api.explorium.ai/v1/custom_enrichments/{enrichment_id}/bulk_enrich \
--header 'Content-Type: application/json' \
--header 'api_key: <api-key>' \
--data '
{
"business_ids": [
"<string>"
],
"request_context": null,
"parameters": {}
}
'import requests
url = "https://api.explorium.ai/v1/custom_enrichments/{enrichment_id}/bulk_enrich"
payload = {
"business_ids": ["<string>"],
"request_context": None,
"parameters": {}
}
headers = {
"api_key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {api_key: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({business_ids: ['<string>'], request_context: null, parameters: {}})
};
fetch('https://api.explorium.ai/v1/custom_enrichments/{enrichment_id}/bulk_enrich', 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.explorium.ai/v1/custom_enrichments/{enrichment_id}/bulk_enrich",
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([
'business_ids' => [
'<string>'
],
'request_context' => null,
'parameters' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.explorium.ai/v1/custom_enrichments/{enrichment_id}/bulk_enrich"
payload := strings.NewReader("{\n \"business_ids\": [\n \"<string>\"\n ],\n \"request_context\": null,\n \"parameters\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("api_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.explorium.ai/v1/custom_enrichments/{enrichment_id}/bulk_enrich")
.header("api_key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"business_ids\": [\n \"<string>\"\n ],\n \"request_context\": null,\n \"parameters\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.explorium.ai/v1/custom_enrichments/{enrichment_id}/bulk_enrich")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["api_key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"business_ids\": [\n \"<string>\"\n ],\n \"request_context\": null,\n \"parameters\": {}\n}"
response = http.request(request)
puts response.read_body{
"response_context": {
"correlation_id": "<string>",
"request_status": "success",
"time_took_in_seconds": 123
},
"data": [
{
"business_id": "<string>",
"data": {}
}
],
"total_results": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Consuming Custom Enrichments with the AgentSource API
After creating your custom enrichment, you can consume it through the AgentSource API. Here’s how:Endpoint: POST api.explorium.ai/v1/custom_enrichments/<custom_enrichment_id>/bulk_enrich
Description
Consume a custom enrichment by enriching a bulk of businesses.Parameters
- data_context: DataFrame DICT - Rows of data that will be used for evaluation. Must include a business_id field and can optionally include other user features.
Request Example
cURL
POST api.explor{
"data_context": [
{
"name": "Explorium",
"business_id": "340c8040bd50cbab9c7df718bbe51cc9"
},
{
"name": "Databricks",
"business_id": "fe4ae057b38fcbb9e0dbcef83f918c42"
},
{
"name": "Microsoft Corporation",
"business_id": "a34bacf839b923770b2c360eefa26748"
}
],
"request_context": {
"request_id": "ds7fdjhn293hsd8f9yu"
}
}
ium.ai/v1/custom_signals/<custom_signal_id>/enrich`
Response Example
cURL
{
"response_context": {
"correlation_id": "7155dd3ac8294e728eacc46632977e7a",
"request_status": "success",
"time_took_in_seconds": 0.474
},
"data": [
{
"business_id": "340c8040bd50cbab9c7df718bbe51cc9",
"data": {
"name": "Explorium",
"business_id": "340c8040bd50cbab9c7df718bbe51cc9",
"Business Type": "B2B",
"Reasoning": "Explorium primarily serves businesses by providing data solutions and insights to enhance their go-to-market strategies, which aligns with a B2B model. The focus on enterprise-grade data and partnerships with industry leaders further supports this classification."
}
},
{
"business_id": "fe4ae057b38fcbb9e0dbcef83f918c42",
"data": {
"name": "Databricks",
"business_id": "fe4ae057b38fcbb9e0dbcef83f918c42",
"Business Type": "B2B",
"Reasoning": "Databricks primarily serves businesses and organizations, including many Fortune 500 companies, by providing data and AI solutions, which classifies it as a B2B company. The focus on enterprise-level services and partnerships further supports this classification."
}
},
{
"business_id": "a34bacf839b923770b2c360eefa26748",
"data": {
"name": "Microsoft Corporation",
"business_id": "a34bacf839b923770b2c360eefa26748",
"Business Type": "B2B2C",
"Reasoning": "Microsoft operates in both B2B and B2C markets, providing software and services to businesses while also offering products directly to consumers, such as Windows and Office software. Their diverse range of offerings, including cloud services and developer tools, supports both business clients and individual users."
}
}
]
}
Authorizations
APIKeyHeaderAPIKeyHeader
Path Parameters
Body
application/json
Was this page helpful?