Facebook Pixel
APILinkedIn User

Get profile visitors

Retrieve a list of people who viewed your LinkedIn profile. Shows visitor name, headline, location, and visit timestamp. Some visitors may be anonymous depending on their privacy settings. Supports pagination and various time ranges.

POST/profile/visitors
Authentication requiredUser

Code Examples

curl -X POST 'https://api.connectsafely.ai/linkedin/profile/visitors' \
-H 'Authorization: Bearer <your_api_key>' \
-H 'Content-Type: application/json' \
-d '{"maxVisitors":20}'

Parameters

No parameters.

Request Body

FieldTypeRequiredDescription
accountIdstringNoLinkedIn account ID to use. If not provided, uses the default account.
timeRangestringNoTime range to filter visitors
countnumberNoPage size for pagination (visitors fetched per API request). Use maxVisitors to control the total limit.
startnumberNoPagination offset (0-indexed)
fetchAllbooleanNoWhen true, automatically paginates to fetch all visitors up to maxVisitors limit
maxVisitorsnumberYesTotal number of visitors to retrieve. This is the primary limit - use this parameter to specify how many visitors you want (e.g., maxVisitors: 50 for 50 visitors).

Example

{
  "maxVisitors": 20
}

Responses

StatusDescription
200Profile visitors retrieved successfully
401Unauthorized - Invalid or missing API key
403Access forbidden - LinkedIn Premium may be required to see all visitors
500Internal server error

200 Response Parameters

NameTypeDescription
successbooleanWhether the request was successful
accountIdstringLinkedIn account ID used for the request
visitorsarray
paginationobject
hasMorebooleanWhether more visitors are available for pagination
timeRangestringTime range filter applied
filtersobjectFilters applied to the request

200 Example

{
  "success": true,
  "accountId": "696ce9e780e0483585e4e553",
  "visitors": [
    {
      "entityUrn": "urn:li:fsd_profile:ACoAADlVtYMBLWFFOJ1ezKvVfycTiiAjoFmMK68",
      "publicIdentifier": "ritika-kulkarni-85718922a",
      "name": "Ritika Kulkarni",
      "headline": "Full Stack Developer | Agentic AI | Python | Gen AI",
      "profilePicture": "https://media.licdn.com/dms/image/v2/D4D03AQEi_YdnvAQoew/profile-displayphoto-shrink_100_100/...",
      "viewedAt": "Viewed 47m ago",
      "connectionDegree": "1st",
      "profileUrl": "https://www.linkedin.com/in/ritika-kulkarni-85718922a"
    },
    {
      "entityUrn": "urn:li:fsd_profile:ACoAAFcWhRYB8fzl-VIyjFSFXfhToQE6M5bJiuw",
      "publicIdentifier": "mamta-mishra-386398349",
      "name": "Mamta Mishra",
      "headline": "Student at Dr. Ram Manohar Lohia Awadh University",
      "profilePicture": "https://media.licdn.com/dms/image/v2/D5603AQFdaHjJWpZbww/profile-displayphoto-shrink_100_100/...",
      "viewedAt": "Viewed 52m ago",
      "connectionDegree": "2nd",
      "profileUrl": "https://www.linkedin.com/in/mamta-mishra-386398349"
    }
  ],
  "pagination": {
    "start": 0,
    "count": 10,
    "total": 8
  },
  "hasMore": false,
  "timeRange": null,
  "filters": {
    "timeRange": "past_90_days",
    "count": 20,
    "start": 0,
    "fetchAll": false,
    "maxVisitors": 10
  }
}

401 Response Parameters

NameTypeDescription
errorstring

401 Example

{
  "error": "Unauthorized - Invalid credentials"
}

403 Response Parameters

NameTypeDescription
errorstring

403 Example

{
  "error": "LinkedIn Premium required to view profile visitors"
}

500 Response Parameters

NameTypeDescription
errorstring

500 Example

{
  "error": "Failed to fetch profile visitors"
}