linkedin-api icon indicating copy to clipboard operation
linkedin-api copied to clipboard

Search based on keyword

Open StamatisTiniakos opened this issue 4 years ago • 3 comments

Hi, I am trying to search based on a keyword e.g. 'edinburgh'. My code is the following:

` from linkedin_api import Linkedin

api = Linkedin('username', 'password')

search_results = api.search({params:'edinburgh'}) `

The search results is a json. The problem is that I can not see anything about 'edinburgh' in the data returned. Am I doing something wrong here? I am looking to retrieve user or company posts where the text contains the keyword 'edinburgh'.

StamatisTiniakos avatar Nov 06 '20 12:11 StamatisTiniakos

You should use specific functions for company or people, using the "keywords" parameters.

lcarcamo1526 avatar Nov 06 '20 20:11 lcarcamo1526

As @lcarcamo1526 said, you should use search_companies() and/or search_people().

search_results = api.search_people(keywords='edinburgh') # check the docs for more info

I believe that you could do search_results = api.search({keywords:'edinburgh'}), didn't try it tho.

favcau avatar Nov 20 '20 18:11 favcau

Hi, I am trying to search people based on location. But it still shows me results based on my current location. My code is like this. When I use location_name in parameters it shows empty list. e.g.

results = linkedin.search_people(keyword_title="CEO", location_name="United States")

When i use only keyword_title it shows results based on my current location. But i want to search based on different locations

results = linkedin.search_people(keyword_title="CEO")

amirsohail12570 avatar Jun 16 '21 06:06 amirsohail12570