curl --request POST \
--url https://app.pipecorn.com/api/v2/accounts/search/preview \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"included_industries": [
"6",
"96"
],
"included_locations": [
"103644278"
],
"company_size": [
"51-200",
"201-500"
],
"keyword": "saas"
}
'import requests
url = "https://app.pipecorn.com/api/v2/accounts/search/preview"
payload = {
"included_industries": ["6", "96"],
"included_locations": ["103644278"],
"company_size": ["51-200", "201-500"],
"keyword": "saas"
}
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({
included_industries: ['6', '96'],
included_locations: ['103644278'],
company_size: ['51-200', '201-500'],
keyword: 'saas'
})
};
fetch('https://app.pipecorn.com/api/v2/accounts/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/accounts/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([
'included_industries' => [
'6',
'96'
],
'included_locations' => [
'103644278'
],
'company_size' => [
'51-200',
'201-500'
],
'keyword' => 'saas'
]),
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/accounts/search/preview"
payload := strings.NewReader("{\n \"included_industries\": [\n \"6\",\n \"96\"\n ],\n \"included_locations\": [\n \"103644278\"\n ],\n \"company_size\": [\n \"51-200\",\n \"201-500\"\n ],\n \"keyword\": \"saas\"\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/accounts/search/preview")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"included_industries\": [\n \"6\",\n \"96\"\n ],\n \"included_locations\": [\n \"103644278\"\n ],\n \"company_size\": [\n \"51-200\",\n \"201-500\"\n ],\n \"keyword\": \"saas\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.pipecorn.com/api/v2/accounts/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 \"included_industries\": [\n \"6\",\n \"96\"\n ],\n \"included_locations\": [\n \"103644278\"\n ],\n \"company_size\": [\n \"51-200\",\n \"201-500\"\n ],\n \"keyword\": \"saas\"\n}"
response = http.request(request)
puts response.read_body{
"total_count": 4321,
"preview": [
{
"company_name": "Pipecorn",
"industry": "Technology, Information and Internet",
"linkedin_id": "104885158",
"linkedin_url": "https://www.linkedin.com/company/104885158"
}
]
}{
"error": "<string>",
"message": "<string>",
"details": "<string>",
"example": [
"<string>"
],
"invalid_sizes": [
"<string>"
],
"valid_formats": [
"<string>"
],
"valid_values": [
123
],
"valid_currencies": [
"<string>"
],
"account_email": "jsmith@example.com"
}{
"error": "A request with this Idempotency-Key is still being processed",
"code": "idempotency_key_in_use"
}{
"error": "<string>",
"message": "<string>",
"details": "<string>",
"example": [
"<string>"
],
"invalid_sizes": [
"<string>"
],
"valid_formats": [
"<string>"
],
"valid_values": [
123
],
"valid_currencies": [
"<string>"
],
"account_email": "jsmith@example.com"
}{
"error": "<string>",
"message": "<string>",
"details": "<string>",
"example": [
"<string>"
],
"invalid_sizes": [
"<string>"
],
"valid_formats": [
"<string>"
],
"valid_values": [
123
],
"valid_currencies": [
"<string>"
],
"account_email": "jsmith@example.com"
}Preview
Synchronously preview the first 25 matches and the total estimated count for a set of account search filters, without creating an import or consuming credits.
curl --request POST \
--url https://app.pipecorn.com/api/v2/accounts/search/preview \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"included_industries": [
"6",
"96"
],
"included_locations": [
"103644278"
],
"company_size": [
"51-200",
"201-500"
],
"keyword": "saas"
}
'import requests
url = "https://app.pipecorn.com/api/v2/accounts/search/preview"
payload = {
"included_industries": ["6", "96"],
"included_locations": ["103644278"],
"company_size": ["51-200", "201-500"],
"keyword": "saas"
}
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({
included_industries: ['6', '96'],
included_locations: ['103644278'],
company_size: ['51-200', '201-500'],
keyword: 'saas'
})
};
fetch('https://app.pipecorn.com/api/v2/accounts/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/accounts/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([
'included_industries' => [
'6',
'96'
],
'included_locations' => [
'103644278'
],
'company_size' => [
'51-200',
'201-500'
],
'keyword' => 'saas'
]),
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/accounts/search/preview"
payload := strings.NewReader("{\n \"included_industries\": [\n \"6\",\n \"96\"\n ],\n \"included_locations\": [\n \"103644278\"\n ],\n \"company_size\": [\n \"51-200\",\n \"201-500\"\n ],\n \"keyword\": \"saas\"\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/accounts/search/preview")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"included_industries\": [\n \"6\",\n \"96\"\n ],\n \"included_locations\": [\n \"103644278\"\n ],\n \"company_size\": [\n \"51-200\",\n \"201-500\"\n ],\n \"keyword\": \"saas\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.pipecorn.com/api/v2/accounts/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 \"included_industries\": [\n \"6\",\n \"96\"\n ],\n \"included_locations\": [\n \"103644278\"\n ],\n \"company_size\": [\n \"51-200\",\n \"201-500\"\n ],\n \"keyword\": \"saas\"\n}"
response = http.request(request)
puts response.read_body{
"total_count": 4321,
"preview": [
{
"company_name": "Pipecorn",
"industry": "Technology, Information and Internet",
"linkedin_id": "104885158",
"linkedin_url": "https://www.linkedin.com/company/104885158"
}
]
}{
"error": "<string>",
"message": "<string>",
"details": "<string>",
"example": [
"<string>"
],
"invalid_sizes": [
"<string>"
],
"valid_formats": [
"<string>"
],
"valid_values": [
123
],
"valid_currencies": [
"<string>"
],
"account_email": "jsmith@example.com"
}{
"error": "A request with this Idempotency-Key is still being processed",
"code": "idempotency_key_in_use"
}{
"error": "<string>",
"message": "<string>",
"details": "<string>",
"example": [
"<string>"
],
"invalid_sizes": [
"<string>"
],
"valid_formats": [
"<string>"
],
"valid_values": [
123
],
"valid_currencies": [
"<string>"
],
"account_email": "jsmith@example.com"
}{
"error": "<string>",
"message": "<string>",
"details": "<string>",
"example": [
"<string>"
],
"invalid_sizes": [
"<string>"
],
"valid_formats": [
"<string>"
],
"valid_values": [
123
],
"valid_currencies": [
"<string>"
],
"account_email": "jsmith@example.com"
}POST /accounts/search and get back a synchronous preview: the total estimated account count plus the first 25 matching companies. Use it to validate filters and size an audience before kicking off the real search.
Overview
Compared toPOST /accounts/search, the preview:
- Does not create an import job.
- Does not call your webhook.
- Does not consume credits.
- Does not require
webhook_url.
included_industries, excluded_industries, included_locations, excluded_locations, company_size, keyword, min_revenue, max_revenue, revenue_currency, …). webhook_url, name, limit, and streaming are accepted but ignored: the response always contains up to 25 accounts.
Rate Limits
- Your plan’s per-minute request limit, counted per user (see Rate Limiting).
Response
200 OK — returns immediately with:
{
"total_count": 4321,
"preview": [
{
"company_name": "Pipecorn",
"industry": "Technology, Information and Internet",
"linkedin_id": "104885158",
"linkedin_url": "https://www.linkedin.com/company/104885158"
}
]
}
| Field | Type | Notes |
|---|---|---|
total_count | integer | Total estimated number of accounts matching the filters (not capped to 25). |
preview | array of objects | Up to 25 matching accounts. Each entry contains the fields listed above when available. |
Example
{
"included_industries": ["6", "96"],
"included_locations": ["103644278"],
"company_size": ["51-200", "201-500"],
"keyword": "saas"
}
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
Accepts the same filters as POST /accounts/search. Set live: false to preview from Pipecorn's companies database instead of LinkedIn Sales Navigator. webhook_url, name, limit, and streaming are accepted but ignored. The response includes up to 25 matches.
Response
Preview generated successfully.
Was this page helpful?