Field Selectors

About Field Selectors

Many of our resources allow you to specify what fields you want returned. We call this syntax field selectors. By indicating exactly the information you need, we can optimize the amount of time needed to return your results. It also reduces the amount of data passing across the wire. The two combine to make our APIs speedy and efficient, a critical factor in any web application, and more so for anyone relying on external APIs.

Remember, each field you select adds computation time to your API request. It's best to be very specific as to what fields you want returned in each API call you make.

Supported Resources

Field selectors are supported for most GET-based resources. See Profile Fields for a full account of available fields. Not all fields are available in all scenarios. The most common areas where you will want to use field selectors are:

How To Use It

Field selectors are specified after the resource identifiers and path components of a resource, prefixed by a colon, contained within parenthesis, and separated by commas. Fields will be returned in the order specified. When URL-encoding your resource URLs, ensure that the parenthesis used in selectors remain unescaped.

Examples

To get a member's ID, first name, last name, and industry:

Or the same set of information for their connections:

In the case of specifying the fields returned from a call to the Get Network Updates API, you would need to look at the format of the data returned from the particular Network Update Type to determine how to access and specify the fields. For example, to specify the person fields returned for a PRFU update, a sample call would be:

Fields selectors can also be nested to access individual fields from a larger collection. For example, to get just the job titles and not the rest of the information about positions:

Field selectors with resource identifiers allow you to request information about multiple entities at once. Specify them similarly, but append a double colon - here's an example getting profile information about thee members: the first is the current member, indicated by a tilde; the next has an id of 12345; and the last has a public profile URL of:

https://www.linkedin.com/in/adamnash

In the actual call to the Profile API endpoint, notice the URL escaping:

Of course, this can be combined to specify both resources and fields: