LinkedIn API

LinkedIn Company People API: How to Find Employees at Companies

Learn how to use the Fresh LinkedIn Scraper API to retrieve employee data from LinkedIn companies without OAuth authentication.

LinkedIn Company People API: How to Find Employees at Companies

LinkedIn Company People API: How to Find Employees at Companies

Finding people working at specific companies can be extremely valuable for sales teams, recruiters, and market researchers. In this guide, we'll explore how to use the Fresh LinkedIn Scraper API to retrieve comprehensive company employee listings without complex OAuth authentication.

Table of Contents

Why Access LinkedIn Company People Data?

LinkedIn hosts the professional profiles of hundreds of millions of individuals across organizations worldwide. Programmatic access to this employee data provides numerous benefits:

  • Sales Intelligence: Identify decision-makers and contacts within target companies
  • Recruitment: Find potential candidates with specific skills at competitor organizations
  • Lead Generation: Build targeted prospect lists based on company and role
  • Competitive Analysis: Understand team structures and hiring patterns
  • Market Research: Analyze professional demographics and organizational structures

The Fresh LinkedIn Scraper API

The Fresh LinkedIn Scraper API on RapidAPI provides a simple way to access LinkedIn company employee data without:

  • Complex OAuth authentication
  • LinkedIn developer program approval
  • Rate limiting concerns of direct scraping
  • Terms of service violations

How to Get LinkedIn Company People Data

To retrieve people working at a specific company, you'll use the company people endpoint with a company ID.

API Endpoint

GET https://fresh-linkedin-scraper-api.p.rapidapi.com/api/v1/company/people

Request Parameters

Parameter Required Description
company_id Yes LinkedIn company ID (e.g., "1066442")
page No Page number for pagination (default: 1)

Required Headers

x-rapidapi-host: fresh-linkedin-scraper-api.p.rapidapi.com
x-rapidapi-key: YOUR_RAPIDAPI_KEY

Example Request

curl --request GET \
  --url 'https://fresh-linkedin-scraper-api.p.rapidapi.com/api/v1/company/people?company_id=1066442' \
  --header 'x-rapidapi-host: fresh-linkedin-scraper-api.p.rapidapi.com' \
  --header 'x-rapidapi-key: YOUR_RAPIDAPI_KEY'

Understanding the API Response

The API returns a comprehensive JSON object with employee data. Let's examine the key parts of the response:

Response Overview

{
  "success": true,
  "message": "success",
  "process_time": 618,
  "data": [
    // Array of employee profiles
  ],
  "cost": 1,
  "page": 1,
  "total": 9748,
  "has_more": true
}

Individual Employee Profile

Each person in the response contains professional information:

{
  "id": null,
  "urn": null,
  "url": null,
  "full_name": "LinkedIn Member",
  "title": "Project Development Manager at Datadog",
  "location": "Hanoi",
  "is_premium": false,
  "avatar": [
    {
      "width": 96,
      "height": 96,
      "url": "https://media.licdn.com/dms/image/v2/C5603AQFLdFpUee6zSg/profile-displayphoto-shrink_100_100/profile-displayphoto-shrink_100_100/0/1652284448179?e=1752105600&v=beta&t=pyLjWhxbqqjbC1smC3I8rkzLBcwAFdfc4jK1NPM3Sns",
      "expires_at": 1752105600000
    }
    // Additional avatar sizes...
  ],
  "services": []
}

Note: Due to LinkedIn's privacy settings, some employee profile data may be limited, with names showing as "LinkedIn Member" for profiles that aren't in your network or have stricter privacy settings.

Code Examples

Here are implementation examples in popular programming languages:

JavaScript/Node.js

const axios = require("axios");

const options = {
  method: "GET",
  url: "https://fresh-linkedin-scraper-api.p.rapidapi.com/api/v1/company/people",
  params: {
    company_id: "1066442",
    page: "1",
  },
  headers: {
    "x-rapidapi-host": "fresh-linkedin-scraper-api.p.rapidapi.com",
    "x-rapidapi-key": "YOUR_RAPIDAPI_KEY",
  },
};

async function getCompanyPeople() {
  try {
    const response = await axios.request(options);
    console.log(response.data);
    return response.data;
  } catch (error) {
    console.error(error);
  }
}

getCompanyPeople();

Python

import requests

url = "https://fresh-linkedin-scraper-api.p.rapidapi.com/api/v1/company/people"

querystring = {
    "company_id": "1066442",
    "page": "1"
}

headers = {
    "x-rapidapi-host": "fresh-linkedin-scraper-api.p.rapidapi.com",
    "x-rapidapi-key": "YOUR_RAPIDAPI_KEY"
}

response = requests.request("GET", url, headers=headers, params=querystring)

print(response.json())

PHP

<?php

$curl = curl_init();

curl_setopt_array($curl, [
    CURLOPT_URL => "https://fresh-linkedin-scraper-api.p.rapidapi.com/api/v1/company/people?company_id=1066442&page=1",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_HTTPHEADER => [
        "x-rapidapi-host: fresh-linkedin-scraper-api.p.rapidapi.com",
        "x-rapidapi-key: YOUR_RAPIDAPI_KEY"
    ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
    echo "cURL Error #:" . $err;
} else {
    echo $response;
}

Best Practices

When using the LinkedIn Company People API, follow these best practices:

1. Implement Pagination for Complete Results

Employee data is paginated, so retrieve all pages for complete results:

async function getAllCompanyPeople(companyId) {
  let allPeople = [];
  let currentPage = 1;
  let hasMore = true;

  while (hasMore) {
    const options = {
      method: "GET",
      url: "https://fresh-linkedin-scraper-api.p.rapidapi.com/api/v1/company/people",
      params: {
        company_id: companyId,
        page: currentPage.toString(),
      },
      headers: {
        "x-rapidapi-host": "fresh-linkedin-scraper-api.p.rapidapi.com",
        "x-rapidapi-key": "YOUR_RAPIDAPI_KEY",
      },
    };

    const response = await axios.request(options);
    allPeople = [...allPeople, ...response.data.data];

    hasMore = response.data.has_more;
    currentPage++;

    // Optional: Add delay to avoid rate limiting
    await new Promise((resolve) => setTimeout(resolve, 1000));
  }

  return allPeople;
}

2. Post-Process Results for Better Data Organization

Transform the API response to categorize employees by role or department:

function organizeByRole(peopleData) {
  const roleMap = {};

  peopleData.forEach((person) => {
    // Extract role from title (e.g., "Software Engineer at Company")
    const roleParts = person.title.split(" at ");
    if (roleParts.length > 0) {
      const role = roleParts[0];

      if (!roleMap[role]) {
        roleMap[role] = [];
      }

      roleMap[role].push(person);
    }
  });

  return roleMap;
}

3. Implement Caching

Employee data doesn't change very frequently. Implement caching to reduce API calls:

const NodeCache = require("node-cache");
const cache = new NodeCache({ stdTTL: 86400 }); // Cache for 24 hours

async function getCompanyPeopleWithCache(companyId, page) {
  const cacheKey = `people_${companyId}_${page}`;

  // Check if data exists in cache
  const cachedData = cache.get(cacheKey);
  if (cachedData) {
    return cachedData;
  }

  // Fetch new data
  const response = await axios.request({
    // API request options...
    params: {
      company_id: companyId,
      page: page,
    },
  });

  // Store in cache
  cache.set(cacheKey, response.data);

  return response.data;
}

4. Handle Limited Profile Data

Since some profiles may have limited information due to privacy settings, implement fallback logic:

function extractUsableProfileData(profiles) {
  return profiles.map((profile) => {
    return {
      name:
        profile.full_name !== "LinkedIn Member"
          ? profile.full_name
          : "Anonymous User",
      title: profile.title || "Unknown Role",
      location: profile.location || "Unknown Location",
      avatar:
        profile.avatar && profile.avatar.length > 0
          ? profile.avatar[0].url
          : null,
    };
  });
}

By following this guide, you'll be able to effectively access and utilize LinkedIn company employee data through the Fresh LinkedIn Scraper API, enabling powerful sales intelligence, recruitment, and market research applications without the complexity of LinkedIn's official API.