Skip to main content

LinkedIn Company Search API

Written by Kadri - RichAPI Support Team

POST /linkedin_company_search • Credits: 0.1 credit per company returned

LinkedIn Company Search finds LinkedIn companies that match a set of filters. Send a POST request with a keyword, a location, a company size band or an industry ID. The response holds one page of matching companies, each with the LinkedIn URL, industry, location, follower count and summary. Each call costs 0.1 credit for every company in the elements array.

What does LinkedIn Company Search do?

Sales teams and researchers need a list of companies that match a profile, not data about one company that they already know. LinkedIn Company Search builds that list. The endpoint searches public LinkedIn company pages with the filters that you send. It returns one page of matches in a single synchronous response. The data source is LinkedIn. To move from a match to full firmographics, send the linkedinUrl of the match to Company Enrichment API.

Which endpoint does LinkedIn Company Search use?

  • Method: POST

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

  • Authentication: x-api-key header

  • Response: synchronous JSON

  • Credits: 0.1 credit per company returned

  • Page size: up to 25 companies per page

CAUTION: LinkedIn Company Search accepts POST only. A GET request returns status 405 with the error linkedin_company_search only supports POST.

How to send a LinkedIn Company Search request

  1. Copy your API key from the RichAPI dashboard.

  2. Choose the filters for the search.

  3. Put every filter in the JSON request body. Never put a filter in the query string.

  4. Send at least one filter. An empty request body returns no useful match.

  5. Send a POST request to https://api.richapi.ai/api/v1/linkedin_company_search.

  6. Send the API key in the x-api-key header.

  7. Read the matches from the elements array of the response.

  8. Read pagination.totalPages to plan the next page.

CAUTION: Each company in the elements array costs 0.1 credit. A full page of 25 companies costs 2.5 credits.

cURL

curl -X POST https://api.richapi.ai/api/v1/linkedin_company_search   
-H "x-api-key: YOUR_API_KEY"
-H "Content-Type: application/json"
-d '{
"page": 1,
"search_query": "cloud security",
"location": "United States",
"company_size": "51-200,201-500",
"linkedin_industry_id": "96"
}'

Python

import requests

response = requests.post(
"https://api.richapi.ai/api/v1/linkedin_company_search",
headers={"x-api-key": "YOUR_API_KEY"},
json={
"page": 1,
"search_query": "cloud security",
"location": "United States",
"company_size": "51-200,201-500",
"linkedin_industry_id": "96",
},
timeout=60,
)
response.raise_for_status()
print(response.json())

Node.js

const response = await fetch("https://api.richapi.ai/api/v1/linkedin_company_search", {
method: "POST",
headers: {
"x-api-key": "YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
page: 1,
search_query: "cloud security",
location: "United States",
company_size: "51-200,201-500",
linkedin_industry_id: "96",
}),
});

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

What parameters does LinkedIn Company Search accept?

Every LinkedIn Company Search parameter goes in the JSON request body. Every parameter is optional, and each one narrows the search.

Parameter

Type

Required

Default

Description

page

integer

No

1

The page number for pagination. The count starts at 1.

search_query

string

No

""

Keywords to search for in company names.

location

string

No

""

Filter companies by location. LinkedIn matches the text, so a location name can be ambiguous. For an exact match, send geo_id.

geo_id

string

No

""

The LinkedIn Geo ID. geo_id overrides location.

company_size

string

No

""

Comma-separated headcount bands.

linkedin_industry_id

string

No

""

The LinkedIn industry ID. Send a comma-separated list for more than one industry.

CAUTION: LinkedIn Company Search rejects an unknown body field with status 400 and the error Unknown input field(s). Use the parameter names in the table above, character for character.

Which values does company_size accept?

The company_size parameter accepts these headcount bands. Send a comma-separated list for more than one band.

Band

Headcount

1-10

1 to 10 employees

11-50

11 to 50 employees

51-200

51 to 200 employees

201-500

201 to 500 employees

501-1000

501 to 1,000 employees

1001-5000

1,001 to 5,000 employees

5001-10000

5,001 to 10,000 employees

10001+

More than 10,000 employees

Why does the response query field use other names?

The response query field echoes the filters with the names that LinkedIn uses. Those names differ from the RichAPI parameter names. Use the table below to read the echo.

RichAPI parameter

Name in the response query echo

page

page

search_query

search

location

location

geo_id

geoId

company_size

companySize

linkedin_industry_id

industryId

What does LinkedIn Company Search return?

The block below is an example response for one match.

{
"error": null,
"query": {
"page": 1,
"search": "cloud security",
"location": "United States"
},
"status": 200,
"elements": [
{
"id": "1441",
"logo": "https://media.licdn.com/dms/image/C4D0BAQHiNSL4Or29cg/company-logo_200_200/0/1519856215226",
"name": "Google",
"summary": "Search, cloud and AI products for everyone.",
"industry": "Software Development",
"location": {
"linkedinText": "Mountain View, CA"
},
"followers": "30M followers",
"linkedinUrl": "https://www.linkedin.com/company/google",
"universalName": "google"
}
],
"pagination": {
"pageNumber": 1,
"totalPages": 10,
"totalElements": 250
}
}

What does each LinkedIn Company Search response field mean?

The top level of the LinkedIn Company Search response holds five fields.

Field

Type

Description

elements

array

The matching companies on this page. RichAPI bills 0.1 credit for each item.

pagination

object

The page number and the total match count.

status

integer

The HTTP status from the upstream data provider.

error

string

The error message. The value is null on success.

query

object

The echo of the filters that LinkedIn resolved.

Each item in the elements array holds nine fields.

Field

Type

Description

id

string

The LinkedIn numeric company ID.

logo

string

The URL of the company logo image.

name

string

The company name as shown on LinkedIn.

summary

string

The short company summary or tagline.

industry

string

The LinkedIn industry category of the company.

location

object

The company location.

location.linkedinText

string

The location as shown on LinkedIn.

followers

string

The follower count label, for example 2K followers.

linkedinUrl

string

The full LinkedIn company page URL.

universalName

string

The LinkedIn universal name of the company, that is the slug in the URL.

The pagination object holds three fields.

Field

Type

Description

pageNumber

integer

The page number of this response.

totalPages

integer

The number of pages that match the filters.

totalElements

integer

The number of companies that match the filters.

How does pagination work in LinkedIn Company Search?

LinkedIn Company Search returns up to 25 companies per page. One call returns one page.

  1. Send the first request with page set to 1.

  2. Read pagination.totalPages from the response.

  3. Read pagination.totalElements to see the size of the full match set.

  4. If totalPages is greater than 1, send the same filters again with page set to 2.

  5. Repeat until page reaches totalPages.

  6. Keep every filter the same across the pages. A changed filter changes the result set.

CAUTION: Every page costs credits. To walk 10 pages of 25 companies, you pay for 250 companies, that is 25 credits. Narrow the filters before you walk many pages.

How does LinkedIn Company Search differ from Company Enrichment?

LinkedIn Company Search finds companies that you do not know yet. Company Enrichment API returns deep data about one company that you already know. The two endpoints work as a pair.

Feature

LinkedIn Company Search

Company Enrichment

Input

Filters: keyword, location, geo ID, size, industry

One LinkedIn company URL

Companies per call

Up to 25

1

Purpose

Build a list of target companies

Get the full profile of one company

Fields returned

Name, industry, location, followers, summary, logo, LinkedIn URL, ID

Name, website, industry, company size, headquarters, specialties, description, logo, year of foundation, follower count

Website in the response

No

Yes

Headcount band in the response

No

Yes

Cost

0.1 credit per company returned

1 credit per call

To go from a search to a full company profile, follow these steps.

  1. Send a LinkedIn Company Search request with your filters.

  2. Read the linkedinUrl of each match in the elements array.

  3. Send each linkedinUrl to Company Enrichment API as the url parameter.

  4. Read the website, the headcount band and the headquarters from the enrichment response.

To find the people who work at a matched company, send LinkedIn Company Employees Search API instead.

How much does LinkedIn Company Search cost?

LinkedIn Company Search charges no base fee per call. It charges 0.1 credit for each company in the elements array. One credit costs $0.02 on the 1,000 and 5,000 credit packs, so one company costs $0.002 there. Larger packs cost less per credit. A full page of 25 companies costs 2.5 credits, and 2.5 credits cost $0.05.

Companies returned

Pages at 25 per page

Credits

Cost

25

1

2.5

$0.05

100

4

10

$0.20

250

10

25

$0.50

1,000

40

100

$2.00

2,500

100

250

$5.00

10,000

400

1,000

$20.00

RichAPI reserves 2.5 credits at the start of each call. That reservation covers one full page. RichAPI then charges for the real number of companies in elements and releases the rest of the reservation. A call that matches no company returns an empty elements array and costs 0 credits. A failed call costs no credit.

What errors does LinkedIn Company Search return?

An error response holds an error field with a text message.

Status

Meaning

What to do

400

The request body failed validation, or it holds an unknown field.

Correct the parameter that the message names.

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 for the reservation. 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 /linkedin_company_search.

405

The request used a method other than POST.

Send the request again as POST.

429

The rate limit is exceeded.

Read the Retry-After header. Wait that many seconds, then send the request again.

500

The API failed.

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

502

The upstream data provider failed.

Send the request again after a short wait.

504

The upstream data provider timed out.

Send the request again after a short wait.

For a retry loop, wait 1 second, then 2 seconds, then 4 seconds between attempts.

Frequently asked questions

What input does the LinkedIn Company Search API need?

The LinkedIn Company Search API needs at least one filter in the JSON request body. The filters are search_query, location, geo_id, company_size and linkedin_industry_id.

How much does the LinkedIn Company Search API cost?

The LinkedIn Company Search API costs 0.1 credit for each company that it returns, and it charges no base fee per call. One credit costs $0.02 on the 1,000 and 5,000 credit packs, so 1,000 companies cost 100 credits, that is $2.00 there.

How many companies does one LinkedIn Company Search call return?

One LinkedIn Company Search call returns up to 25 companies, which is one page. To read the next 25 matches, send the same filters again with the page parameter set to the next number.

What is the difference between LinkedIn Company Search and Company Enrichment?

LinkedIn Company Search finds many companies from filters and returns up to 25 per call. Company Enrichment API returns the full profile of one company from one known LinkedIn company URL.

Does the LinkedIn Company Search API use GET or POST?

The LinkedIn Company Search API uses POST. A GET request returns status 405 with the error linkedin_company_search only supports POST.

How do I filter LinkedIn Company Search by an exact location?

Send the geo_id parameter with the LinkedIn Geo ID of the location. The geo_id parameter overrides location, because a location name matches more than one place.

Does an empty LinkedIn Company Search result cost credits?

No. A LinkedIn Company Search call that returns an empty elements array costs 0 credits. RichAPI charges 0.1 credit per returned company and no base fee per call.

Related articles

Did this answer your question?