curl --request POST \
--url https://app.pipecorn.com/api/v2/leads/advanced_search/preview \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"job_titles": [
"VP of Sales",
"Chief Revenue Officer"
],
"seniority_levels": [
"300",
"310"
],
"functions": [
"25"
],
"included_industries": [
"96"
],
"included_locations": [
"101452733"
]
}
'import requests
url = "https://app.pipecorn.com/api/v2/leads/advanced_search/preview"
payload = {
"job_titles": ["VP of Sales", "Chief Revenue Officer"],
"seniority_levels": ["300", "310"],
"functions": ["25"],
"included_industries": ["96"],
"included_locations": ["101452733"]
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
job_titles: ['VP of Sales', 'Chief Revenue Officer'],
seniority_levels: ['300', '310'],
functions: ['25'],
included_industries: ['96'],
included_locations: ['101452733']
})
};
fetch('https://app.pipecorn.com/api/v2/leads/advanced_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://app.pipecorn.com/api/v2/leads/advanced_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([
'job_titles' => [
'VP of Sales',
'Chief Revenue Officer'
],
'seniority_levels' => [
'300',
'310'
],
'functions' => [
'25'
],
'included_industries' => [
'96'
],
'included_locations' => [
'101452733'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.pipecorn.com/api/v2/leads/advanced_search/preview"
payload := strings.NewReader("{\n \"job_titles\": [\n \"VP of Sales\",\n \"Chief Revenue Officer\"\n ],\n \"seniority_levels\": [\n \"300\",\n \"310\"\n ],\n \"functions\": [\n \"25\"\n ],\n \"included_industries\": [\n \"96\"\n ],\n \"included_locations\": [\n \"101452733\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-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://app.pipecorn.com/api/v2/leads/advanced_search/preview")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"job_titles\": [\n \"VP of Sales\",\n \"Chief Revenue Officer\"\n ],\n \"seniority_levels\": [\n \"300\",\n \"310\"\n ],\n \"functions\": [\n \"25\"\n ],\n \"included_industries\": [\n \"96\"\n ],\n \"included_locations\": [\n \"101452733\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.pipecorn.com/api/v2/leads/advanced_search/preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"job_titles\": [\n \"VP of Sales\",\n \"Chief Revenue Officer\"\n ],\n \"seniority_levels\": [\n \"300\",\n \"310\"\n ],\n \"functions\": [\n \"25\"\n ],\n \"included_industries\": [\n \"96\"\n ],\n \"included_locations\": [\n \"101452733\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"total_count": 1234,
"preview": [
{
"full_name": "Ada Lovelace",
"headline": "VP of Sales at Acme",
"current_company": "Acme",
"current_title": "VP of Sales",
"linkedin_id": "104885158",
"profile_url": "https://www.linkedin.com/in/urn:li:fs_salesProfile:(ACoAAAxxxx,NAME_SEARCH,abcde)"
}
]
}Preview
Synchronously preview the first 25 matches and the total estimated count for a set of advanced lead search filters, without creating a Search or consuming credits.
curl --request POST \
--url https://app.pipecorn.com/api/v2/leads/advanced_search/preview \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"job_titles": [
"VP of Sales",
"Chief Revenue Officer"
],
"seniority_levels": [
"300",
"310"
],
"functions": [
"25"
],
"included_industries": [
"96"
],
"included_locations": [
"101452733"
]
}
'import requests
url = "https://app.pipecorn.com/api/v2/leads/advanced_search/preview"
payload = {
"job_titles": ["VP of Sales", "Chief Revenue Officer"],
"seniority_levels": ["300", "310"],
"functions": ["25"],
"included_industries": ["96"],
"included_locations": ["101452733"]
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
job_titles: ['VP of Sales', 'Chief Revenue Officer'],
seniority_levels: ['300', '310'],
functions: ['25'],
included_industries: ['96'],
included_locations: ['101452733']
})
};
fetch('https://app.pipecorn.com/api/v2/leads/advanced_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://app.pipecorn.com/api/v2/leads/advanced_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([
'job_titles' => [
'VP of Sales',
'Chief Revenue Officer'
],
'seniority_levels' => [
'300',
'310'
],
'functions' => [
'25'
],
'included_industries' => [
'96'
],
'included_locations' => [
'101452733'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.pipecorn.com/api/v2/leads/advanced_search/preview"
payload := strings.NewReader("{\n \"job_titles\": [\n \"VP of Sales\",\n \"Chief Revenue Officer\"\n ],\n \"seniority_levels\": [\n \"300\",\n \"310\"\n ],\n \"functions\": [\n \"25\"\n ],\n \"included_industries\": [\n \"96\"\n ],\n \"included_locations\": [\n \"101452733\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-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://app.pipecorn.com/api/v2/leads/advanced_search/preview")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"job_titles\": [\n \"VP of Sales\",\n \"Chief Revenue Officer\"\n ],\n \"seniority_levels\": [\n \"300\",\n \"310\"\n ],\n \"functions\": [\n \"25\"\n ],\n \"included_industries\": [\n \"96\"\n ],\n \"included_locations\": [\n \"101452733\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.pipecorn.com/api/v2/leads/advanced_search/preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"job_titles\": [\n \"VP of Sales\",\n \"Chief Revenue Officer\"\n ],\n \"seniority_levels\": [\n \"300\",\n \"310\"\n ],\n \"functions\": [\n \"25\"\n ],\n \"included_industries\": [\n \"96\"\n ],\n \"included_locations\": [\n \"101452733\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"total_count": 1234,
"preview": [
{
"full_name": "Ada Lovelace",
"headline": "VP of Sales at Acme",
"current_company": "Acme",
"current_title": "VP of Sales",
"linkedin_id": "104885158",
"profile_url": "https://www.linkedin.com/in/urn:li:fs_salesProfile:(ACoAAAxxxx,NAME_SEARCH,abcde)"
}
]
}POST /leads/advanced_search and get back a synchronous preview: the total estimated profile count plus the first 25 matching leads. Use it to validate filters and size an audience before kicking off the real search.
Overview
Compared toPOST /leads/advanced_search, the preview:
- Does not create a
Searchrecord. - Does not call your webhook.
- Does not consume credits.
- Does not require
webhook_url.
webhook_url, name, limit, streaming, scale, and custom are accepted but ignored: the response always contains up to 25 leads.
Requirements
- With
live: true(the default), a connected Sales Navigator account. Withlive: falsethe preview runs on the Pipecorn database and needs no integration. - At least one filter or
keywordmust be provided.
Rate Limits
- 1 request per second per user (5 per second with
live: false), on top of your plan’s per-minute limit (see Rate Limiting).
Response
200 OK — returns immediately with:
{
"total_count": 1234,
"preview": [
{
"full_name": "Ada Lovelace",
"headline": "VP of Sales at Acme",
"current_company": "Acme",
"current_title": "VP of Sales",
"linkedin_id": "104885158",
"profile_url": "https://www.linkedin.com/in/urn:li:fs_salesProfile:(ACoAAAxxxx,NAME_SEARCH,abcde)"
}
]
}
| Field | Type | Notes |
|---|---|---|
total_count | integer | Total estimated number of leads matching the filters (not capped to 25). |
preview | array of objects | Up to 25 matching leads. Each entry contains the fields listed above when available. |
Errors
| Status | When |
|---|---|
400 Bad Request | No filter or keyword provided. |
401 Unauthorized | Missing or invalid API key. |
403 Forbidden | Account closed, or (with live: true) LinkedIn refused access to the resource. |
422 Unprocessable Entity | Invalid filter shape, enum ID outside the authorized list (e.g. unknown functions, seniority_levels, company_size, etc.), or (with live: true) Sales Navigator connection expired. |
429 Too Many Requests | Per-user rate limit (1 req/s, 5 req/s with live: false, or plan limit) or upstream LinkedIn rate limit. |
Example
{
"job_titles": ["VP of Sales", "Chief Revenue Officer"],
"seniority_levels": ["300", "310"],
"functions": ["25"],
"included_industries": ["96"],
"included_locations": ["101452733"]
}
Authorizations
Your API key
Headers
A unique value you generate per operation, such as a UUID. Retrying with the same key and the same body returns the stored response instead of running the request again, so a retry after a timeout never charges twice. Successful responses are kept for 24 hours; a failed request is not stored and can be retried with the same key.
255"4f1c2e9a-8a7d-4c1b-9f63-2d6e0b5a7c11"
Body
Same filter parameters as POST /leads/advanced_search, including live (default true) to preview from Pipecorn's people database instead of LinkedIn Sales Navigator. webhook_url, name, limit, streaming, scale, and custom are accepted but ignored — the response is always the first 25 results.
Accepts the same filter object as POST /leads/advanced_search. See that endpoint for the full list of supported filters.
Was this page helpful?