Share via


Member Post Statistics

Warning

Deprecation Notice The Marketing Version 202411 (Marketing November 2024) has been sunset. We recommend that you migrate to the latest versioned APIs to avoid disruptions. See the Migration page for more details. If you haven’t yet migrated and have questions, submit a request on the LinkedIn Developer Support Portal.

Try in Postman

The memberCreatorPostAnalytics API retrieves both single post or aggregated posts analytics for the authenticated member.

  • Single post statistics: To retrieve single post statistics, use the entity finder. The API returns statistics for the given post, query type, and aggregation.

  • Aggregated post statistics for the member: To retrieve aggregated post statistics for the member, use the me finder. The API returns statistics for the given post, query type, and aggregation for all of the member's posts.

Permissions

Permission Description
r_member_postAnalytics Retrieve your posts and their reporting data.

Metrics Definition for Member Post Analytics

Metric Definition
IMPRESSION Number of impressions of the requested entity.
MEMBERS_REACHED Number of members reached, post viewers or unique impressions count metric.
RESHARE Number of reshares/reposts of the requested entity.
REACTION Number of reactions of the requested entity.
COMMENT Number of comments of the requested entity.

Retrieve Single Post Statistics

Call memberCreatorPostAnalytics with entity query parameter to retrieve single post statistics.

Query Parameters

Name Description Format Optional
q Finder name. Value must be entity. String No
entity URN for the entity whose type should be ugcPost or share. URN. For example, urn:li:ugcPost:6443156446455693312. No
queryType Type of analytics metrics requested. String. Options: IMPRESSION, MEMBERS_REACHED, RESHARE, REACTION, COMMENT. No
aggregation Type of aggregation. String. Options: DAILY: The query result will be a list of data points with metric counts broken down by day for the content. Note that the combination of MEMBERS_REACHED + DAY is not supported. TOTAL (default): The query result will be a single data point with the total number of metric counts for the content. Yes
dateRange The time range for fetching analytics. The time range for which analytics will be fetched. If missing, it returns analytics for the lifetime of the video. It is an object with start and end fields holding the start and end date/time. The time range is inclusive of the start and exclusive of the end. The start and end fields are both optional. Yes

Response Body Fields

Field Name Type Description Required
targetEntity URN URN for the post entity with type ugcPost or share, e.g., urn:li:ugcPost:123. Yes
metricType String Type of analytics metrics returned. Options: IMPRESSION, MEMBERS_REACHED, RESHARE, REACTION, COMMENT. Yes
count Long The value of analytics returned for all available metrics. Data is best-effort accurate and shouldn't be used for billing purposes. Yes
dateRange Object The time range for fetching analytics. If missing, returns analytics for the lifetime of the post. No

DateRange Object Schema

Field Name Type Description Required
dateRange.start Object Inclusive starting date (year, month, day format). No
dateRange.start.year Integer Inclusive starting year. Yes, if dateRange.start is present.
dateRange.start.month Integer Inclusive starting month. Yes, if dateRange.start is present.
dateRange.start.day Integer Inclusive starting day. Yes, if dateRange.start is present.
dateRange.end Object Exclusive ending date (year, month, day format). Defaults to the current date. No
dateRange.end.year Integer Exclusive ending year. Yes, if dateRange.start is present.
dateRange.end.month Integer Exclusive ending month. Yes, if dateRange.start is present.
dateRange.end.day Integer Exclusive ending day. Yes, if dateRange.start is present.

Sample Request

To fetch the daily reactions count of a post owned by the current member from 2024/05/04 to 2024/05/06.

Note

  • Daily impression metrics are not supported if given entity is post.
  • For the entity parameter, if the URN is a ugcPostUrn, use entity=(ugc:urn%3Ali%3AugcPost%3A7325786486870552578). If the URN is a shareUrn, use entity=(share:urn%3Ali%3Ashare%3A7325786486870552578).

Restli 2.0:

GET https://api.linkedin.com/rest/memberCreatorPostAnalytics?q=entity&entity=(share:urn%3Ali%3Ashare%3A7325786486870552578)&queryType=REACTION&aggregation=DAILY&dateRange=(start:(day:4,month:5,year:2024),end:(day:6,month:5,year:2024))

Sample Response

{
    "elements": [
        {
            "count": 10,
            "metricType": {
                "com.linkedin.adsexternalapi.memberanalytics.v1.CreatorPostAnalyticsMetricTypeV1": "REACTION"
            },
            "targetEntity": {
                "share": "urn:li:share:7325786486870552578"
            },
            "dateRange": {
                "start": {
                    "month": 5,
                    "day": 4,
                    "year": 2024
                },
                "end": {
                    "month": 5,
                    "day": 5,
                    "year": 2024
                }
            }
        },
        {
            "count": 20,
            "metricType": {
                "com.linkedin.adsexternalapi.memberanalytics.v1.CreatorPostAnalyticsMetricTypeV1": "REACTION"
            },
            "targetEntity": {
                "share": "urn:li:share:7325786486870552578"
            },
            "dateRange": {
                "start": {
                    "month": 5,
                    "day": 5,
                    "year": 2024
                },
                "end": {
                    "month": 5,
                    "day": 6,
                    "year": 2024
                }
            }
        }
    ],
    "paging": {
        "count": 10,
        "start": 0,
        "links": []
    }
}

Retrieve Aggregated Post Statistics

Call memberCreatorPostAnalytics with me query parameter to retrieve aggregated posts statistics for the current member.

Query Parameters

Name Description Format Optional
q Finder name. Value must be me. String No
queryType Type of analytics requested. String. Options: IMPRESSION, MEMBERS_REACHED, RESHARE, REACTION, COMMENT. RESHARE, REACTION, COMMENT are not consistent with UI at the moment. No
aggregation Type of aggregation. String. Options: DAILY: The query result will be a list of data points with metric counts broken down by day for the content. Note that the combination of MEMBERS_REACHED + DAY is not supported. TOTAL (default): The query result will be a single data point with the total number of metric counts for the content. Yes
dateRange The time range for fetching analytics. The time range for which analytics will be fetched. If missing, it returns analytics for the lifetime of the video. It is an object with start and end fields holding the start and end date/time. The time range is inclusive of the start and exclusive of the end. The start and end fields are both optional. Yes

Response Body Fields

Field Name Type Description Required
count Long The value of analytics returned for all available metrics. Data is best-effort accurate and shouldn't be used for billing purposes. Yes
metricType String Type of analytics metrics returned. Options: IMPRESSION, MEMBERS_REACHED, RESHARE, REACTION, COMMENT. Yes
dateRange Object The time range for fetching analytics. If missing, returns analytics for the lifetime of the post. No

DateRange Object Schema

Field Name Type Description Required
dateRange.start Object Inclusive starting date (year, month, day format). No
dateRange.start.year Integer Inclusive starting year. Yes, if dateRange.start is present.
dateRange.start.month Integer Inclusive starting month. Yes, if dateRange.start is present.
dateRange.start.day Integer Inclusive starting day. Yes, if dateRange.start is present.
dateRange.end Object Exclusive ending date (year, month, day format). Defaults to the current date. No
dateRange.end.year Integer Exclusive ending year. Yes, if dateRange.start is present.
dateRange.end.month Integer Exclusive ending month. Yes, if dateRange.start is present.
dateRange.end.day Integer Exclusive ending day. Yes, if dateRange.start is present.

Sample Request

To fetch the daily reactions count of a post owned by the current member from 2024/05/04 to 2024/05/06.

Restli 2.0:

GET https://api.linkedin.com/rest/memberCreatorPostAnalytics?q=me&queryType=REACTION&aggregation=DAILY&dateRange=(start:(day:4,month:5,year:2024),end:(day:6,month:5,year:2024))

Sample Response

{
    "elements": [
        {
            "count": 10,
            "metricType": {
                "com.linkedin.adsexternalapi.memberanalytics.v1.CreatorPostAnalyticsMetricTypeV1": "REACTION"
            },
            "dateRange": {
                "start": {
                    "month": 5,
                    "day": 4,
                    "year": 2024
                },
                "end": {
                    "month": 5,
                    "day": 5,
                    "year": 2024
                }
            }
        },
        {
            "count": 20,
            "metricType": {
                "com.linkedin.adsexternalapi.memberanalytics.v1.CreatorPostAnalyticsMetricTypeV1": "REACTION"
            },
            "dateRange": {
                "start": {
                    "month": 5,
                    "day": 5,
                    "year": 2024
                },
                "end": {
                    "month": 5,
                    "day": 6,
                    "year": 2024
                }
            }
        }
    ],
    "paging": {
        "count": 10,
        "start": 0,
        "links": []
    }
}

API Error Details

HTTP STATUS CODE ERROR MESSAGE ERROR DESCRIPTION RESOLUTION
400 Unsupported query type TOTAL_COUNT for metric type MEMBER_FOLLOWER. Unsupported query type, and aggregation combination. Update the query parameter.
500 Internal server error. Intermittent LinkedIn server error. Please try again.