Skip to main content
POST
Count matching profiles

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 answers 422.
A non-boolean live answers 422.

Credits and rate limits

  • Credits: 1 credit per request, with live: true or live: false. A company that can’t be resolved returns total: 0 and 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.
If your balance is below 1 credit, the request is rejected with 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 identifier
  • company_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_id cannot be combined with title_to_include or title_to_exclude: sending both answers 422.
  • A persona that doesn’t exist or isn’t yours answers 404 with "Persona not found".

Location IDs Reference

Location IDs depend on live, 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".
Database IDs don’t work with 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 with company_linkedin_id or company_linkedin_url; one of the two is required.
The same request with the company’s LinkedIn URL instead of its ID:

Response Example

Understanding the Response

  • total: The total number of profiles matching your criteria
  • function: Name of the requested function, when function was sent
  • persona_id: The persona applied, when persona_id was sent
  • title_to_include: List of job titles that were included in the search (the persona’s, when persona_id was sent)
  • title_to_exclude: List of job titles that were excluded from the search (the persona’s, when persona_id was sent)
  • included_locations: List of Location IDs that were included
  • excluded_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

Authorizations

X-API-KEY
string
header
required

Your API key

Headers

Idempotency-Key
string

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.

Maximum string length: 255
Example:

"4f1c2e9a-8a7d-4c1b-9f63-2d6e0b5a7c11"

Body

application/json
company_linkedin_id
string
required

LinkedIn company identifier

Example:

"1234567"

function
string

LinkedIn function id, from 1 to 26 (e.g. 25 for Sales, 8 for Engineering). Only profiles in that function are counted, and the response echoes the function's name in function. Any other value returns 422.

Example:

"25"

persona_id
string<uuid>

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.

Example:

"8f2c1b7e-3a4d-4e5f-9a6b-1c2d3e4f5a6b"

title_to_include
string[]

List of job titles that were included in the search

Example:
title_to_exclude
string[]

List of job titles that were excluded from the search

Example:
included_locations
string[]

Location IDs to include. With live: true, LinkedIn Sales Navigator location IDs; with live: false, Pipecorn database location IDs ("source": "database" in the Location Ids endpoint). An ID of the other kind returns 422.

Example:
excluded_locations
string[]

Location IDs to exclude. With live: true, LinkedIn Sales Navigator location IDs; with live: false, Pipecorn database location IDs ("source": "database" in the Location Ids endpoint). An ID of the other kind returns 422.

Example:
live
boolean
default:false

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.

Example:

false

Response

Successfully counted matching profiles

total
integer

Total number of matching profiles

Example:

26

function
string

Name of the requested function. Present only when function was sent.

Example:

"Sales"

persona_id
string

UUID of the persona applied. Present only when persona_id was sent; its job titles are echoed in title_to_include and title_to_exclude.

Example:

"8f2c1b7e-3a4d-4e5f-9a6b-1c2d3e4f5a6b"

title_to_include
string[]

List of job titles that were included in the search

Example:
title_to_exclude
string[]

List of job titles that were excluded from the search

Example:
included_locations
string[]

List of Location IDs that were included in the search

Example:
excluded_locations
string[]

List of Location IDs that were excluded from the search

Example: