Export LinkedIn Posts Statistics
It turns out LinkedIn doesn’t have an easy way to export data on your published posts (views, likes, comments and yada). (yet!)
With below steps, you can export your data:
- Goto https://www.linkedin.com/in/[YOUR-NAME-HERE]/detail/recent-activity/shares/
- Scroll to the bottom of the page, and keep scrolling till you reach the posts you want to export
- Open Chrome devtools (
Ctrl+Shift+I
) and gotoconsole
tab. (or any browser) - Run below javascript code
let data = Array.from(document.querySelectorAll('#main .occludable-update.ember-view')).map(div => {
if (!div.querySelector('[data-urn]')) return
const urn = div.querySelector('[data-urn]').dataset.urn
const url = `https://www.linkedin.com/feed/update/${urn}/`
const date = div.querySelector('span.feed-shared-actor__sub-description span.visually-hidden').textContent
const text = div.querySelector('div.feed-shared-update-v2__description-wrapper span[dir]').textContent
const numbr = e => (e)?+e.textContent.trim().split(' ')[0].replace(/,/g, ''):0
const reactions = numbr(div.querySelector('.social-details-social-counts__reactions-count'))
const comments = numbr(div.querySelector('.social-details-social-counts__comments'))
const views = numbr(div.querySelector('.analytics-entry-point strong'))
let link = div.querySelector('.feed-shared-article__link-container>a')
link = (link)?link.getAttribute('href'):''
return { url, date, text, reactions, comments, views, link }
}).filter(d => d)
// copies data as JSON into your clipboard
copy(data)
- Data is now copied to your clipboard. Paste it in notepad editor to save the data.
- Use any JSON to CSV convertors if you need to do spreadsheet analysis.
You now have raw data (url, date, text, reactions, comments, views, link) of your LinkedIn posts.
LinkedIn only shows approximate published date.