Search code examples
linkedin-api

How to read the statistics for LinkedIn posts?


I want to create a simply app to get statistics (read, liked, commented) for my LinkedIn posts. LinkedIn sends me a periodic emails with this statistics, but I can't find the correct API for this.


Solution

  • You can retrieve number of likes and number of comments via the network updates API once you have obtained the key for a specific post (="share"):

    curl -H "Authorization: Bearer <token>" "https://www.linkedin.com/v1/people/~/network/updates/key=UPDATE-xxxxxxx-xxxxxxxxxxx?format=json" | jq '.numLikes, .updateComments._total'
    

    that info is also available in the list of updates as obtained from:

    curl -H "Authorization: Bearer <token>"  https://www.linkedin.com/v1/people/~/network/updates?format=json