Skip to main content
POST
/
leads
Create a new lead search
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>",
  "name": "<string>",
  "webhook_url": "<string>",
  "streaming": true,
  "custom": {
    "hubspot_id": "134567"
  },
  "limit": 100,
  "scale": true
}
'
import requests

url = "https://app.pipecorn.com/api/v2/leads"

payload = {
"search_url": "<string>",
"name": "<string>",
"webhook_url": "<string>",
"streaming": True,
"custom": { "hubspot_id": "134567" },
"limit": 100,
"scale": True
}
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>',
name: '<string>',
webhook_url: '<string>',
streaming: true,
custom: {hubspot_id: '134567'},
limit: 100,
scale: true
})
};

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>',
'name' => '<string>',
'webhook_url' => '<string>',
'streaming' => true,
'custom' => [
'hubspot_id' => '134567'
],
'limit' => 100,
'scale' => true
]),
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 \"name\": \"<string>\",\n \"webhook_url\": \"<string>\",\n \"streaming\": true,\n \"custom\": {\n \"hubspot_id\": \"134567\"\n },\n \"limit\": 100,\n \"scale\": true\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 \"name\": \"<string>\",\n \"webhook_url\": \"<string>\",\n \"streaming\": true,\n \"custom\": {\n \"hubspot_id\": \"134567\"\n },\n \"limit\": 100,\n \"scale\": true\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 \"name\": \"<string>\",\n \"webhook_url\": \"<string>\",\n \"streaming\": true,\n \"custom\": {\n \"hubspot_id\": \"134567\"\n },\n \"limit\": 100,\n \"scale\": true\n}"

response = http.request(request)
puts response.read_body
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "status": "processing"
}
{
"error": 123,
"message": "<string>"
}
{
"error": 123,
"message": "<string>"
}
{
"error": 123,
"message": "<string>"
}
{
"error": 123,
"message": "<string>"
}

Scale Parameter

The scale parameter (boolean, optional) allows you to increase your volume of requests by omitting the following fields:
  • connections_count
  • headline
  • Vanity LinkedIn profile URL (like https://www.linkedin.com/in/mathieu-brun-picard/)
When 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

X-API-KEY
string
header
required

Your API key

Body

application/json

Lead search parameters

search_url
string<uri>
required

The LinkedIn search URL to extract leads from

name
string
required

Name of the lead search

webhook_url
string<uri>

Optional webhook URL to receive notifications when the search is complete

streaming
boolean
default:false

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.

Example:

true

custom
object

Custom fields to include with the lead search that will be returned in the webhook (like crm id, etc.)

Example:
{ "hubspot_id": "134567" }
limit
integer

Optional parameter to limit the number of results returned. If not specified, all matching leads will be returned.

Required range: x >= 1
Example:

100

scale
boolean
default:false

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/).

Example:

true

Response

Lead search initiated successfully

id
string<uuid>

The ID of the created lead search

status
enum<string>

The status of the lead search

Available options:
processing