linkedin-api
linkedin-api copied to clipboard
Search based on keyword
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'.
You should use specific functions for company or people, using the "keywords" parameters.
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.
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")