Skip to main content

LinkedIn Profile Search API

Written by Kadri - RichAPI Support Team

POST /profile_search • Credits: 0.1 credits per profile returned

LinkedIn Profile Search returns LinkedIn member profiles that match name, title, company, school, location and industry filters. The response holds an elements array of profiles and a pagination object. Each profile in elements costs 0.1 credits, so a page of 10 profiles costs 1 credit, or $0.02.

What does LinkedIn Profile Search do?

LinkedIn Profile Search runs a live search against LinkedIn. A recruiter needs the people at one company who hold one job title. LinkedIn Profile Search takes that combination as plain string filters and returns the LinkedIn result list for it. Thirteen filters cover name, job title, current company, past company, school, location, geography, industry, and the followers of a profile. One request returns one page of profiles. The response reports the total match count in pagination.totalElements and the page count in pagination.totalPages.

Which endpoint does LinkedIn Profile Search use?

  • Method: POST

  • URL: https://api.richapi.ai/api/v1/profile_search

  • Authentication: x-api-key header

  • Request format: JSON request body

  • Response: synchronous JSON

  • Credits: 0.1 per profile returned

LinkedIn Profile Search accepts the POST method only. If you send GET, the API returns 405 with the error profile_search only supports POST. Put every parameter in the JSON request body. A parameter in the query string returns 400 with the error Query parameters are not supported for this endpoint.

How to send a LinkedIn Profile Search request

  1. Copy your API key from the RichAPI dashboard.

  2. Set the x-api-key header to your API key.

  3. Set the Content-Type header to application/json.

  4. Add one filter or more to the JSON request body, for example title and current_company.

  5. Set page to 1 for the first page.

  6. Send a POST request to https://api.richapi.ai/api/v1/profile_search.

  7. Read the profiles from the elements array in the response.

  8. Count the profiles in elements to confirm the credit charge.

CAUTION: LinkedIn Profile Search charges 0.1 credits for each profile in elements. A page of 25 profiles costs 2.5 credits, or $0.05.

cURL

curl -X POST https://api.richapi.ai/api/v1/profile_search   
-H "x-api-key: YOUR_API_KEY"
-H "Content-Type: application/json"
-d '{
"title": "VP Engineering",
"current_company": "https://www.linkedin.com/company/microsoft/",
"location": "United States",
"page": 1
}'

Python

import requests

response = requests.post(
"https://api.richapi.ai/api/v1/profile_search",
headers={"x-api-key": "YOUR_API_KEY"},
json={
"title": "VP Engineering",
"current_company": "https://www.linkedin.com/company/microsoft/",
"location": "United States",
"page": 1,
},
timeout=60,
)
response.raise_for_status()
print(response.json())

Node.js

const response = await fetch("https://api.richapi.ai/api/v1/profile_search", {
method: "POST",
headers: {
"x-api-key": "YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
title: "VP Engineering",
current_company: "https://www.linkedin.com/company/microsoft/",
location: "United States",
page: 1,
}),
});

const data = await response.json();
console.log(data);

What parameters does LinkedIn Profile Search accept?

Every LinkedIn Profile Search parameter is optional. Send one filter or more. A request with no filter returns no useful result.

Parameter

Type

Required

Default

Description

search

string

No

""

Name to search, for example John Doe. The name match is fuzzy.

first_name

string

No

""

Strict first-name filter.

last_name

string

No

""

Strict last-name filter.

title

string

No

""

Job title filter, for example CEO.

current_company

string

No

""

Company ID or LinkedIn company URL. Use commas for more than one company.

past_company

string

No

""

Past company ID or company URL. Use commas for more than one company.

school

string

No

""

School ID or school URL. Use commas for more than one school.

location

string

No

""

Location text from the LinkedIn autocomplete list, for example Berlin.

geo_id

string

No

""

LinkedIn Geo ID. When the request holds geo_id and location, geo_id wins.

industry_id

string

No

""

LinkedIn industry ID. Use commas for more than one industry.

page

integer

No

0

Page number. Page numbers are 1-based, so send 1 for the first page.

follower_of

string

No

""

Profile URL or profile ID. The search returns the followers of that profile. Use commas for more than one profile.

keywords_company

string

No

""

Keyword filter on the company name.

keywords_school

string

No

""

Keyword filter on the school name.

Which parameter names does the LinkedIn Profile Search request body use?

The LinkedIn Profile Search request body uses flat snake_case parameter names, for example first_name and current_company. A camelCase name such as firstName or geoId returns 400 with the error Unknown input field(s) and charges no credits.

What does LinkedIn Profile Search return?

This example response shows two profiles. The second profile is hidden, so publicIdentifier and linkedinUrl are null and name is LinkedIn Member. The query object echoes the filters in camelCase, not in the snake_case names of the request body.

{
"elements": [
{
"publicIdentifier": "amara-okonkwo",
"id": "ACoAAB1kQ2wBz7YtN0pXfR4mLdT9vKcE3sHgWqA",
"name": "Amara Okonkwo",
"position": "VP Engineering at Northwind Robotics",
"location": {
"linkedinText": "Berlin, Germany"
},
"linkedinUrl": "https://www.linkedin.com/in/amara-okonkwo",
"photo": "https://media.licdn.com/dms/image/v2/D4E03AQH7kPzR2mNvXA/profile-displayphoto-shrink_100_100/0/1729845112034",
"hidden": false
},
{
"publicIdentifier": null,
"id": "ACr___-spM4BrMlYZsWDBPmx0li6zZw1QccuGW0",
"name": "LinkedIn Member",
"position": "VP Engineering",
"location": {
"linkedinText": "France"
},
"linkedinUrl": null,
"photo": null,
"hidden": true
}
],
"pagination": {
"totalPages": 11,
"totalElements": 107,
"pageNumber": 1,
"previousElements": 0,
"pageSize": 10,
"paginationToken": null,
"totalResultCount": 107
},
"status": "200",
"error": null,
"query": {
"title": "VP Engineering",
"currentCompany": "13018048",
"location": "United States",
"page": "1"
}
}

Which fields does the LinkedIn Profile Search response hold?

Field

Type

Description

elements

array of objects

The matched LinkedIn profiles. RichAPI bills 0.1 credits for each object in this array.

elements[].publicIdentifier

string

The LinkedIn public identifier. The value is null for a hidden profile.

elements[].id

string

The internal LinkedIn profile ID.

elements[].name

string

The full name. The value is LinkedIn Member for a hidden profile.

elements[].position

string

The current headline text or position text.

elements[].location

object

The location of the profile.

elements[].location.linkedinText

string

The location as LinkedIn shows it.

elements[].linkedinUrl

string

The full LinkedIn profile URL. The value is null for a hidden profile.

elements[].photo

string

The profile photo URL.

elements[].hidden

boolean

true for a profile with limited visibility.

pagination

object

The page state of the LinkedIn Profile Search result set.

pagination.totalPages

integer

The number of pages in the result set.

pagination.totalElements

integer

The number of profiles that match the filters across all pages.

pagination.pageNumber

integer

The current page number. Page numbers are 1-based.

pagination.previousElements

integer

The number of profiles on the pages before this page.

pagination.pageSize

integer

The number of profiles on this page.

pagination.paginationToken

string

The token for cursor pagination. A page-number search returns null.

pagination.totalResultCount

integer

The total result count.

status

string

The HTTP status from the upstream provider.

error

string

The error message. The value is null on success.

query

object

The echo of the resolved search parameters.

How much does LinkedIn Profile Search cost?

LinkedIn Profile Search costs 0.1 credits for each profile in the elements array of the response. One credit costs $0.02 on the 1,000 and 5,000 credit packs. Larger packs cost less per credit.

RichAPI counts the profiles that the response returns. RichAPI does not count the filters in the request body. A page that returns 10 profiles costs 1 credit. A total match count of 107 profiles does not change that charge.

The formula is:

credits = number of profiles in elements x 0.1
cost = credits x $0.02

Profiles returned (elements)

Arithmetic

Credits

Cost

0

0 x 0.1

0

$0.00

10

10 x 0.1

1

$0.02

25

25 x 0.1

2.5

$0.05

50

50 x 0.1

5

$0.10

100

100 x 0.1

10

$0.20

250

250 x 0.1

25

$0.50

RichAPI reserves 2.5 credits before it sends a paged LinkedIn Profile Search request. That reservation covers the configured page size of 25 profiles. RichAPI then charges the real profile count and releases the rest of the reservation. A page that returns fewer than 25 profiles costs less than the reservation.

How does LinkedIn Profile Search pagination work?

LinkedIn Profile Search page numbers are 1-based. Send page: 1 for the first page. To read the next page, add 1 to page and keep every filter the same. The response reports the current page in pagination.pageNumber and the page count in pagination.totalPages. The response reports the profile count of the current page in pagination.pageSize.

Request

Result

{"title": "VP Engineering", "page": 1}

The first page of profiles

{"title": "VP Engineering", "page": 2}

The second page of profiles

{"title": "VP Engineering", "page": 3}

The third page of profiles

This Python loop reads every page of a LinkedIn Profile Search result set.

import requests

url = "https://api.richapi.ai/api/v1/profile_search"
headers = {"x-api-key": "YOUR_API_KEY"}
body = {
"title": "VP Engineering",
"current_company": "https://www.linkedin.com/company/microsoft/",
"page": 1,
}

profiles = []
while True:
response = requests.post(url, headers=headers, json=body, timeout=60)
response.raise_for_status()
data = response.json()
profiles.extend(data["elements"])
if body["page"] >= data["pagination"]["totalPages"]:
break
body["page"] = body["page"] + 1

print(len(profiles))

How does pagination change the LinkedIn Profile Search cost?

Each page is a separate request, and RichAPI bills each request on its own elements count. The cost of a paged run is the sum of every page.

Pages read

Profiles per page

Total profiles

Arithmetic

Credits

Cost

1

10

10

10 x 0.1

1

$0.02

5

10

50

50 x 0.1

5

$0.10

11

10

110

110 x 0.1

11

$0.22

4

25

100

100 x 0.1

10

$0.20

10

25

250

250 x 0.1

25

$0.50

CAUTION: Stop the page loop at the profile count that you need. Every extra page charges 0.1 credits for each profile that the page returns.

Which search endpoint do you pick: Profile Search, People Search or Lead Search?

RichAPI holds three people search endpoints. Each one uses a different data source and a different cost model.

Feature

Profile Search

People Search

Lead Search

Path

/profile_search

/people_search

/lead_search

Data source

Live LinkedIn search

An indexed profile database

LinkedIn and Sales Navigator

Filter style

13 flat snake_case string filters

Flat company filters and person filters

33 label filters

Sales Navigator URL input

No

No

Yes

Page control

page, 1-based

page, 0-based, with limit

page with session_id

Results array

elements

content

elements

Cost

0.1 credits per profile returned

0.1 credits per result returned

10 credits per call plus 0.5 credits per profile

When you know a company, a job title, a school or a person name, pick LinkedIn Profile Search. When you filter by company attributes such as domain, industry and employee count, pick People Search API. When you need a seniority filter, a job function filter or a Sales Navigator URL, pick Lead Search API.

Which errors can LinkedIn Profile Search return?

Status

Meaning

What to do

400

The request body failed validation.

Correct the parameter that the message names. Make sure that every name is snake_case.

401

The API key is missing, wrong or revoked.

Send a valid key in the x-api-key header.

402

Insufficient credits: the organization has too few credits. Or Monthly spend limit reached: the team hit its monthly spend limit.

Buy credits in the RichAPI dashboard, or ask the organization owner to raise the spend limit.

403

Endpoint not available on your plan: this API key has no access to this endpoint.

Call GET /api/v1/my-endpoints to list the endpoints this key can use. Contact support for access.

404

The endpoint name is wrong.

Send the request to /profile_search.

405

The request used a method other than POST.

Send the request again with the POST method.

429

Rate limit exceeded (too many requests per second).

Wait for the Retry-After seconds, then retry the request.

500

The API failed.

Send the request again. If the failure repeats, contact support.

502

The upstream provider failed.

Send the request again with exponential backoff.

504

The upstream provider timed out.

Send the request again.

A failed request returns a JSON object with an error field. RichAPI charges no credits for a failed request.

Frequently asked questions

Is LinkedIn Profile Search a GET request?

No. LinkedIn Profile Search accepts the POST method only, and every parameter goes in the JSON request body. A GET request returns 405 with the error profile_search only supports POST.

How much does one LinkedIn Profile Search page cost?

One LinkedIn Profile Search page costs 0.1 credits for each profile in the elements array, and one credit costs $0.02 on the 1,000 and 5,000 credit packs. A page of 25 profiles costs 2.5 credits, or $0.05.

Does LinkedIn Profile Search charge for profiles that it does not return?

No. LinkedIn Profile Search charges on the number of profiles in the elements array of the response. A search that matches 107 profiles and returns 10 profiles on the page costs 1 credit, or $0.02.

Does a LinkedIn Profile Search page with zero profiles cost credits?

No. LinkedIn Profile Search has no per-call base charge. An empty elements array costs 0 credits.

How do you read the second page of LinkedIn Profile Search results?

Send the same filters again with page set to 2. LinkedIn Profile Search page numbers are 1-based, so page: 2 returns the second page.

Why does a LinkedIn Profile Search result hold the name "LinkedIn Member"?

The profile is hidden. A hidden profile returns hidden as true, name as LinkedIn Member, and null for both publicIdentifier and linkedinUrl. RichAPI bills a hidden profile at the same 0.1 credits.

How do you filter LinkedIn Profile Search by an exact location?

Set geo_id to the LinkedIn Geo ID of the place. When the request body holds geo_id and location, geo_id overrides location. The location parameter takes free text from the LinkedIn autocomplete list, so geo_id is the precise filter.

What is the difference between Profile Search and People Search?

LinkedIn Profile Search runs a live LinkedIn search with 13 flat string filters and returns an elements array. People Search queries an indexed profile database with company filters and person filters, and it returns a content array. Both endpoints cost 0.1 credits per result returned.

Related articles

Did this answer your question?