Hello,
My use case requires API search by first + last + company, but I would like to determine of company is part of current vs. past in the profile. Is this advanced search functionality available through the API?
Many thanks!
John
- Log in to post comments
Hi John,
As indicated on the People Search API docs, there is a query param (current-company) which you can use to ask specifically for results which are for the current company or not. If you would like to handle both cases in the same query, just make sure you add the field selector for 'positions' and then you can check if they are currently employed at the requested company or not.
Here's an example where I am searching for people named "Jeremy Johnstone" who worked at "Yahoo" either currently or at some point in the past:
Which returns:
Then you would just need to loop over the positions for each person and see if the company you searched for is marked as 'is-current' or not.
Enjoy!
-Jeremy