CARVIEW |
Search API
Created on: Oct 20, 2009 9:13 AM by Lucian - Last Modified: Oct 22, 2009 9:12 AM by Taylor Singletary
Use the Search API to find LinkedIn profiles using keywords, company, name, or other methods. This returns search results, which are an array of matching member profiles. Each matching profile is similar to a mini-profile popup view of LinkedIn member profiles.
For each return, the Search API also includes links to view the profile on linkedin.com or get the profile in an API call. Its pretty important that you use the API call URL we return to see profiles found in search rather than attempt to construct the URL yourself. There is a visibility token embedded in the URL and header we return that will ensure that your user gets the maximum view of the profile. Without those, your user may not see the full profile details or in some cases, may not be able to see the profile at all.
Search results are paginated so that you don't receive a huge block of XML. To page through search results, make the Search call repeatedly but request different result ranges. Ranges are specified with a starting index and a number of results to return. You can return up to 10 results at a time; requesting more will result in 10 being returned. You will see a maximum of 100 search results for any particular search, so can page up to 10 times.
Usage Rules
- Search works only for the currently logged-in member; you can't get Search information for any other user.
- There isn't any guest support for this API.
URL
Parameters
If you don't specify any parameters in the URL, the XML returns everyone in the member's network in order of connection (ctx). Misspelled parameter names are ignored.
Parameter | Required | Definition |
---|---|---|
keywords | N | Returns members who have keywords anywhere in their profile. Multiple words should be separated by a plus (+) sign. Boolean logic isn't supported in this parameter. |
name | N | Returns all members with a name matching the one specified in the parameter. If only one name is provided, it's assumed to be the last name (surname). Multiple words must be separated by a plus (+) sign. Boolean logic isn't supported. |
company | N | Returns members who have a particular company name on their profile. company works with the current-company parameter which specifies whether the company must be a current company or whether it can be anywhere on a profile. Its often valuable to not be too specific with the company name. LinkedIn has made great efforts at standardizing company names, but including suffixes such as "Inc" and "Company" may overly limit your search, missing people who did not include those suffixes on their company names. Its usually better to just search for the basic name of the company and all different versions will be returned. This does increase the possibility of a false positive match return, though, so consider the most specific terms you can use. For example, consider using "Acme" instead of "Acme, Inc" to find people from a company called Acme, Inc. But this runs the risk of finding people from different companies with Acme in the title, such as "Acme Vending" and "Acme Services". |
current-company | N | Valid values are true or false. true returns members who currently work at the company specified in the company parameter. false returns all members who have ever worked at the company specified in the company parameter. |
title | N | Returns members who have a particular title on their profile. title works with the current-title parameter, which specifies whether the title must be the current title or if it can be anywhere on a profile. |
current-title | N | Valid values are true or false. true returns members who currently have the title specified in the title parameter. false returns all members who have had the title specified in the title parameter. |
industry-code | N | Returns members within a specific industry. Refer to the Industry Codes page for the full list of industry codes you can use. You can specify as many industry codes as you need by repeating the parameter. Using an invalid industry code will return a successful call with zero search terms. |
search-location-type | N | To search within a country or postal code, use I. To do a general search either leave this parameter off or use Y. |
country-code | Conditional | Returns members within a specific country. You must also use search-location-type=I if you use the country-code parameter. Acceptable country codes are those that are defined in the ISO 3166 standards. |
postal-code | N | Returns members within a specific postal code. Valid postal codes are those that are supported by the USPS. Using this parameter requires that you also use the country-code parameter and search-location-type=I. |
network | N | Valid values are in or out. in searches within the currently logged in member's three degree network. out searches all profiles outside the network of the currently logged in member. To search everyone at a company, you would make this call twice, once for in-network and once for out-of-network. To get all "in network" and "out of network" search results you'll need to make as many calls as needed taking pagination into account. |
start | N | Starting location within the result set for paginated returns. Ranges are specified with a starting index and a number of results (count) to return. The default value for this parameter is 1. |
count | N | Ranges are specified with a starting index and a number of results to return. The default value is 10 and that is tihe maximum number returned. Requesting more will return 10. |
sort-criteria | N | Controls the order in which search results are presented:.
|
Sample Return XML
A successful call returns an XML document in the following format:
<people total="59" start="0" count="10">
<person>
<id>
<first-name>
<last-name>
<headline>
<location>
<name>
</location>
<industry>
<connections total="" />
<num-recommenders>
<distance>
<positions total="">
<position>
<id>
<title>
<summary>
<start-date>
<year>
</start-date>
<is-current>
<company>
<type>
<name>
<industry>
</company>
</position>
<api-standard-profile-request>
<url>
<headers total="">
<http-header>
<name>
<value>
</http-header>
</headers>
</api-standard-profile-request>
<site-standard-profile-request>
<url>
</site-standard-profile-request>
</person>
Returned Member URL Resources
For your convenience, the XML returns two URLs that let you easily display a standard profile.
- apiStandardProfileUrl is the URL you use to return a standard profile.
- siteStandardProfileUrl is URL you use to display a standard profile on LinkedIn.com
Having Problems?
- Check our Known API Issues page to see if your issue is known.
- For help working through technical issues, use our forums.
If you would like to leave a comment, please log in with your LinkedIn account credentials.
There is currently no support for jobs, groups, or answers.

Is the default value for "the start attribute of people" 1 or 0?
According to the written documentation it should be 1, but given the example output, it is 0.
From a developer point of view, "the start attribute of people" is an index. If you are using 0-based indexation, having 0 as the default value should be logical, but I don't know your implementation.
It would also be nice to know the default value for optional parameters and what is the behavior if they are not provided.
It includes :
* current-company
* current-title
* network
* sort-criteria
Also it could be interesting to know what happens with 'null' value e.g. for industry-code, country-code and postal-code.
E.g I am searching for industry-code=47, do the results include persons having a company without industry-code?
Would it be possible to return a person's "last modified" timestamp and have a parameter to search on "last modified" both "since" and "prior"?
Thanks.
Echoing what John requested - are there any plans to expose the last modified timestamp for items?

What is the scope of the search done by this API? Does it search *all* profiles on LinkedIn, or only the currently authenticated user's connections?
the "network" argument ("in" or "out") allows the user to search inside their network or outside/all the network.

I would like to search using first name and last name,
name | N | Returns all members with a name matching the one specified in the parameter. If only one name is provided, it's assumed to be the last name (surname). Multiple words must be separated by a plus (+) sign. Boolean logic isn't supported. |
In the documention it is specified that we need to seperate multiple words using "+ sign". But when i do so, i end up with error : 403
Any examples for this would be of great help.
-Vijay

Might be useful to have a separate 'default' column in the 'Parameters' table above. It would make scanning for default values quicker without going through the description. For example, would be good to know what the default is for 'sort-criteria' if there is one.
Thanks!
Michael
We aren't planning to open guest (2-legged OAuth) access to this API. We are considering providing a new public profile search API in the future, and this would serve that purpose, but that is not in the near future.
Public profile search API is a must and should be done with priority.
I guess many app developers are eagerly waiting for the same.

Is there a Roadmap or estimated timeline for developing support for groups etc?
We don't have an estimate for groups APIs yet. Its something we intend to do but it probably won't be sooner than 3-6 months.
The documentation says the Search API returns an array of matching profiles. I assume that the contents of this array can be expanded by including a Field Selector argument with the request, right? I also assume that any/all fields listed in the Profile Fields table can be selected, right? Are there variations in what content is returned based on whether the particular person found by the search is a connection of the person in who's name the request was made?
Hi Jon,
The Search API doesn't support Field Selectors at this time. The data returned in search results is the limit of the data you can retrieve based on the Search API. You can further use the Profile API by member ID to fetch more information about a member found via search. If the member is within three degrees of the searcher, no special permissions are required to make the profile API call. However, if the member is outside of their three degree network, you'll need to provide authentication headers along with your request. Though it should also probably be explicitly documented here, you can find out how to use the additional headers in this forum thread: x-li-auth-token required? There are variations of the content returned based on who is requesting the content in the Search API. The size of a member's personal network and the groups they belong to both play a part in what's visible to them in search results, as similarly found on the website.
I'd like to put in a vote for company search. It looks like it's not available like search on the other entities mentioned in the threads above. It would be useful to have access to this data when showing a user. TIA.
I'd also like to put in a vote for public profile search. Without this some basic things I'm trying to accomplish is going to be very difficult and not very user-experience friendly.
Adding a "+" sign betweeen and last name does not work. i get "(400) Bad Request". When I search with name & company, I never get any results. The AND does not work to filter by company and name. Any suggestions?
Actions
More Like This
- Retrieving data ...
LinkedIn.com Home | About LinkedIn | Learning Center | Blog | Advertising | Press | Partners | Careers
Copyright © 2009 LinkedIn Corporation. All rights reserved. | User Agreement | Privacy Policy | Copyright Policy
Use of this site is subject to express terms of use, which prohibit commercial use of this site.
is there support for JOBS, Groups or Answers search in this version of the API??