LinkedIn termsUpdated
LinkedIn URN
Also called: URN, urn:li, LinkedIn uniform resource name
Definition
A LinkedIn URN (uniform resource name) is a text identifier in the form urn:li:{entityType}:{id}. LinkedIn uses URNs to name members, organizations, posts, images and other objects, for example urn:li:organization:12345 for a company.
How a URN is put together
LinkedIn's developer documentation describes the pattern as urn:{namespace}:{entityType}:{id}. For LinkedIn the namespace is always li. The entity type says what kind of object it is, and the part after the last colon is that object's ID. URNs returned by LinkedIn's APIs are at most 255 characters long.
| URN type | What it names |
|---|---|
| urn:li:person:{id} | A member. The ID is specific to each developer app, so it won't match the name in a profile URL. |
| urn:li:organization:{id} | A company, school or brand Page. Older company URNs (urn:li:company:{id}) map to the same ID. |
| urn:li:share:{id} and urn:li:ugcPost:{id} | A post. The Posts API returns one of these as the post's ID. |
| urn:li:activity:{id} | A post's activity in the feed; this is the form that often appears in post links copied from LinkedIn. |
| urn:li:image, urn:li:video, urn:li:document | Media uploaded for use in a post. |
Where you'll run into URNs
- In post links such as linkedin.com/feed/update/urn:li:activity:…/, where the URN sits right in the address.
- In the code from LinkedIn's “Embed this post”, whose iframe address ends in the post's URN.
- In API responses, where fields like author hold a person or organization URN rather than a name.
- In API post text, where a mention is written as @Name so LinkedIn can turn it into a link.
URN or plain ID?
Microsoft's LinkedIn docs treat an ID as the object's own key and a URN as a globally unique reference to it from somewhere else. Removing the urn:li:type: prefix gives you the ID. When a URN goes inside a URL parameter it has to be URL-encoded, so the colons become %3A.
A URN only names an object. Knowing a post's URN doesn't let anyone see it if the post isn't public.
You don't need URNs to build a LinkedInEmbed widget: it starts from a public profile or company page URL. See do I need a LinkedIn API key?
Sources
Related terms
- LinkedIn activity ID
- A LinkedIn activity ID is the long number that identifies one post in LinkedIn's feed. You'll find it in the post's link, after “activity-” in a /posts/ address or after urn:li:activity: in a /feed/update/ address.
- LinkedIn Page
- A LinkedIn Page is an organization's presence on LinkedIn, such as a company, school or brand. Members follow a Page rather than connect with it, and the Page's admins publish posts, manage job listings and view analytics for the organization.
- LinkedIn @mention
- An @mention tags a LinkedIn member or Page in a post or comment: you type @, start the name and pick it from the list. The name becomes a link to their profile or Page, and a mentioned member receives email and app notifications.
- Embed code
- Embed code is a snippet of HTML you paste into a web page to display content hosted somewhere else, such as a video, a social media post or a widget. It's usually an iframe tag, a script tag with a placeholder element, or a combination.
Related
Show your LinkedIn on your website
Paste a LinkedIn URL and embed it with one snippet. Free plan, no credit card.
Put your LinkedIn on your website today
Create your first widget in about two minutes. Free plan, no credit card required.