bannerColor WARNING_YELLOW templateName stackForums



IN.API.Profile().ids(id1, id2, id3).fields(field1, field2, field3).result(resultCallback)
IN.API.Profile().ids([id1, id2]).fields([field1, field2]).result(resultCallback)

  • default ids() - Array {String}, Argument List {String} 
    Specifies the IDs to retrieve
  • fields() (optional) - Array {String}, Argument List {String} 
    Specifies the fields to retrieve. If not specified, the default fields will be used: "id", "firstName", "lastName", "headline", "pictureUrl".  A full list of available fields can be found in Profile Fields.


Console Examples

There are a few interactive console examples which you can play with to understand the profile call:,,

Basic Example


No fields are included, so the results include the standard fields (currently headline, id, firstName, lastName,, location, siteStandardProfileRequest, apiStandardProfileRequest, pictureUrl, url, industry). An example result would then be a Javascript object which is a list of person objects.  An example of the person object looks like this:

   "headline":"President of the United States",





       "name":"Washington, DC","country":{"code":"us"}













    "industry":"Executive Branch",



Specific Fields

The Profile call supports a .fields() method which allows you to specify which fields you want returned, instead of just getting the default fields. If youwant to understand what fields are available for each person, see the Profile Fields documentation, as well as the Field Selector information to understand how to express your request correctly.

    .result(function(result) {
       alert JSON.stringify(result)) 

In this example we're asking for two specific fields (once you start specifying Profile Fields, your return is limited to just the fields you have asked for.  The defaults are overriden entirely.  In addition, instead of calling a separate function, an inline function has been created for the results.  The results for this case would be much smaller, and the results would be shown in an alert window to the user.

"headline":"President of the United States",


Field Selectors

When selecting fields for a profile, it's possible to extend the search to get specific sub-fields. For instance, if you want to see the user's positions, you can ask for those.  But you can also ask for the company name by using Field Selectors like so:
    .result(function(result) {
       alert (JSON.stringify(result))