tomquirk / linkedin-api

👨‍💼Linkedin API for Python
MIT License
1.72k stars 401 forks source link

LinkedIn Recruiter Search Feature. #250

Open tomcerdeira opened 1 year ago

tomcerdeira commented 1 year ago

I been wondreing and trying some different thing to accomplish this... but found no workaround.

The project I am currently working on, would benefit of having a way of obtaining the results of Linkedin Recruiter search. There are some tools (e.x. Phantom Buster) that have this feature.... aka some way of doing it exists!

Basically the idea is to, given a LinkedIn account that has access to the LinkedIn Recruiter platform, pass as a parameter to a function the URL generated for a search for obtaining its results.

An example URL is: "https://www.linkedin.com/talent/search?searchContextId=f62caf2c-801f-47c0-a8d5-cd7be8ab3cae&searchHistoryId=9956195364&searchKeyword=Senior%20React%20Native%20Engineer&searchRequestId=a30f0781-2634-40b6-bead-0f27bf0dbd10&start=50&uiOrigin=PAGINATION"

Analyzing the network traffic when performing this search, I found a GET request to the following API endpoint: "https://www.linkedin.com/talent/search/api/talentRecruiterSearchHits?...." with a bunch of query params after.

The response of this request contains all the information of the result as the body, that is the one we (or only I) are looking for.

All the tests that I did, ended with an error response from the API "CSRF check failed".

I tried passing different headers when performing the request but again, found no workaround it.

Any idea?

Thank you for the read.