curl --request POST \
--url https://app.pipecorn.com/api/v2/leads \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"search_url": "<string>",
"persona_id": "3f1c2e9a-8a7d-4c1b-9f63-2d6e0b5a7c11",
"webhook_url": "<string>",
"name": "<string>",
"streaming": true,
"custom": {
"hubspot_id": "134567"
},
"limit": 100,
"scale": true,
"position": "start"
}
'import requests
url = "https://app.pipecorn.com/api/v2/leads"
payload = {
"search_url": "<string>",
"persona_id": "3f1c2e9a-8a7d-4c1b-9f63-2d6e0b5a7c11",
"webhook_url": "<string>",
"name": "<string>",
"streaming": True,
"custom": { "hubspot_id": "134567" },
"limit": 100,
"scale": True,
"position": "start"
}
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({
search_url: '<string>',
persona_id: '3f1c2e9a-8a7d-4c1b-9f63-2d6e0b5a7c11',
webhook_url: '<string>',
name: '<string>',
streaming: true,
custom: {hubspot_id: '134567'},
limit: 100,
scale: true,
position: 'start'
})
};
fetch('https://app.pipecorn.com/api/v2/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://app.pipecorn.com/api/v2/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([
'search_url' => '<string>',
'persona_id' => '3f1c2e9a-8a7d-4c1b-9f63-2d6e0b5a7c11',
'webhook_url' => '<string>',
'name' => '<string>',
'streaming' => true,
'custom' => [
'hubspot_id' => '134567'
],
'limit' => 100,
'scale' => true,
'position' => 'start'
]),
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"
payload := strings.NewReader("{\n \"search_url\": \"<string>\",\n \"persona_id\": \"3f1c2e9a-8a7d-4c1b-9f63-2d6e0b5a7c11\",\n \"webhook_url\": \"<string>\",\n \"name\": \"<string>\",\n \"streaming\": true,\n \"custom\": {\n \"hubspot_id\": \"134567\"\n },\n \"limit\": 100,\n \"scale\": true,\n \"position\": \"start\"\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")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"search_url\": \"<string>\",\n \"persona_id\": \"3f1c2e9a-8a7d-4c1b-9f63-2d6e0b5a7c11\",\n \"webhook_url\": \"<string>\",\n \"name\": \"<string>\",\n \"streaming\": true,\n \"custom\": {\n \"hubspot_id\": \"134567\"\n },\n \"limit\": 100,\n \"scale\": true,\n \"position\": \"start\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.pipecorn.com/api/v2/leads")
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 \"search_url\": \"<string>\",\n \"persona_id\": \"3f1c2e9a-8a7d-4c1b-9f63-2d6e0b5a7c11\",\n \"webhook_url\": \"<string>\",\n \"name\": \"<string>\",\n \"streaming\": true,\n \"custom\": {\n \"hubspot_id\": \"134567\"\n },\n \"limit\": 100,\n \"scale\": true,\n \"position\": \"start\"\n}"
response = http.request(request)
puts response.read_body{
"message": {
"id": "8e1dcba0-f0bb-4071-99fc-f18ba6559ccc",
"search_name": "Lead search - API - 04/05/2026 12:34",
"search_url": "https://www.linkedin.com/sales/search/people?query=(filters%3AList(...))",
"expected_profiles_count": 842,
"created_at": "2026-05-04T12:34:56Z",
"custom": {
"hubspot_id": "134567"
}
},
"status_url": "https://app.pipecorn.com/api/v2/searches/8e1dcba0-f0bb-4071-99fc-f18ba6559ccc"
}People search
Initiates a new lead search based on the provided parameters.
With a workspace key, the search joins your workspace’s queue instead of starting on one member’s account: the first member whose LinkedIn session is free and whose scraping quota covers it runs it. expected_profiles_count is then counted from the Pipecorn people database, and saved, recent or shared Sales Navigator searches are refused. See Lead search queue.
Rate limit: 1 request per second, on top of your plan’s per-minute request limit. With a workspace key, only the workspace’s per-minute limit applies, shared by every POST /leads made with the key.
curl --request POST \
--url https://app.pipecorn.com/api/v2/leads \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"search_url": "<string>",
"persona_id": "3f1c2e9a-8a7d-4c1b-9f63-2d6e0b5a7c11",
"webhook_url": "<string>",
"name": "<string>",
"streaming": true,
"custom": {
"hubspot_id": "134567"
},
"limit": 100,
"scale": true,
"position": "start"
}
'import requests
url = "https://app.pipecorn.com/api/v2/leads"
payload = {
"search_url": "<string>",
"persona_id": "3f1c2e9a-8a7d-4c1b-9f63-2d6e0b5a7c11",
"webhook_url": "<string>",
"name": "<string>",
"streaming": True,
"custom": { "hubspot_id": "134567" },
"limit": 100,
"scale": True,
"position": "start"
}
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({
search_url: '<string>',
persona_id: '3f1c2e9a-8a7d-4c1b-9f63-2d6e0b5a7c11',
webhook_url: '<string>',
name: '<string>',
streaming: true,
custom: {hubspot_id: '134567'},
limit: 100,
scale: true,
position: 'start'
})
};
fetch('https://app.pipecorn.com/api/v2/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://app.pipecorn.com/api/v2/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([
'search_url' => '<string>',
'persona_id' => '3f1c2e9a-8a7d-4c1b-9f63-2d6e0b5a7c11',
'webhook_url' => '<string>',
'name' => '<string>',
'streaming' => true,
'custom' => [
'hubspot_id' => '134567'
],
'limit' => 100,
'scale' => true,
'position' => 'start'
]),
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"
payload := strings.NewReader("{\n \"search_url\": \"<string>\",\n \"persona_id\": \"3f1c2e9a-8a7d-4c1b-9f63-2d6e0b5a7c11\",\n \"webhook_url\": \"<string>\",\n \"name\": \"<string>\",\n \"streaming\": true,\n \"custom\": {\n \"hubspot_id\": \"134567\"\n },\n \"limit\": 100,\n \"scale\": true,\n \"position\": \"start\"\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")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"search_url\": \"<string>\",\n \"persona_id\": \"3f1c2e9a-8a7d-4c1b-9f63-2d6e0b5a7c11\",\n \"webhook_url\": \"<string>\",\n \"name\": \"<string>\",\n \"streaming\": true,\n \"custom\": {\n \"hubspot_id\": \"134567\"\n },\n \"limit\": 100,\n \"scale\": true,\n \"position\": \"start\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.pipecorn.com/api/v2/leads")
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 \"search_url\": \"<string>\",\n \"persona_id\": \"3f1c2e9a-8a7d-4c1b-9f63-2d6e0b5a7c11\",\n \"webhook_url\": \"<string>\",\n \"name\": \"<string>\",\n \"streaming\": true,\n \"custom\": {\n \"hubspot_id\": \"134567\"\n },\n \"limit\": 100,\n \"scale\": true,\n \"position\": \"start\"\n}"
response = http.request(request)
puts response.read_body{
"message": {
"id": "8e1dcba0-f0bb-4071-99fc-f18ba6559ccc",
"search_name": "Lead search - API - 04/05/2026 12:34",
"search_url": "https://www.linkedin.com/sales/search/people?query=(filters%3AList(...))",
"expected_profiles_count": 842,
"created_at": "2026-05-04T12:34:56Z",
"custom": {
"hubspot_id": "134567"
}
},
"status_url": "https://app.pipecorn.com/api/v2/searches/8e1dcba0-f0bb-4071-99fc-f18ba6559ccc"
}search_url must be a LinkedIn Sales Navigator search URL (https://www.linkedin.com/sales/search/...). Any other URL, such as a regular LinkedIn search or a profile URL, is rejected with 422 Unprocessable Entity:
{
"error": "Invalid search url. Provide a LinkedIn Sales Navigator search URL (linkedin.com/sales/search/...)"
}
Rate Limits
- 1 request per second per user, on top of your plan’s per-minute limit (see Rate Limiting).
- With a workspace key, only the workspace’s per-minute limit applies.
With a Workspace Key
With a workspace key, the search joins your workspace’s queue and starts on the first member whose LinkedIn session is free and whose quota covers it. Passposition: "start" to put it ahead of the searches already waiting. expected_profiles_count then comes from the Pipecorn people database, and saved, recent or shared Sales Navigator searches answer 422. See Lead search queue.
Scale Parameter
Thescale parameter (boolean, optional) allows you to increase your volume of requests by omitting the following fields:
connections_countheadline- Vanity LinkedIn profile URL (like
https://www.linkedin.com/in/mathieu-brun-picard/)
scale is set to true, you will still receive a LinkedIn profile URL, but it will use the user ID instead of the vanity URL format (like https://linkedin.com/in/ACwAACaX8uYBfAh-5YxmfObz4mVOKYih3zxa-TM).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
Lead search parameters
A LinkedIn Sales Navigator search URL (https://www.linkedin.com/sales/search/...). Any other URL is rejected with 422. Required unless persona_id is sent.
UUID of one of your personas. Its Sales Navigator search URL is used when search_url is omitted, and its name when name is omitted. An unknown UUID returns 404.
"3f1c2e9a-8a7d-4c1b-9f63-2d6e0b5a7c11"
Optional webhook URL to receive notifications when the search is complete
Name of the lead search. Defaults to a timestamped name when omitted.
When set to true, leads will be sent individually to the webhook_url as they are found. This is ideal for integration with platforms like Clay that process leads in real-time.
true
Custom fields to include with the lead search that will be returned in the webhook (like crm id, etc.)
{ "hubspot_id": "134567" }
Maximum number of leads to return, from 1 to 2500; any other value returns 422. If omitted, every lead the search finds is returned, up to 2500.
1 <= x <= 2500100
When set to true, increases request volume by omitting the following fields: connections_count, headline, and vanity LinkedIn profile URL. You will still receive a LinkedIn profile URL, but it will use the user ID instead of the vanity URL (e.g., https://www.linkedin.com/in/mathieu-brun-picard/).
true
Workspace key only. Where the search joins your workspace's lead search queue: end (default) behind the searches already waiting, start ahead of them. Any other value returns 422. Ignored with a personal key. See Lead search queue.
end, start "start"
Response
Lead search created. Results will be delivered to webhook_url.
Was this page helpful?