All Projects → eilonmore → linkedin-private-api

eilonmore / linkedin-private-api

Licence: MIT license
LinkedIn NodeJS API, written in TypeScript.

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to linkedin-private-api

React-Linkedin-Login
A React demo app for Linkedin API: LinkedIn OAuth, LinkedIn REST API
Stars: ✭ 70 (-53.95%)
Mutual labels:  linkedin
Devise-Omniauth-Multiple-Providers
Devise Multiple Omniauth Providers
Stars: ✭ 34 (-77.63%)
Mutual labels:  linkedin
Dica Python Linkedin
⚡ Este repositório é direcionado para dicas com a linguagem python, que estão sendo postadas em meu linkedin.
Stars: ✭ 54 (-64.47%)
Mutual labels:  linkedin
dbt ad reporting
Fivetran's ad reporting dbt package. Combine your Facebook, Google, Pinterest, Linkedin, Twitter, Snapchat and Microsoft advertising spend using this package.
Stars: ✭ 68 (-55.26%)
Mutual labels:  linkedin
LinkedIn Scraper
🙋 A Selenium based automated program that scrapes profiles data,stores in CSV,follows them and saves their profile in PDF.
Stars: ✭ 25 (-83.55%)
Mutual labels:  linkedin
LInkedIn-Reverese-Lookup
🔎Search LinkedIn profile by email address📧
Stars: ✭ 20 (-86.84%)
Mutual labels:  linkedin
linkedin-auto-connect
💥 An automation tool to automate the connection requests on LinkedIn
Stars: ✭ 87 (-42.76%)
Mutual labels:  linkedin
github-readme-linkedin
📋 A serverless application to get dynamically generated images from your LinkedIn profile on your GitHub READMEs
Stars: ✭ 52 (-65.79%)
Mutual labels:  linkedin
LinkedIn-Scraper
A LinkedIn Scraper to scrape up to 10k LinkedIn profiles from company profile links and save their e-mail addresses if available!
Stars: ✭ 62 (-59.21%)
Mutual labels:  linkedin
Linkedin-Client
Web scraper for grabing data from Linkedin profiles or company pages (personal project)
Stars: ✭ 42 (-72.37%)
Mutual labels:  linkedin
linkedin connect
Configurable and easy to use LinkedIn tool to automate connections with personalized messages.
Stars: ✭ 58 (-61.84%)
Mutual labels:  linkedin
social-media-hacker-list
Growing list of apps and tools for enhancing social media experiences.
Stars: ✭ 198 (+30.26%)
Mutual labels:  linkedin
CwsShareCount
PHP class to get social share count for Delicious, Facebook, Google+, Linkedin, Pinterest, Reddit, StumbleUpon and Twitter.
Stars: ✭ 13 (-91.45%)
Mutual labels:  linkedin
clearpass-cloud-service-whitelists
Whitelist entries for cloud identity services
Stars: ✭ 21 (-86.18%)
Mutual labels:  linkedin
Data-Science-From-Linkedin
This repository focuses on saving my linkedin articles and stuff that I find "USEFUL" on LinkedIn.
Stars: ✭ 125 (-17.76%)
Mutual labels:  linkedin
socials
👨‍👩‍👦 Social account detection and extraction in Python, e.g. for crawling/scraping.
Stars: ✭ 37 (-75.66%)
Mutual labels:  linkedin
linkedinBot
Automate the process of sending referral request and cold mailing on LinkedIn
Stars: ✭ 25 (-83.55%)
Mutual labels:  linkedin
Socioboard-5.0
Socioboard is world's first and open source Social Technology Enabler. Socioboard Core is our flagship product.
Stars: ✭ 663 (+336.18%)
Mutual labels:  linkedin
react-custom-share
Social media share buttons for ReactJS. Use one of the built-in button themes or create a custom one from scratch.
Stars: ✭ 47 (-69.08%)
Mutual labels:  linkedin
Social-Media-Automation
Automate social media because you don't have to be active on all of them😉. Best way to be active on all social media without actually being active on them. 😃
Stars: ✭ 186 (+22.37%)
Mutual labels:  linkedin

NodeJS LinkedIn API

Build

NodeJS Wrapper API for LinkedIn API, written in TypeScript.
No tokens are needed for using this API, only a working LinkedIn account.

Installation

npm install linkedin-private-api

Example usage

Check out the post I've written that describes a great example of how to use this library.
Also, see a list of examples here.

import { Client } from 'linkedin-private-api';

const username = process.env.USERNAME as string;
const password = process.env.PASSWORD as string;

(async () => {
  // Login
  const client = new Client();
  await client.login.userPass({ username, password });
  
  // Search for React development jobs in Israel
  const jobsScroller = await client.search.searchJobs({
    keywords: 'React',
    filters: { location: 'Israel' },
    limit: 20,
    skip: 5,
  });

  const [someReactJobHit] = await jobsScroller.scrollNext();
  const jobCompanyName = someReactJobHit.hitInfo.jobPosting.companyDetails.company.name;

  // Fetch the job's company
  const companiesScroller = await client.search.searchCompanies({ keywords: jobCompanyName });
  const [{ company: jobCompany }] = await companiesScroller.scrollNext();

  // Search for profiles and send an invitation
  const peopleScroller = await client.search.searchPeople({
    keywords: 'Bill Gates'
  });
  const [{ profile: billGates }] = await peopleScroller.scrollNext();
  
  await client.invitation.sendInvitation({
    profileId: billGates.profileId,
    trackingId: billGates.trackingId,
  });
  
  // Search in my connections
  const ownConnectionsScroller = await client.search.searchOwnConnections({ keywords: 'Bill Gates', limit: 1 });
  const connections = await ownConnectionsScroller.scrollNext();

  // Get conversation
  const [billConversation] = await client.conversation.getConversations({
    recipients: billGates.profileId
  }).scrollNext();
 
  const conversationMessages = await client.message.getMessages({
    conversationId: billConversation.conversationId
  }).scrollNext()
 
  // Send a message
  const sentMessage = await client.message.sendMessage({
    profileId: billGates.profileId,
    text: 'Hey Bill!',
  });
})();

API

Repositories

Classes that expose methods for communicating with linkedin API.
Each repository describes a LinkedIn entity that we can operate on it. Example: InvitationRepository.

The methods are divided into 3 types:

  • Single entity getters - example: conversation.getConversation({ conversationId: CONVERSATION_ID }) Single entity getters return a LinkedIn Entity.

  • Multiple entities getters - for example invitation.getSentInvitations({ skip: 10, limit: 5 })
    Multiple entities getters return a Scroller.

  • Mutations - for example invitation.sendInvitation({ ... })
    Mutations return a Response entity

Name Example Usage Docs Reference
login client.login.userPass(...) Login Docs
search client.search.searchPeople() Search Docs
profile client.profile.getOwnProfile() Profile Docs
invitation client.invitation.getReceivedInvitations() Invitation Docs
conversation client.conversation.getConversation(...) Conversation Docs
message client.message.getMessages(...) Message Docs

Entities

Interfaces that describe LinkedIn objects. For example - Conversation object.
Most of those entities contain the properties returned from the LinkedIn response and in addition to these properties, the API adds some extra properties to make the usage a bit easier.

The full list of entities can be found here, this is the list of the most important ones:

Entities
Profile
MiniProfile
MiniCompany
Invitation
Conversation
Message
CompanySearchHit
PeopleSearchHit
JobSearchHit
MessageCreateResponse

Scrollers

Wrapper classes that enable a convenient work with paginated responses. For example - PeopleScroller.
Most of LinkedIn requests return paginated responses, (just like in the UI), scrollers just provide a structured way to navigate between pages.

There are two types of scrollers:

  • Index scroller - Accepts 2 properties:
    skip (number) - Starting index (How many entities to skip).
    limit (number) - How many entities to fetch on each iteration.

  • Time scrollers - Accepts one property:
    createdBefore (Date) - Defines the point of time to start fetching entities.

Example:

// index scroller
let companiesScroller = client.search.searchCompanies(); 
let companies = await companiesScroller.scrollNext(); // returns first page with 10 results
companies = await companiesScroller.scrollNext(); // next page
companies = await companiesScroller.scrollBack(); // previous page

// overriding skip and limit
companiesScroller = client.search.searchCompanies({ skip: 100, limit: 1 }); 
companies = await companiesScroller.scrollNext(); // returns first page with 1 results
companies = await companiesScroller.scrollNext(); // next page
companies = await companiesScroller.scrollBack(); // previous page

// overriding createdBefore for time scroller
const twoDaysAgo = moment().subtract(2, 'days').toDate();
let messagesScroller = client.message.getMessages({
  conversationId: CONVERSATION_ID,
  createdBefore: twoDaysAgo
});
messages = await companiesScroller.scrollNext();

What's coming next?

A lot!

This is a new project, and as such, there's a lot that need to be done.
Some new features that I expect to develop soon:

  • Media support - fetch, like, comment and create a new post.
  • Invitation improvements - be able to do some more actions like "remove connection".
  • Improve login API
  • Add services so automate common workflows

Want a specific feature? Please open a feature request :)
Also, i'll be more than happy to welcome new contributors to this project.

Legal

This code is in no way affiliated with, authorized, maintained, sponsored or endorsed by Linkedin or any of its affiliates or subsidiaries. This is an independent and unofficial API. Use at your own risk.

Note that using this API might cause your account being banned.
Always take care; we cannot be held for any account being banned.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].