curl --request POST \
--url https://app.pipecorn.com/api/v2/accounts/count_profiles \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"company_linkedin_id": "1234567",
"function": "25",
"persona_id": "8f2c1b7e-3a4d-4e5f-9a6b-1c2d3e4f5a6b",
"title_to_include": [
"Software Engineer",
"Developer"
],
"title_to_exclude": [
"Junior"
],
"included_locations": [
"country:fr"
],
"excluded_locations": [
"region:fr-11"
],
"live": false
}
'import requests
url = "https://app.pipecorn.com/api/v2/accounts/count_profiles"
payload = {
"company_linkedin_id": "1234567",
"function": "25",
"persona_id": "8f2c1b7e-3a4d-4e5f-9a6b-1c2d3e4f5a6b",
"title_to_include": ["Software Engineer", "Developer"],
"title_to_exclude": ["Junior"],
"included_locations": ["country:fr"],
"excluded_locations": ["region:fr-11"],
"live": False
}
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({
company_linkedin_id: '1234567',
function: '25',
persona_id: '8f2c1b7e-3a4d-4e5f-9a6b-1c2d3e4f5a6b',
title_to_include: ['Software Engineer', 'Developer'],
title_to_exclude: ['Junior'],
included_locations: ['country:fr'],
excluded_locations: ['region:fr-11'],
live: false
})
};
fetch('https://app.pipecorn.com/api/v2/accounts/count_profiles', 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/count_profiles",
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_linkedin_id' => '1234567',
'function' => '25',
'persona_id' => '8f2c1b7e-3a4d-4e5f-9a6b-1c2d3e4f5a6b',
'title_to_include' => [
'Software Engineer',
'Developer'
],
'title_to_exclude' => [
'Junior'
],
'included_locations' => [
'country:fr'
],
'excluded_locations' => [
'region:fr-11'
],
'live' => false
]),
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/count_profiles"
payload := strings.NewReader("{\n \"company_linkedin_id\": \"1234567\",\n \"function\": \"25\",\n \"persona_id\": \"8f2c1b7e-3a4d-4e5f-9a6b-1c2d3e4f5a6b\",\n \"title_to_include\": [\n \"Software Engineer\",\n \"Developer\"\n ],\n \"title_to_exclude\": [\n \"Junior\"\n ],\n \"included_locations\": [\n \"country:fr\"\n ],\n \"excluded_locations\": [\n \"region:fr-11\"\n ],\n \"live\": false\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/count_profiles")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"company_linkedin_id\": \"1234567\",\n \"function\": \"25\",\n \"persona_id\": \"8f2c1b7e-3a4d-4e5f-9a6b-1c2d3e4f5a6b\",\n \"title_to_include\": [\n \"Software Engineer\",\n \"Developer\"\n ],\n \"title_to_exclude\": [\n \"Junior\"\n ],\n \"included_locations\": [\n \"country:fr\"\n ],\n \"excluded_locations\": [\n \"region:fr-11\"\n ],\n \"live\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.pipecorn.com/api/v2/accounts/count_profiles")
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 \"company_linkedin_id\": \"1234567\",\n \"function\": \"25\",\n \"persona_id\": \"8f2c1b7e-3a4d-4e5f-9a6b-1c2d3e4f5a6b\",\n \"title_to_include\": [\n \"Software Engineer\",\n \"Developer\"\n ],\n \"title_to_exclude\": [\n \"Junior\"\n ],\n \"included_locations\": [\n \"country:fr\"\n ],\n \"excluded_locations\": [\n \"region:fr-11\"\n ],\n \"live\": false\n}"
response = http.request(request)
puts response.read_body{
"total": 26,
"function": "Sales",
"persona_id": "8f2c1b7e-3a4d-4e5f-9a6b-1c2d3e4f5a6b",
"title_to_include": [
"Software Engineer",
"Developer"
],
"title_to_exclude": [
"Junior"
],
"included_locations": [
"country:fr"
],
"excluded_locations": [
"region:fr-11"
]
}# people at company
Count the profiles of a company, optionally narrowed by LinkedIn function, job titles (or a persona’s job titles) and locations. By default the count comes from Pipecorn’s people database (live: false), with no integration required. Set live: true to count live on LinkedIn Sales Navigator instead, which requires a connected Sales Navigator account.
Credits: 1 credit per request, with live: true or live: false. A company that can’t be resolved returns total: 0 and costs nothing.
Rate limit: 20 requests per second, on top of your plan’s per-minute request limit
curl --request POST \
--url https://app.pipecorn.com/api/v2/accounts/count_profiles \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"company_linkedin_id": "1234567",
"function": "25",
"persona_id": "8f2c1b7e-3a4d-4e5f-9a6b-1c2d3e4f5a6b",
"title_to_include": [
"Software Engineer",
"Developer"
],
"title_to_exclude": [
"Junior"
],
"included_locations": [
"country:fr"
],
"excluded_locations": [
"region:fr-11"
],
"live": false
}
'import requests
url = "https://app.pipecorn.com/api/v2/accounts/count_profiles"
payload = {
"company_linkedin_id": "1234567",
"function": "25",
"persona_id": "8f2c1b7e-3a4d-4e5f-9a6b-1c2d3e4f5a6b",
"title_to_include": ["Software Engineer", "Developer"],
"title_to_exclude": ["Junior"],
"included_locations": ["country:fr"],
"excluded_locations": ["region:fr-11"],
"live": False
}
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({
company_linkedin_id: '1234567',
function: '25',
persona_id: '8f2c1b7e-3a4d-4e5f-9a6b-1c2d3e4f5a6b',
title_to_include: ['Software Engineer', 'Developer'],
title_to_exclude: ['Junior'],
included_locations: ['country:fr'],
excluded_locations: ['region:fr-11'],
live: false
})
};
fetch('https://app.pipecorn.com/api/v2/accounts/count_profiles', 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/count_profiles",
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_linkedin_id' => '1234567',
'function' => '25',
'persona_id' => '8f2c1b7e-3a4d-4e5f-9a6b-1c2d3e4f5a6b',
'title_to_include' => [
'Software Engineer',
'Developer'
],
'title_to_exclude' => [
'Junior'
],
'included_locations' => [
'country:fr'
],
'excluded_locations' => [
'region:fr-11'
],
'live' => false
]),
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/count_profiles"
payload := strings.NewReader("{\n \"company_linkedin_id\": \"1234567\",\n \"function\": \"25\",\n \"persona_id\": \"8f2c1b7e-3a4d-4e5f-9a6b-1c2d3e4f5a6b\",\n \"title_to_include\": [\n \"Software Engineer\",\n \"Developer\"\n ],\n \"title_to_exclude\": [\n \"Junior\"\n ],\n \"included_locations\": [\n \"country:fr\"\n ],\n \"excluded_locations\": [\n \"region:fr-11\"\n ],\n \"live\": false\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/count_profiles")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"company_linkedin_id\": \"1234567\",\n \"function\": \"25\",\n \"persona_id\": \"8f2c1b7e-3a4d-4e5f-9a6b-1c2d3e4f5a6b\",\n \"title_to_include\": [\n \"Software Engineer\",\n \"Developer\"\n ],\n \"title_to_exclude\": [\n \"Junior\"\n ],\n \"included_locations\": [\n \"country:fr\"\n ],\n \"excluded_locations\": [\n \"region:fr-11\"\n ],\n \"live\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.pipecorn.com/api/v2/accounts/count_profiles")
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 \"company_linkedin_id\": \"1234567\",\n \"function\": \"25\",\n \"persona_id\": \"8f2c1b7e-3a4d-4e5f-9a6b-1c2d3e4f5a6b\",\n \"title_to_include\": [\n \"Software Engineer\",\n \"Developer\"\n ],\n \"title_to_exclude\": [\n \"Junior\"\n ],\n \"included_locations\": [\n \"country:fr\"\n ],\n \"excluded_locations\": [\n \"region:fr-11\"\n ],\n \"live\": false\n}"
response = http.request(request)
puts response.read_body{
"total": 26,
"function": "Sales",
"persona_id": "8f2c1b7e-3a4d-4e5f-9a6b-1c2d3e4f5a6b",
"title_to_include": [
"Software Engineer",
"Developer"
],
"title_to_exclude": [
"Junior"
],
"included_locations": [
"country:fr"
],
"excluded_locations": [
"region:fr-11"
]
}Count Profiles
The Count Profiles endpoint allows you to count the number of employee profiles matching specific criteria for a company. You can filter by LinkedIn function, job titles (typed in or taken from a persona) and locations to get precise counts of potential prospects.Data source
live: false(default): the count comes from Pipecorn’s people database, with no integration required. Counts can be lower than Sales Navigator’s, since the database does not cover every LinkedIn profile.live: true: the count comes live from LinkedIn Sales Navigator, so it needs a connected Sales Navigator account; an expired connection answers422.
live answers 422.
Credits and rate limits
- Credits: 1 credit per request, with
live: trueorlive: false. A company that can’t be resolved returnstotal: 0and costs nothing. - 20 requests per second per user, on top of your plan’s per-minute limit (see Rate Limiting). The counter is shared with Department headcount.
402 Payment Required and code: "insufficient_credits" before any count. A
workspace weekly credit limit returns 403 Forbidden with
code: "workspace_limit_exceeded" instead. See
Credit and limit errors.
Required Parameters
You must provide one of the following to identify the target company:company_linkedin_id: The LinkedIn company identifiercompany_linkedin_url: The full URL of the company’s LinkedIn profile (regular or Sales Navigator)
Function
function takes one LinkedIn function id, from "1" to "26" (for example
"25" for Sales or "8" for Engineering). The response echoes the function’s
name, e.g. "function": "Sales". Any other value answers 422 with
"Invalid function. Should be between 1 and 26".
Persona
persona_id takes the UUID of one of your personas (see List personas). Its included and excluded job titles are counted exactly as if you had sent them in title_to_include and title_to_exclude. With live: false, the persona’s locations are applied too. Its industries and company sizes are always ignored: the count already targets one company.
persona_idcannot be combined withtitle_to_includeortitle_to_exclude: sending both answers422.- A persona that doesn’t exist or isn’t yours answers
404with"Persona not found".
{
"company_linkedin_id": "1234567",
"persona_id": "8f2c1b7e-3a4d-4e5f-9a6b-1c2d3e4f5a6b",
"included_locations": ["country:fr"]
}
Location IDs Reference
Location IDs depend onlive, and are retrieved with the Location Ids endpoint:
live: false(default): Pipecorn database IDs, with"source": "database".live: true: LinkedIn Sales Navigator IDs, with"source": "live".
live: true. Sales Navigator IDs are still accepted with live: false, but match less completely than database IDs, so use the database ones. Simply provide a location name (e.g., “San Francisco”) and the API will return all matching locations with their IDs.
Request Example
Identify the company withcompany_linkedin_id or company_linkedin_url; one of the two is required.
{
"company_linkedin_id": "1234567",
"title_to_include": ["Software Engineer", "Developer"],
"title_to_exclude": ["Junior"],
"included_locations": ["country:fr"],
"excluded_locations": ["region:fr-11"]
}
{
"company_linkedin_url": "https://www.linkedin.com/company/microsoft",
"title_to_include": ["Software Engineer", "Developer"]
}
Response Example
{
"total": 26,
"title_to_include": ["Software Engineer", "Developer"],
"title_to_exclude": ["Junior"],
"included_locations": ["country:fr"],
"excluded_locations": ["region:fr-11"]
}
Understanding the Response
total: The total number of profiles matching your criteriafunction: Name of the requested function, whenfunctionwas sentpersona_id: The persona applied, whenpersona_idwas senttitle_to_include: List of job titles that were included in the search (the persona’s, whenpersona_idwas sent)title_to_exclude: List of job titles that were excluded from the search (the persona’s, whenpersona_idwas sent)included_locations: List of Location IDs that were includedexcluded_locations: List of Location IDs that were excluded
Tips
- Use location IDs to target specific geographic areas
- Combine title inclusions and exclusions to refine your search
- Keep your title filters relevant to ensure accurate results
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
- Option 1
- Option 2
Optional. UUID of one of your personas (see GET /personas). Its included and excluded job titles are counted as title_to_include / title_to_exclude. With live: false, its locations are applied too; its industries and company sizes are always ignored. Cannot be combined with title_to_include or title_to_exclude (422). An unknown persona returns 404.
"8f2c1b7e-3a4d-4e5f-9a6b-1c2d3e4f5a6b"
Data source toggle. false (default) counts in Pipecorn's people database, with no integration required; location IDs then come from the Pipecorn database (Location Ids endpoint with "source": "database"), and a persona's locations are applied as well as its job titles. true counts live on LinkedIn Sales Navigator and requires a connected Sales Navigator account. A non-boolean value returns 422.
false
Response
Successfully counted matching profiles
Was this page helpful?