Facebook Pixel
APILinkedIn Profiles

Fetch LinkedIn profile information

Retrieve detailed profile information for a LinkedIn member including name, headline, premium status, and profile URNs. Results are cached for 6 hours to reduce API calls. Optionally include geo location details and contact information (email, phone if visible). Rate limit: 120 unique profiles per day per LinkedIn account (cached requests do not count against limit).

POST/profile
Authentication requiredProfile

Code Examples

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

Retrieve detailed profile information for a LinkedIn member including name, headline, premium status, and profile URNs. Results are cached for 6 hours to reduce API calls. Optionally include geo location details and contact information (email, phone if visible). Rate limit: 120 unique profiles per day per LinkedIn account (cached requests do not count against limit).

Parameters

No parameters.

Request Body

FieldTypeRequiredDescription
accountIdstringNoLinkedIn account ID to use. If not provided, uses the default account.
profileIdstringYesLinkedIn profile vanity URL slug (the part after linkedin.com/in/, e.g., "john-doe-123")
includeGeoLocationbooleanNoInclude detailed geo location data (city, country, coordinates)
includeContactbooleanNoInclude contact info (email, phone) if visible to viewer
includeExperiencebooleanNoInclude work experience history
includeEducationbooleanNoInclude education history
includeSkillsbooleanNoInclude skills with endorsement counts
forceRefreshbooleanNoSkip cache and fetch fresh data from LinkedIn. Use sparingly as it counts against rate limit.

Example

{
  "profileId": "john-doe-123",
  "includeGeoLocation": false,
  "includeContact": false,
  "includeExperience": false,
  "includeEducation": false,
  "includeSkills": false,
  "forceRefresh": false
}

Responses

StatusDescription
200Profile information retrieved successfully
400Bad request - Missing or invalid profileId
401Unauthorized - Invalid or missing API key
429Rate limit exceeded - Maximum 120 unique profiles per day

Rate Limit Headers

All responses include rate limit information in the headers:

HeaderDescription
X-RateLimit-ActionThe action type being rate limited
X-RateLimit-LimitMaximum actions allowed per period
X-RateLimit-UsedActions used in current period
X-RateLimit-RemainingActions remaining
X-RateLimit-ResetISO 8601 timestamp when limit resets

200 Response Parameters

NameTypeDescription
successbooleanWhether the request was successful
profileIdstringThe requested profile vanity URL slug
accountIdstringLinkedIn account ID used for the request
profileobjectProfile data (empty object if profile not found)
experiencearrayPositions, in the order the profile lists them. Always returned. Without includeExperience it holds the employers the profile page shows (the first five); with includeExperience=true it is the full history, at the cost of one more LinkedIn request. Several roles at one employer are separate entries sharing companyName and companyId.
skillsarraySkills. Always returned; send includeSkills=true for the full list with endorsement counts
educationarrayEducation history. Always returned; send includeEducation=true for the full list
cachedbooleanWhether the response was served from the 6-hour cache. Only requests without includeExperience, includeEducation and includeSkills are served from cache; those flags always fetch fresh, and that fetch refreshes the cached profile too.
cachedAtstring (date-time)When the cached profile was fetched (only if cached=true). It can be a request that sent includeExperience; the cached copy holds the profile without that detail.
expiresAtstring (date-time)When the cache expires
messagestringStatus message

200 Example

{
  "success": true,
  "profileId": "anandi-devi",
  "accountId": "696ce9e780e0483585e4e553",
  "profile": {
    "firstName": "Anandi",
    "lastName": "Devi",
    "headline": "Go-To-Market (GTM) Engineer @ ConnectSafely | MBA",
    "location": {
      "countryCode": "in",
      "postalCode": null,
      "geoLocationName": null
    },
    "entityUrn": "urn:li:fsd_profile:ACoAAFpqSoMB8vTqRbg4mN_wbabO8w0gjgFu-6o",
    "publicIdentifier": "anandi-devi",
    "profilePicture": "https://media.licdn.com/dms/image/v2/D5603AQF2Iu7GGz-H2A/profile-displayphoto-shrink_100_100/...",
    "isPremium": true,
    "isVerified": true,
    "supportsFreeEmail": true,
    "connectionCount": 958,
    "followerCount": 1243,
    "isConnected": true,
    "relationshipStatus": "CONNECTED",
    "connectionDegree": "1st",
    "invitationSent": false,
    "invitationReceived": false,
    "geoLocation": {
      "city": "Delhi",
      "state": null,
      "country": "India",
      "fullLocation": "Delhi, India",
      "birthDate": null
    }
  },
  "message": "Profile information retrieved successfully"
}

400 Response Parameters

NameTypeDescription
successboolean
errorobject

400 Example

{
  "success": false,
  "error": {
    "issues": [
      {
        "code": "invalid_type",
        "expected": "string",
        "received": "undefined",
        "path": [
          "profileId"
        ],
        "message": "Required"
      }
    ],
    "name": "ZodError"
  }
}

401 Response Parameters

NameTypeDescription
errorstring

401 Example

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

429 Response Parameters

NameTypeDescription
errorstring
successboolean

429 Example

{
  "error": "Rate limit exceeded for PROFILE: 120/120 used. Resets at 2024-01-16T00:00:00.000Z",
  "success": false
}

On this page