API Search current vs past

6 posts / 0 new
Last post
John Kamins's picture
Joined: 09/28/2011
Mon, 02/13/2012 - 14:10
API Search current vs past

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

Jeremy Johnstone's picture
Developer Advocate
Joined: 04/17/2011
Tue, 02/14/2012 - 12:12

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:

1
http://api.linkedin.com/v1/people-search:(people:(id,first-name,last-name,positions:(company:(id,name),is-current)))?first-name=Jeremy&last-name=Johnstone&company=Yahoo

Which returns:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<people-search>
  <people total="8">
    <person>
      <id>041Dyj4smI</id>
      <first-name>Jeremy</first-name>
      <last-name>Johnstone</last-name>
      <positions total="9">
        <position>
          <company>
            <id>1337</id>
            <name>LinkedIn</name>
          </company>
          <is-current>true</is-current>
        </position>
        <position>
          <company>
            <id>1288</id>
            <name>Yahoo! Inc.</name>
          </company>
          <is-current>false</is-current>
        </position>
      </positions>
    </person>
  </people>
</people-search>

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

John Kamins's picture
Joined: 09/28/2011
Tue, 02/14/2012 - 14:15

Great! Thanks, Jeremy. Much appreciated. We'll give this a whirl.

John Kamins's picture
Joined: 09/28/2011
Thu, 02/16/2012 - 18:36

Jeremy, thanks for the feedback regarding PeopleSearch API. For our use case, it looks like the throttle limit on calls may be a limiting factor. We're trying to include a LInkedIn Profile link for our contacts within our Siebel database, but in order to to this I need to determine whether our Siebel contacts are on LinkedIn with a basic search of First Name + Last Name + Current or Past company. We're not attempting to pull any profile data from LinkedIn to Siebel,. Rather, link out more efficiently from Siebel to LInkedIn. I would imagine this would be desirable to LinkedIn. Is there a way to accomplish this for larger data sets (ie 2 million contacts that we want to link to LinkedIn), or do I need to fill out a form for BD? Many thanks in advance for any tips. - John

Jeremy Johnstone's picture
Developer Advocate
Joined: 04/17/2011
Mon, 02/20/2012 - 01:28

Hi John,

For something of that size, you would definitely have to reach out to our BD team, via the form you apparently know about already :).

-Jeremy

Kirsten Jones's picture
Joined: 06/30/2011
Wed, 02/22/2012 - 11:38

Note that even for our partners, this kind of database matching is rarely allowed. You're encouraged, instead, to look for those users at the time that an authenticated user is making the request to see the member in question - and make the search request on their behalf. It's a slightly different flow, but one you're more likely to get approval for :-)