Preview Lead Search
curl --request POST \
--url https://api.example.com/api/v1/lead-search/preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"plan": {
"natural_language_query": "<string>",
"requested_count": 3,
"person": {
"titles": {
"values": [
"<string>"
],
"match": "any"
},
"schools": {
"values": [
"<string>"
],
"match": "any"
},
"seniorities": {
"values": [
"<string>"
],
"match": "any"
},
"keywords": {
"values": [
"<string>"
],
"match": "any"
},
"locations": [
{
"city": "<string>",
"region": "<string>",
"country": "<string>",
"radius": 2
}
]
},
"company": {
"names": {
"values": [
"<string>"
],
"match": "any"
},
"domains": {
"values": [
"<string>"
],
"match": "any"
},
"industries": {
"values": [
"<string>"
],
"match": "any"
},
"categories": {
"values": [
"<string>"
],
"match": "any"
},
"keywords": {
"values": [
"<string>"
],
"match": "any"
},
"country_codes": {
"values": [
"<string>"
],
"match": "any"
},
"headcount": {
"minimum": 1,
"maximum": 1
},
"annual_revenue": {
"lower_bound_usd": 1,
"upper_bound_usd": 1
},
"funding_stages": {
"values": [
"<string>"
],
"match": "any"
}
},
"required_output_fields": [
"full_name",
"title",
"company_name",
"company_domain",
"linkedin_url"
],
"unresolved_constraints": []
},
"idempotency_key": "<string>"
}
'import requests
url = "https://api.example.com/api/v1/lead-search/preview"
payload = {
"plan": {
"natural_language_query": "<string>",
"requested_count": 3,
"person": {
"titles": {
"values": ["<string>"],
"match": "any"
},
"schools": {
"values": ["<string>"],
"match": "any"
},
"seniorities": {
"values": ["<string>"],
"match": "any"
},
"keywords": {
"values": ["<string>"],
"match": "any"
},
"locations": [
{
"city": "<string>",
"region": "<string>",
"country": "<string>",
"radius": 2
}
]
},
"company": {
"names": {
"values": ["<string>"],
"match": "any"
},
"domains": {
"values": ["<string>"],
"match": "any"
},
"industries": {
"values": ["<string>"],
"match": "any"
},
"categories": {
"values": ["<string>"],
"match": "any"
},
"keywords": {
"values": ["<string>"],
"match": "any"
},
"country_codes": {
"values": ["<string>"],
"match": "any"
},
"headcount": {
"minimum": 1,
"maximum": 1
},
"annual_revenue": {
"lower_bound_usd": 1,
"upper_bound_usd": 1
},
"funding_stages": {
"values": ["<string>"],
"match": "any"
}
},
"required_output_fields": ["full_name", "title", "company_name", "company_domain", "linkedin_url"],
"unresolved_constraints": []
},
"idempotency_key": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
plan: {
natural_language_query: '<string>',
requested_count: 3,
person: {
titles: {values: ['<string>'], match: 'any'},
schools: {values: ['<string>'], match: 'any'},
seniorities: {values: ['<string>'], match: 'any'},
keywords: {values: ['<string>'], match: 'any'},
locations: [{city: '<string>', region: '<string>', country: '<string>', radius: 2}]
},
company: {
names: {values: ['<string>'], match: 'any'},
domains: {values: ['<string>'], match: 'any'},
industries: {values: ['<string>'], match: 'any'},
categories: {values: ['<string>'], match: 'any'},
keywords: {values: ['<string>'], match: 'any'},
country_codes: {values: ['<string>'], match: 'any'},
headcount: {minimum: 1, maximum: 1},
annual_revenue: {lower_bound_usd: 1, upper_bound_usd: 1},
funding_stages: {values: ['<string>'], match: 'any'}
},
required_output_fields: ['full_name', 'title', 'company_name', 'company_domain', 'linkedin_url'],
unresolved_constraints: []
},
idempotency_key: '<string>'
})
};
fetch('https://api.example.com/api/v1/lead-search/preview', 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.example.com/api/v1/lead-search/preview",
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([
'plan' => [
'natural_language_query' => '<string>',
'requested_count' => 3,
'person' => [
'titles' => [
'values' => [
'<string>'
],
'match' => 'any'
],
'schools' => [
'values' => [
'<string>'
],
'match' => 'any'
],
'seniorities' => [
'values' => [
'<string>'
],
'match' => 'any'
],
'keywords' => [
'values' => [
'<string>'
],
'match' => 'any'
],
'locations' => [
[
'city' => '<string>',
'region' => '<string>',
'country' => '<string>',
'radius' => 2
]
]
],
'company' => [
'names' => [
'values' => [
'<string>'
],
'match' => 'any'
],
'domains' => [
'values' => [
'<string>'
],
'match' => 'any'
],
'industries' => [
'values' => [
'<string>'
],
'match' => 'any'
],
'categories' => [
'values' => [
'<string>'
],
'match' => 'any'
],
'keywords' => [
'values' => [
'<string>'
],
'match' => 'any'
],
'country_codes' => [
'values' => [
'<string>'
],
'match' => 'any'
],
'headcount' => [
'minimum' => 1,
'maximum' => 1
],
'annual_revenue' => [
'lower_bound_usd' => 1,
'upper_bound_usd' => 1
],
'funding_stages' => [
'values' => [
'<string>'
],
'match' => 'any'
]
],
'required_output_fields' => [
'full_name',
'title',
'company_name',
'company_domain',
'linkedin_url'
],
'unresolved_constraints' => [
]
],
'idempotency_key' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.example.com/api/v1/lead-search/preview"
payload := strings.NewReader("{\n \"plan\": {\n \"natural_language_query\": \"<string>\",\n \"requested_count\": 3,\n \"person\": {\n \"titles\": {\n \"values\": [\n \"<string>\"\n ],\n \"match\": \"any\"\n },\n \"schools\": {\n \"values\": [\n \"<string>\"\n ],\n \"match\": \"any\"\n },\n \"seniorities\": {\n \"values\": [\n \"<string>\"\n ],\n \"match\": \"any\"\n },\n \"keywords\": {\n \"values\": [\n \"<string>\"\n ],\n \"match\": \"any\"\n },\n \"locations\": [\n {\n \"city\": \"<string>\",\n \"region\": \"<string>\",\n \"country\": \"<string>\",\n \"radius\": 2\n }\n ]\n },\n \"company\": {\n \"names\": {\n \"values\": [\n \"<string>\"\n ],\n \"match\": \"any\"\n },\n \"domains\": {\n \"values\": [\n \"<string>\"\n ],\n \"match\": \"any\"\n },\n \"industries\": {\n \"values\": [\n \"<string>\"\n ],\n \"match\": \"any\"\n },\n \"categories\": {\n \"values\": [\n \"<string>\"\n ],\n \"match\": \"any\"\n },\n \"keywords\": {\n \"values\": [\n \"<string>\"\n ],\n \"match\": \"any\"\n },\n \"country_codes\": {\n \"values\": [\n \"<string>\"\n ],\n \"match\": \"any\"\n },\n \"headcount\": {\n \"minimum\": 1,\n \"maximum\": 1\n },\n \"annual_revenue\": {\n \"lower_bound_usd\": 1,\n \"upper_bound_usd\": 1\n },\n \"funding_stages\": {\n \"values\": [\n \"<string>\"\n ],\n \"match\": \"any\"\n }\n },\n \"required_output_fields\": [\n \"full_name\",\n \"title\",\n \"company_name\",\n \"company_domain\",\n \"linkedin_url\"\n ],\n \"unresolved_constraints\": []\n },\n \"idempotency_key\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.example.com/api/v1/lead-search/preview")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"plan\": {\n \"natural_language_query\": \"<string>\",\n \"requested_count\": 3,\n \"person\": {\n \"titles\": {\n \"values\": [\n \"<string>\"\n ],\n \"match\": \"any\"\n },\n \"schools\": {\n \"values\": [\n \"<string>\"\n ],\n \"match\": \"any\"\n },\n \"seniorities\": {\n \"values\": [\n \"<string>\"\n ],\n \"match\": \"any\"\n },\n \"keywords\": {\n \"values\": [\n \"<string>\"\n ],\n \"match\": \"any\"\n },\n \"locations\": [\n {\n \"city\": \"<string>\",\n \"region\": \"<string>\",\n \"country\": \"<string>\",\n \"radius\": 2\n }\n ]\n },\n \"company\": {\n \"names\": {\n \"values\": [\n \"<string>\"\n ],\n \"match\": \"any\"\n },\n \"domains\": {\n \"values\": [\n \"<string>\"\n ],\n \"match\": \"any\"\n },\n \"industries\": {\n \"values\": [\n \"<string>\"\n ],\n \"match\": \"any\"\n },\n \"categories\": {\n \"values\": [\n \"<string>\"\n ],\n \"match\": \"any\"\n },\n \"keywords\": {\n \"values\": [\n \"<string>\"\n ],\n \"match\": \"any\"\n },\n \"country_codes\": {\n \"values\": [\n \"<string>\"\n ],\n \"match\": \"any\"\n },\n \"headcount\": {\n \"minimum\": 1,\n \"maximum\": 1\n },\n \"annual_revenue\": {\n \"lower_bound_usd\": 1,\n \"upper_bound_usd\": 1\n },\n \"funding_stages\": {\n \"values\": [\n \"<string>\"\n ],\n \"match\": \"any\"\n }\n },\n \"required_output_fields\": [\n \"full_name\",\n \"title\",\n \"company_name\",\n \"company_domain\",\n \"linkedin_url\"\n ],\n \"unresolved_constraints\": []\n },\n \"idempotency_key\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/lead-search/preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"plan\": {\n \"natural_language_query\": \"<string>\",\n \"requested_count\": 3,\n \"person\": {\n \"titles\": {\n \"values\": [\n \"<string>\"\n ],\n \"match\": \"any\"\n },\n \"schools\": {\n \"values\": [\n \"<string>\"\n ],\n \"match\": \"any\"\n },\n \"seniorities\": {\n \"values\": [\n \"<string>\"\n ],\n \"match\": \"any\"\n },\n \"keywords\": {\n \"values\": [\n \"<string>\"\n ],\n \"match\": \"any\"\n },\n \"locations\": [\n {\n \"city\": \"<string>\",\n \"region\": \"<string>\",\n \"country\": \"<string>\",\n \"radius\": 2\n }\n ]\n },\n \"company\": {\n \"names\": {\n \"values\": [\n \"<string>\"\n ],\n \"match\": \"any\"\n },\n \"domains\": {\n \"values\": [\n \"<string>\"\n ],\n \"match\": \"any\"\n },\n \"industries\": {\n \"values\": [\n \"<string>\"\n ],\n \"match\": \"any\"\n },\n \"categories\": {\n \"values\": [\n \"<string>\"\n ],\n \"match\": \"any\"\n },\n \"keywords\": {\n \"values\": [\n \"<string>\"\n ],\n \"match\": \"any\"\n },\n \"country_codes\": {\n \"values\": [\n \"<string>\"\n ],\n \"match\": \"any\"\n },\n \"headcount\": {\n \"minimum\": 1,\n \"maximum\": 1\n },\n \"annual_revenue\": {\n \"lower_bound_usd\": 1,\n \"upper_bound_usd\": 1\n },\n \"funding_stages\": {\n \"values\": [\n \"<string>\"\n ],\n \"match\": \"any\"\n }\n },\n \"required_output_fields\": [\n \"full_name\",\n \"title\",\n \"company_name\",\n \"company_domain\",\n \"linkedin_url\"\n ],\n \"unresolved_constraints\": []\n },\n \"idempotency_key\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"maximum_charge_credits": 123,
"balance_after": 123,
"requested_count": 123,
"confirmation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"expires_at": "<string>",
"plan": {
"natural_language_query": "<string>",
"requested_count": 3,
"person": {
"titles": {
"values": [
"<string>"
],
"match": "any"
},
"schools": {
"values": [
"<string>"
],
"match": "any"
},
"seniorities": {
"values": [
"<string>"
],
"match": "any"
},
"keywords": {
"values": [
"<string>"
],
"match": "any"
},
"locations": [
{
"city": "<string>",
"region": "<string>",
"country": "<string>",
"radius": 2,
"radius_unit": "mi"
}
]
},
"company": {
"names": {
"values": [
"<string>"
],
"match": "any"
},
"domains": {
"values": [
"<string>"
],
"match": "any"
},
"industries": {
"values": [
"<string>"
],
"match": "any"
},
"categories": {
"values": [
"<string>"
],
"match": "any"
},
"keywords": {
"values": [
"<string>"
],
"match": "any"
},
"country_codes": {
"values": [
"<string>"
],
"match": "any"
},
"headcount": {
"minimum": 1,
"maximum": 1
},
"annual_revenue": {
"lower_bound_usd": 1,
"upper_bound_usd": 1
},
"funding_stages": {
"values": [
"<string>"
],
"match": "any"
}
},
"required_output_fields": [
"full_name",
"title",
"company_name",
"company_domain",
"linkedin_url"
],
"unresolved_constraints": []
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}lead_search
Preview Lead Search
POST
/
api
/
v1
/
lead-search
/
preview
Preview Lead Search
curl --request POST \
--url https://api.example.com/api/v1/lead-search/preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"plan": {
"natural_language_query": "<string>",
"requested_count": 3,
"person": {
"titles": {
"values": [
"<string>"
],
"match": "any"
},
"schools": {
"values": [
"<string>"
],
"match": "any"
},
"seniorities": {
"values": [
"<string>"
],
"match": "any"
},
"keywords": {
"values": [
"<string>"
],
"match": "any"
},
"locations": [
{
"city": "<string>",
"region": "<string>",
"country": "<string>",
"radius": 2
}
]
},
"company": {
"names": {
"values": [
"<string>"
],
"match": "any"
},
"domains": {
"values": [
"<string>"
],
"match": "any"
},
"industries": {
"values": [
"<string>"
],
"match": "any"
},
"categories": {
"values": [
"<string>"
],
"match": "any"
},
"keywords": {
"values": [
"<string>"
],
"match": "any"
},
"country_codes": {
"values": [
"<string>"
],
"match": "any"
},
"headcount": {
"minimum": 1,
"maximum": 1
},
"annual_revenue": {
"lower_bound_usd": 1,
"upper_bound_usd": 1
},
"funding_stages": {
"values": [
"<string>"
],
"match": "any"
}
},
"required_output_fields": [
"full_name",
"title",
"company_name",
"company_domain",
"linkedin_url"
],
"unresolved_constraints": []
},
"idempotency_key": "<string>"
}
'import requests
url = "https://api.example.com/api/v1/lead-search/preview"
payload = {
"plan": {
"natural_language_query": "<string>",
"requested_count": 3,
"person": {
"titles": {
"values": ["<string>"],
"match": "any"
},
"schools": {
"values": ["<string>"],
"match": "any"
},
"seniorities": {
"values": ["<string>"],
"match": "any"
},
"keywords": {
"values": ["<string>"],
"match": "any"
},
"locations": [
{
"city": "<string>",
"region": "<string>",
"country": "<string>",
"radius": 2
}
]
},
"company": {
"names": {
"values": ["<string>"],
"match": "any"
},
"domains": {
"values": ["<string>"],
"match": "any"
},
"industries": {
"values": ["<string>"],
"match": "any"
},
"categories": {
"values": ["<string>"],
"match": "any"
},
"keywords": {
"values": ["<string>"],
"match": "any"
},
"country_codes": {
"values": ["<string>"],
"match": "any"
},
"headcount": {
"minimum": 1,
"maximum": 1
},
"annual_revenue": {
"lower_bound_usd": 1,
"upper_bound_usd": 1
},
"funding_stages": {
"values": ["<string>"],
"match": "any"
}
},
"required_output_fields": ["full_name", "title", "company_name", "company_domain", "linkedin_url"],
"unresolved_constraints": []
},
"idempotency_key": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
plan: {
natural_language_query: '<string>',
requested_count: 3,
person: {
titles: {values: ['<string>'], match: 'any'},
schools: {values: ['<string>'], match: 'any'},
seniorities: {values: ['<string>'], match: 'any'},
keywords: {values: ['<string>'], match: 'any'},
locations: [{city: '<string>', region: '<string>', country: '<string>', radius: 2}]
},
company: {
names: {values: ['<string>'], match: 'any'},
domains: {values: ['<string>'], match: 'any'},
industries: {values: ['<string>'], match: 'any'},
categories: {values: ['<string>'], match: 'any'},
keywords: {values: ['<string>'], match: 'any'},
country_codes: {values: ['<string>'], match: 'any'},
headcount: {minimum: 1, maximum: 1},
annual_revenue: {lower_bound_usd: 1, upper_bound_usd: 1},
funding_stages: {values: ['<string>'], match: 'any'}
},
required_output_fields: ['full_name', 'title', 'company_name', 'company_domain', 'linkedin_url'],
unresolved_constraints: []
},
idempotency_key: '<string>'
})
};
fetch('https://api.example.com/api/v1/lead-search/preview', 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.example.com/api/v1/lead-search/preview",
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([
'plan' => [
'natural_language_query' => '<string>',
'requested_count' => 3,
'person' => [
'titles' => [
'values' => [
'<string>'
],
'match' => 'any'
],
'schools' => [
'values' => [
'<string>'
],
'match' => 'any'
],
'seniorities' => [
'values' => [
'<string>'
],
'match' => 'any'
],
'keywords' => [
'values' => [
'<string>'
],
'match' => 'any'
],
'locations' => [
[
'city' => '<string>',
'region' => '<string>',
'country' => '<string>',
'radius' => 2
]
]
],
'company' => [
'names' => [
'values' => [
'<string>'
],
'match' => 'any'
],
'domains' => [
'values' => [
'<string>'
],
'match' => 'any'
],
'industries' => [
'values' => [
'<string>'
],
'match' => 'any'
],
'categories' => [
'values' => [
'<string>'
],
'match' => 'any'
],
'keywords' => [
'values' => [
'<string>'
],
'match' => 'any'
],
'country_codes' => [
'values' => [
'<string>'
],
'match' => 'any'
],
'headcount' => [
'minimum' => 1,
'maximum' => 1
],
'annual_revenue' => [
'lower_bound_usd' => 1,
'upper_bound_usd' => 1
],
'funding_stages' => [
'values' => [
'<string>'
],
'match' => 'any'
]
],
'required_output_fields' => [
'full_name',
'title',
'company_name',
'company_domain',
'linkedin_url'
],
'unresolved_constraints' => [
]
],
'idempotency_key' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.example.com/api/v1/lead-search/preview"
payload := strings.NewReader("{\n \"plan\": {\n \"natural_language_query\": \"<string>\",\n \"requested_count\": 3,\n \"person\": {\n \"titles\": {\n \"values\": [\n \"<string>\"\n ],\n \"match\": \"any\"\n },\n \"schools\": {\n \"values\": [\n \"<string>\"\n ],\n \"match\": \"any\"\n },\n \"seniorities\": {\n \"values\": [\n \"<string>\"\n ],\n \"match\": \"any\"\n },\n \"keywords\": {\n \"values\": [\n \"<string>\"\n ],\n \"match\": \"any\"\n },\n \"locations\": [\n {\n \"city\": \"<string>\",\n \"region\": \"<string>\",\n \"country\": \"<string>\",\n \"radius\": 2\n }\n ]\n },\n \"company\": {\n \"names\": {\n \"values\": [\n \"<string>\"\n ],\n \"match\": \"any\"\n },\n \"domains\": {\n \"values\": [\n \"<string>\"\n ],\n \"match\": \"any\"\n },\n \"industries\": {\n \"values\": [\n \"<string>\"\n ],\n \"match\": \"any\"\n },\n \"categories\": {\n \"values\": [\n \"<string>\"\n ],\n \"match\": \"any\"\n },\n \"keywords\": {\n \"values\": [\n \"<string>\"\n ],\n \"match\": \"any\"\n },\n \"country_codes\": {\n \"values\": [\n \"<string>\"\n ],\n \"match\": \"any\"\n },\n \"headcount\": {\n \"minimum\": 1,\n \"maximum\": 1\n },\n \"annual_revenue\": {\n \"lower_bound_usd\": 1,\n \"upper_bound_usd\": 1\n },\n \"funding_stages\": {\n \"values\": [\n \"<string>\"\n ],\n \"match\": \"any\"\n }\n },\n \"required_output_fields\": [\n \"full_name\",\n \"title\",\n \"company_name\",\n \"company_domain\",\n \"linkedin_url\"\n ],\n \"unresolved_constraints\": []\n },\n \"idempotency_key\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.example.com/api/v1/lead-search/preview")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"plan\": {\n \"natural_language_query\": \"<string>\",\n \"requested_count\": 3,\n \"person\": {\n \"titles\": {\n \"values\": [\n \"<string>\"\n ],\n \"match\": \"any\"\n },\n \"schools\": {\n \"values\": [\n \"<string>\"\n ],\n \"match\": \"any\"\n },\n \"seniorities\": {\n \"values\": [\n \"<string>\"\n ],\n \"match\": \"any\"\n },\n \"keywords\": {\n \"values\": [\n \"<string>\"\n ],\n \"match\": \"any\"\n },\n \"locations\": [\n {\n \"city\": \"<string>\",\n \"region\": \"<string>\",\n \"country\": \"<string>\",\n \"radius\": 2\n }\n ]\n },\n \"company\": {\n \"names\": {\n \"values\": [\n \"<string>\"\n ],\n \"match\": \"any\"\n },\n \"domains\": {\n \"values\": [\n \"<string>\"\n ],\n \"match\": \"any\"\n },\n \"industries\": {\n \"values\": [\n \"<string>\"\n ],\n \"match\": \"any\"\n },\n \"categories\": {\n \"values\": [\n \"<string>\"\n ],\n \"match\": \"any\"\n },\n \"keywords\": {\n \"values\": [\n \"<string>\"\n ],\n \"match\": \"any\"\n },\n \"country_codes\": {\n \"values\": [\n \"<string>\"\n ],\n \"match\": \"any\"\n },\n \"headcount\": {\n \"minimum\": 1,\n \"maximum\": 1\n },\n \"annual_revenue\": {\n \"lower_bound_usd\": 1,\n \"upper_bound_usd\": 1\n },\n \"funding_stages\": {\n \"values\": [\n \"<string>\"\n ],\n \"match\": \"any\"\n }\n },\n \"required_output_fields\": [\n \"full_name\",\n \"title\",\n \"company_name\",\n \"company_domain\",\n \"linkedin_url\"\n ],\n \"unresolved_constraints\": []\n },\n \"idempotency_key\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/lead-search/preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"plan\": {\n \"natural_language_query\": \"<string>\",\n \"requested_count\": 3,\n \"person\": {\n \"titles\": {\n \"values\": [\n \"<string>\"\n ],\n \"match\": \"any\"\n },\n \"schools\": {\n \"values\": [\n \"<string>\"\n ],\n \"match\": \"any\"\n },\n \"seniorities\": {\n \"values\": [\n \"<string>\"\n ],\n \"match\": \"any\"\n },\n \"keywords\": {\n \"values\": [\n \"<string>\"\n ],\n \"match\": \"any\"\n },\n \"locations\": [\n {\n \"city\": \"<string>\",\n \"region\": \"<string>\",\n \"country\": \"<string>\",\n \"radius\": 2\n }\n ]\n },\n \"company\": {\n \"names\": {\n \"values\": [\n \"<string>\"\n ],\n \"match\": \"any\"\n },\n \"domains\": {\n \"values\": [\n \"<string>\"\n ],\n \"match\": \"any\"\n },\n \"industries\": {\n \"values\": [\n \"<string>\"\n ],\n \"match\": \"any\"\n },\n \"categories\": {\n \"values\": [\n \"<string>\"\n ],\n \"match\": \"any\"\n },\n \"keywords\": {\n \"values\": [\n \"<string>\"\n ],\n \"match\": \"any\"\n },\n \"country_codes\": {\n \"values\": [\n \"<string>\"\n ],\n \"match\": \"any\"\n },\n \"headcount\": {\n \"minimum\": 1,\n \"maximum\": 1\n },\n \"annual_revenue\": {\n \"lower_bound_usd\": 1,\n \"upper_bound_usd\": 1\n },\n \"funding_stages\": {\n \"values\": [\n \"<string>\"\n ],\n \"match\": \"any\"\n }\n },\n \"required_output_fields\": [\n \"full_name\",\n \"title\",\n \"company_name\",\n \"company_domain\",\n \"linkedin_url\"\n ],\n \"unresolved_constraints\": []\n },\n \"idempotency_key\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"maximum_charge_credits": 123,
"balance_after": 123,
"requested_count": 123,
"confirmation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"expires_at": "<string>",
"plan": {
"natural_language_query": "<string>",
"requested_count": 3,
"person": {
"titles": {
"values": [
"<string>"
],
"match": "any"
},
"schools": {
"values": [
"<string>"
],
"match": "any"
},
"seniorities": {
"values": [
"<string>"
],
"match": "any"
},
"keywords": {
"values": [
"<string>"
],
"match": "any"
},
"locations": [
{
"city": "<string>",
"region": "<string>",
"country": "<string>",
"radius": 2,
"radius_unit": "mi"
}
]
},
"company": {
"names": {
"values": [
"<string>"
],
"match": "any"
},
"domains": {
"values": [
"<string>"
],
"match": "any"
},
"industries": {
"values": [
"<string>"
],
"match": "any"
},
"categories": {
"values": [
"<string>"
],
"match": "any"
},
"keywords": {
"values": [
"<string>"
],
"match": "any"
},
"country_codes": {
"values": [
"<string>"
],
"match": "any"
},
"headcount": {
"minimum": 1,
"maximum": 1
},
"annual_revenue": {
"lower_bound_usd": 1,
"upper_bound_usd": 1
},
"funding_stages": {
"values": [
"<string>"
],
"match": "any"
}
},
"required_output_fields": [
"full_name",
"title",
"company_name",
"company_domain",
"linkedin_url"
],
"unresolved_constraints": []
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Response
Successful Response
⌘I