Search code examples
javascriptnode.jslinkedin-apilinkedin-jsapi

Linkedin "/people" API returning wrong location information


I am using linkedin api to retrieve the location(City, state, country) information of a user, but it is not returning me the correct city information.

It seems like it is retrieving a city name by its own based on the zip code provided.

Linkedin API Used : https://api.linkedin.com/v1/people/~:(certifications:(name,authority,number,start-date,end-date),email-address,first-name,last-name,headline,location:(name,country:(code)),positions,skills,educations,main-address,phone-numbers)?format=json&oauth2_access_token=


Solution

  • Your API request is asking LinkedIn for the country code, and "name" of the member's location, not City, State, Country as you suggested in your question.

    LinkedIn has it's own list of location values that do not align 100% to city borders, and often express general global business areas (e.g. "San Francisco Bay Area")

    For additional information, see: https://developer.linkedin.com/docs/fields/location