linkedin.com
Get LinkedIn profile photo
Input
publicId requiredLinkedIn public profile id — the /in/ segment. Accepts the vanity slug (e.g. 'dhuynh95'), the obfuscated member token (ACoAA…), or a full profile URL (the /in/<id> is extracted).
Output
name requiredProfile name (first main h2). Never null: a top-card that does not parse (auth wall, class rotation, blank shell) throws instead of returning a nameless record.
hasPhoto requiredTrue when a real display photo was found; false when the profile shows only LinkedIn's default ghost avatar.
photoUrl requiredFull signed avatar URL on media.licdn.com (…/profile-displayphoto-…). The ?e=&v=&t= query string is part of the signature — do NOT strip it or the fetch 403s. Null when the profile has no real photo.
profileUrl requiredphotoAlt optionalThe avatar img alt text; null if absent — LinkedIn currently renders the avatar with an empty alt.
