Social Metadata API

Warning

Deprecation Notice: The Marketing Version 202508 (Marketing August 2025) will be sunset on August 17, 2026. We recommend that you migrate to the latest versioned APIs to avoid disruptions. For information on all the supported versions, refer to the migrations documentation. If you haven’t yet migrated and have questions, submit a request on the LinkedIn Developer Support Portal.

Some shares and posts may have social actions such as reactions and comments attached to them. The socialMetadata API allows you to read social actions on these shares or posts,both organic and sponsored. The new service provides access to the reactions content type, which is an expansion of likes and replaces the functionality provided by the existing socialActions endpoint.

The service currently provides the following methods:

  • Get a Summary of Social Metadata
  • Batch Get a Summary of Social Metadata
  • Enable or Disable Comments on a Thread

For creating and retrieving a comment, please visit Comments API.

Permissions

Permission Description
w_organization_social_feed Post, comment, and react on posts on behalf of an organization. Restricted to organizations in which the authenticated member has one of the following company page roles:
  • ADMINISTRATOR
  • DIRECT_SPONSORED_CONTENT_POSTER
  • RECRUITING_POSTER
r_organization_social_feed Retrieve organizations' posts, comments, and reactions. Restricted to organizations in which the authenticated member has one of the following company page roles.
  • ADMINISTRATOR
  • DIRECT_SPONSORED_CONTENT_POSTER
w_member_social_feed Post, comment, and react on posts on behalf of an authenticated member.
r_member_social_feed Restricted Retrieve posts, reactions, and likes on behalf of an authenticated member. This permission is granted to select developers only.

For more information about company page roles, refer to Organization Access Control by role.

Social Metadata

Schema

Field Format Description
commentsState Enum String The state of thread comments. Possible values
  • OPEN: Thread is open to comments.
  • CLOSED: Thread is closed to comments.
  • PROCESSING: Thread is in the process of being deleted.
  • DELETED: Thread is deleted.
commentSummary Represents the comment summary of the entity being commented on.
commentSummary.count int Total number of comments (including replies).
commentSummary.topLevelCount int Total number of comments (excluding replies).
entity URN The entity to which this Social Metadata is tied.
reactionSummaries Represents the reaction summary of the entity being reacted to. Key will be the reaction type's enum.
reactionSummaries.reactionType Enum String The type of reaction. Possible values are:
  • LIKE: "Like" in the UI
  • PRAISE: "Celebrate" in the UI
  • MAYBE: "Curious" in the UI
  • EMPATHY: "Love" in the UI
  • INTEREST: "Insightful" in the UI
  • APPRECIATION: "Support" in the UI
  • reactionSummaries.count int The total number of a given type of reactions.

    Get a Summary of Social Metadata

    GET https://api.linkedin.com/rest/socialMetadata/{shareUrn|ugcPostUrn|commentUrn}
    

    Sample Response

    {
        "reactionSummaries": {
            "EMPATHY": {
                "reactionType": "EMPATHY",
                "count": 1
            }
        },
        "commentsState": "OPEN",
        "commentSummary": {
            "count": 4,
            "topLevelCount": 3,
         },
        "entity": "urn:li:activity:6524387688164966400"
    }
    

    Batch Get a Summary of Social Metadata

    GET https://api.linkedin.com/rest/socialMetadata?ids=List({shareUrn|ugcPostUrn|commentUrn},{shareUrn|ugcPostUrn|commentUrn})
    

    Sample Response

    {
        "statuses": {},
        "results": {
            "urn:li:activity:6516117581072519168": {
                "commentsState": "OPEN",
                "entity": "urn:li:activity:6516117581072519168",
                "reactionSummaries": {
                    "PRAISE": {
                        "reactionType": "PRAISE",
                        "count": 1
                    }
                },
                "commentSummary": {
                    "count": 4,
                    "topLevelCount": 3,
                }
            },
            "urn:li:comment:(urn:li:activity:6524387688164966400,6636062862760562688)": {
                "commentsState": "OPEN",
                "entity": "urn:li:comment:(urn:li:activity:6524387688164966400,6636062862760562688)",
                "reactionSummaries": {
                    "CELEBRATION": {
                        "reactionType": "CELEBRATION",
                        "count": 5
                    }
                },
                "commentSummary": {
                    "count": 9,
                    "topLevelCount": 5,
                }
            }
        },
        "errors": {}
    }
    

    Enable or Disable Comments on a Thread

    To disable comments, set the commentsState field to CLOSED. To enable comments, set commentsState field to OPEN. This API only accepts thread Urns and will reject any writes with a comment URN.

    Disabling comments will delete all existing comments on the thread. Reactions will be left as is. Re-enabling comments will allow comments to be written on the thread again.

    Sample Request

    POST https://api.linkedin.com/rest/socialMetadata/{shareUrn|ugcPostUrn}?actor={organizationUrn|personUrn}
    
    {
        "patch": {
            "$set": {
                "commentsState": "CLOSED"
            }
        }
    }
    

    A successful response returns a 202 Accepted.

    To resolve nested comments for a given parent comment, provide a parent commentUrn as the target in the request URL. A commentUrn is a composite URN constructed using a comment ID and threadUrn such as an ActivityUrn.