How to Retrieve all possible information about a LinkedIn Account ? (API using C#)
Asked Answered
S

3

40

I am writting an C# app to make use of Linkedin's API.

I want to be able to query "Person" (First Name + Last Name) and retrieve all the possible information about this group of people with the same name

I am currently using my own implementation of the REST API alongside People-Search API calls.

Here's an example of a request that I know works:

https://api.linkedin.com/v1/people-search:(people:(id,first-name,last-name,headline,picture-url),num-results)?

I'm running it with: first-name=parameter&last-name=parameter after the ? mark

The problem is, I want to retrieve more information such as Title, Industry, Current-company, current-school etc. Refer here for the list of possible parameters.

This notation is what they call Field Selectors

How do i structure my API Call so i can get all the possible information about someone ?

Swor answered 21/12, 2011 at 16:35 Comment(0)
I
27

You've already got the notation down, all you need to do is add the rest of the field selectors, nesting them where needed:

https://api.linkedin.com/v1/people-search:(people:(id,first-name,last-name,headline,picture-url,industry,positions:(id,title,summary,start-date,end-date,is-current,company:(id,name,type,size,industry,ticker)),educations:(id,school-name,field-of-study,start-date,end-date,degree,activities,notes)),num-results)?first-name=parameter&last-name=parameter

Keep in mind that per the Profile Field docs, you can only get educations for 1st degree connections of the current user.

Indore answered 21/12, 2011 at 16:58 Comment(2)
Is there a way to see in the results, which connection is connection from me? I have this one: api.linkedin.com/v1/… and I can not see which one is first and which one is second dgree.Mouflon
i'm not able to retrive educations, skills details and many others..can you suggest the sameKyrakyriako
K
42

Here is the url to get everything for a user Profile:

https://api.linkedin.com/v1/people/~:(id,first-name,last-name,headline,picture-url,industry,summary,specialties,positions:(id,title,summary,start-date,end-date,is-current,company:(id,name,type,size,industry,ticker)),educations:(id,school-name,field-of-study,start-date,end-date,degree,activities,notes),associations,interests,num-recommenders,date-of-birth,publications:(id,title,publisher:(name),authors:(id,name),date,url,summary),patents:(id,title,summary,number,status:(id,name),office:(name),inventors:(id,name),date,url),languages:(id,language:(name),proficiency:(level,name)),skills:(id,skill:(name)),certifications:(id,name,authority:(name),number,start-date,end-date),courses:(id,name,number),recommendations-received:(id,recommendation-type,recommendation-text,recommender),honors-awards,three-current-positions,three-past-positions,volunteer)?oauth2_access_token=PUT_YOUR_TOKEN_HERE

Requires an Oauth2 access token.

Here it is in a nice String list (Java):

apiUrl
    + "/v1/people/~:("
        + "id,"
        + "first-name,"
        + "last-name,"
        + "headline,"
        + "picture-url,"
        + "industry,"
        + "summary,"
        + "specialties,"
        + "positions:("
            + "id,"
            + "title,"
            + "summary,"
            + "start-date,"
            + "end-date,"
            + "is-current,"
            + "company:("
                + "id,"
                + "name,"
                + "type,"
                + "size,"
                + "industry,"
                + "ticker)"
        +"),"
        + "educations:("
            + "id,"
            + "school-name,"
            + "field-of-study,"
            + "start-date,"
            + "end-date,"
            + "degree,"
            + "activities,"
            + "notes),"
        + "associations," /* Full Profile */
        + "interests,"
        + "num-recommenders,"
        + "date-of-birth,"
        + "publications:("
            + "id,"
            + "title,"
            + "publisher:(name),"
            + "authors:(id,name),"
            + "date,"
            + "url,"
            + "summary),"
        + "patents:("
            + "id,"
            + "title,"
            + "summary,"
            + "number,"
            + "status:(id,name),"
            + "office:(name),"
            + "inventors:(id,name),"
            + "date,"
            + "url),"
        + "languages:("
            + "id,"
            + "language:(name),"
            + "proficiency:(level,name)),"
        + "skills:("
            + "id,"
            + "skill:(name)),"
        + "certifications:("
            + "id,"
            + "name,"
            + "authority:(name),"
            + "number,"
            + "start-date,"
            + "end-date),"
        + "courses:("
            + "id,"
            + "name,"
            + "number),"
        + "recommendations-received:("
            + "id,"
            + "recommendation-type,"
            + "recommendation-text,"
            + "recommender),"
        + "honors-awards,"
        + "three-current-positions,"
        + "three-past-positions,"
        + "volunteer"
    + ")" 
    + "?oauth2_access_token="+ token;
Knock answered 7/7, 2014 at 23:21 Comment(7)
How would you edit the URL so the data is returned in json format?Terminable
How would you get users email? I have tried using email-address in json, it doesn't return anything? but when i just try to query <pre> APIUrl + "/v1/people/~:(" + "id," + "first-name," + "last-name," + "email-address" </pre> I get email back. Do you have any suggestions? ThanksSilencer
how to get location?Denotative
wHAT'S that? Doesn't work even with a valid access token. <status>401</status> and <message>Invalid access token.</message>.Equities
that's very helpfulKolyma
Thanks! No example in linked in docs... One of the worst public apis I have delt withVespertilionine
can you tell me how to get access token, i'm not able to get it, i'm following linked in official documenatationKyrakyriako
I
27

You've already got the notation down, all you need to do is add the rest of the field selectors, nesting them where needed:

https://api.linkedin.com/v1/people-search:(people:(id,first-name,last-name,headline,picture-url,industry,positions:(id,title,summary,start-date,end-date,is-current,company:(id,name,type,size,industry,ticker)),educations:(id,school-name,field-of-study,start-date,end-date,degree,activities,notes)),num-results)?first-name=parameter&last-name=parameter

Keep in mind that per the Profile Field docs, you can only get educations for 1st degree connections of the current user.

Indore answered 21/12, 2011 at 16:58 Comment(2)
Is there a way to see in the results, which connection is connection from me? I have this one: api.linkedin.com/v1/… and I can not see which one is first and which one is second dgree.Mouflon
i'm not able to retrive educations, skills details and many others..can you suggest the sameKyrakyriako
L
12

I use this URL to get everything including email and formatted as json:

https://api.linkedin.com/v1/people/~:(id,first-name,email-address,last-name,headline,picture-url,industry,summary,specialties,positions:(id,title,summary,start-date,end-date,is-current,company:(id,name,type,size,industry,ticker)),educations:(id,school-name,field-of-study,start-date,end-date,degree,activities,notes),associations,interests,num-recommenders,date-of-birth,publications:(id,title,publisher:(name),authors:(id,name),date,url,summary),patents:(id,title,summary,number,status:(id,name),office:(name),inventors:(id,name),date,url),languages:(id,language:(name),proficiency:(level,name)),skills:(id,skill:(name)),certifications:(id,name,authority:(name),number,start-date,end-date),courses:(id,name,number),recommendations-received:(id,recommendation-type,recommendation-text,recommender),honors-awards,three-current-positions,three-past-positions,volunteer)?format=json

Loeb answered 18/2, 2016 at 18:8 Comment(6)
This is a perfect API call however due to recent changes in their developer program a lot of these fields are not accessible unless you're part of the partner program. If you want to test the above call you can use something like this console apigee.com/console/linkedinOdilo
Still works for me right now. Since I just wanted to know my own data. The apogee console is awesome.Godless
message: "Unknown authentication scheme",Equities
@DaisyR. You wouldn't happen to know which partner program? The descriptions of those programs are written by someone with zero technical background and I can't for the life of me figure out what to qualify for. Job history and education for inclusion in "my site's" profile is what I'm looking for.Imbrue
@Melvyn I agree my previous company applied and it was rejected so we only had access to basic info. I would try to make this application as strong as possible to integrate full API access to your app and I'm pretty sure this is the link developer.linkedin.com/partner-programs/apply best of luck!Odilo
This apigee.com/console/linkedin is not working. showing Error 410: The API Console Service is no longer availableIne

© 2022 - 2024 — McMap. All rights reserved.