Preview leads
curl --request POST \
--url https://api.generect.com/api/v1/preview/leads/ \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"company_search_criteria": {
"industries": [
"Software Development"
],
"headcounts": [
"51-200"
],
"locations": [
"United States"
]
},
"lead_search_criteria": {
"job_titles": [
"CEO",
"Founder"
],
"seniorities": [
"c_suite"
],
"locations": [
"United States"
],
"limit_by": 25
}
}
'import requests
url = "https://api.generect.com/api/v1/preview/leads/"
payload = {
"company_search_criteria": {
"industries": ["Software Development"],
"headcounts": ["51-200"],
"locations": ["United States"]
},
"lead_search_criteria": {
"job_titles": ["CEO", "Founder"],
"seniorities": ["c_suite"],
"locations": ["United States"],
"limit_by": 25
}
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
company_search_criteria: {
industries: ['Software Development'],
headcounts: ['51-200'],
locations: ['United States']
},
lead_search_criteria: {
job_titles: ['CEO', 'Founder'],
seniorities: ['c_suite'],
locations: ['United States'],
limit_by: 25
}
})
};
fetch('https://api.generect.com/api/v1/preview/leads/', 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.generect.com/api/v1/preview/leads/",
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([
'company_search_criteria' => [
'industries' => [
'Software Development'
],
'headcounts' => [
'51-200'
],
'locations' => [
'United States'
]
],
'lead_search_criteria' => [
'job_titles' => [
'CEO',
'Founder'
],
'seniorities' => [
'c_suite'
],
'locations' => [
'United States'
],
'limit_by' => 25
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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.generect.com/api/v1/preview/leads/"
payload := strings.NewReader("{\n \"company_search_criteria\": {\n \"industries\": [\n \"Software Development\"\n ],\n \"headcounts\": [\n \"51-200\"\n ],\n \"locations\": [\n \"United States\"\n ]\n },\n \"lead_search_criteria\": {\n \"job_titles\": [\n \"CEO\",\n \"Founder\"\n ],\n \"seniorities\": [\n \"c_suite\"\n ],\n \"locations\": [\n \"United States\"\n ],\n \"limit_by\": 25\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<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.generect.com/api/v1/preview/leads/")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"company_search_criteria\": {\n \"industries\": [\n \"Software Development\"\n ],\n \"headcounts\": [\n \"51-200\"\n ],\n \"locations\": [\n \"United States\"\n ]\n },\n \"lead_search_criteria\": {\n \"job_titles\": [\n \"CEO\",\n \"Founder\"\n ],\n \"seniorities\": [\n \"c_suite\"\n ],\n \"locations\": [\n \"United States\"\n ],\n \"limit_by\": 25\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.generect.com/api/v1/preview/leads/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"company_search_criteria\": {\n \"industries\": [\n \"Software Development\"\n ],\n \"headcounts\": [\n \"51-200\"\n ],\n \"locations\": [\n \"United States\"\n ]\n },\n \"lead_search_criteria\": {\n \"job_titles\": [\n \"CEO\",\n \"Founder\"\n ],\n \"seniorities\": [\n \"c_suite\"\n ],\n \"locations\": [\n \"United States\"\n ],\n \"limit_by\": 25\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"leads": [
{
"id": "ACwAAAE9bk0BxY7Qf2mN4pR8sT1vW3zA5cE6gH9",
"first_name": "Jordan",
"last_name": "Ellis",
"title": "CEO",
"company_name": "Microsoft",
"location": "San Francisco, CA",
"industry": "Software Development",
"seniority": "CXO",
"headcount_range": "51-200"
},
{
"id": "ACwAAAFp2r4Bd1eF3gH5iJ7kL9mN0pQ2rS4tU6v",
"first_name": "Morgan",
"last_name": "Lee",
"title": "VP Sales",
"company_name": "Salesforce",
"location": "New York, NY",
"industry": "Software Development",
"seniority": "VP",
"headcount_range": "201-500"
}
]
},
"meta": {
"amount_charged": 0.004
}
}{
"status": "error",
"status_code": 400,
"detail": {
"company_headcounts": [
"Object with name=999 does not exist."
]
}
}{
"status": "error",
"status_code": 401,
"detail": "Authentication credentials were not provided."
}{
"error": "You are not authorized to use this endpoint."
}Preview
Preview leads
Search database leads with masked response data. Preview results include an internal lead ID for later enrichment and do not include LinkedIn URL, company domain, email, or phone. Billed at $0.002 per returned row — a search that matches nothing is free — and free for the rest of the calendar month once the account’s total spend that month reaches $2,000 (see preview_tier on GET /api/v1/accounts/me/).
POST
/
api
/
v1
/
preview
/
leads
/
Preview leads
curl --request POST \
--url https://api.generect.com/api/v1/preview/leads/ \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"company_search_criteria": {
"industries": [
"Software Development"
],
"headcounts": [
"51-200"
],
"locations": [
"United States"
]
},
"lead_search_criteria": {
"job_titles": [
"CEO",
"Founder"
],
"seniorities": [
"c_suite"
],
"locations": [
"United States"
],
"limit_by": 25
}
}
'import requests
url = "https://api.generect.com/api/v1/preview/leads/"
payload = {
"company_search_criteria": {
"industries": ["Software Development"],
"headcounts": ["51-200"],
"locations": ["United States"]
},
"lead_search_criteria": {
"job_titles": ["CEO", "Founder"],
"seniorities": ["c_suite"],
"locations": ["United States"],
"limit_by": 25
}
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
company_search_criteria: {
industries: ['Software Development'],
headcounts: ['51-200'],
locations: ['United States']
},
lead_search_criteria: {
job_titles: ['CEO', 'Founder'],
seniorities: ['c_suite'],
locations: ['United States'],
limit_by: 25
}
})
};
fetch('https://api.generect.com/api/v1/preview/leads/', 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.generect.com/api/v1/preview/leads/",
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([
'company_search_criteria' => [
'industries' => [
'Software Development'
],
'headcounts' => [
'51-200'
],
'locations' => [
'United States'
]
],
'lead_search_criteria' => [
'job_titles' => [
'CEO',
'Founder'
],
'seniorities' => [
'c_suite'
],
'locations' => [
'United States'
],
'limit_by' => 25
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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.generect.com/api/v1/preview/leads/"
payload := strings.NewReader("{\n \"company_search_criteria\": {\n \"industries\": [\n \"Software Development\"\n ],\n \"headcounts\": [\n \"51-200\"\n ],\n \"locations\": [\n \"United States\"\n ]\n },\n \"lead_search_criteria\": {\n \"job_titles\": [\n \"CEO\",\n \"Founder\"\n ],\n \"seniorities\": [\n \"c_suite\"\n ],\n \"locations\": [\n \"United States\"\n ],\n \"limit_by\": 25\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<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.generect.com/api/v1/preview/leads/")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"company_search_criteria\": {\n \"industries\": [\n \"Software Development\"\n ],\n \"headcounts\": [\n \"51-200\"\n ],\n \"locations\": [\n \"United States\"\n ]\n },\n \"lead_search_criteria\": {\n \"job_titles\": [\n \"CEO\",\n \"Founder\"\n ],\n \"seniorities\": [\n \"c_suite\"\n ],\n \"locations\": [\n \"United States\"\n ],\n \"limit_by\": 25\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.generect.com/api/v1/preview/leads/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"company_search_criteria\": {\n \"industries\": [\n \"Software Development\"\n ],\n \"headcounts\": [\n \"51-200\"\n ],\n \"locations\": [\n \"United States\"\n ]\n },\n \"lead_search_criteria\": {\n \"job_titles\": [\n \"CEO\",\n \"Founder\"\n ],\n \"seniorities\": [\n \"c_suite\"\n ],\n \"locations\": [\n \"United States\"\n ],\n \"limit_by\": 25\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"leads": [
{
"id": "ACwAAAE9bk0BxY7Qf2mN4pR8sT1vW3zA5cE6gH9",
"first_name": "Jordan",
"last_name": "Ellis",
"title": "CEO",
"company_name": "Microsoft",
"location": "San Francisco, CA",
"industry": "Software Development",
"seniority": "CXO",
"headcount_range": "51-200"
},
{
"id": "ACwAAAFp2r4Bd1eF3gH5iJ7kL9mN0pQ2rS4tU6v",
"first_name": "Morgan",
"last_name": "Lee",
"title": "VP Sales",
"company_name": "Salesforce",
"location": "New York, NY",
"industry": "Software Development",
"seniority": "VP",
"headcount_range": "201-500"
}
]
},
"meta": {
"amount_charged": 0.004
}
}{
"status": "error",
"status_code": 400,
"detail": {
"company_headcounts": [
"Object with name=999 does not exist."
]
}
}{
"status": "error",
"status_code": 401,
"detail": "Authentication credentials were not provided."
}{
"error": "You are not authorized to use this endpoint."
}Use Case:
Show masked lead results in SaaS products without exposing paid data such as email, phone, LinkedIn URL, or company domain.Pricing
$0.002 per returned result — one charge per masked row this endpoint returns, and a search that matches nothing costs $0. Preview is never discounted by volume: the price is the same on every Spend & Save tier.Free above $2,000 a month. Once your account’s total spend within the current calendar month reaches $2,000, this endpoint costs nothing for the rest of that month. The counter covers every charge on the account, not only Preview, and it restarts on the 1st (UTC) — requests are billable again from then. The
preview_tier flag on GET /accounts/me/ tells you which side of the threshold you are on.POST /preview/leads/count/, and Preview inside the Generect web app — $0.002 is the API price.Authorizations
Use the required Token prefix. Example: Authorization: Token xxxxxxxxx
Body
application/json
Was this page helpful?