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).
/profileCode 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"}'Parameters
No parameters.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
accountId | string | No | LinkedIn account ID to use. If not provided, uses the default account. |
profileId | string | Yes | LinkedIn profile public ID (e.g., "john-doe-123") |
includeGeoLocation | boolean | No | Include detailed geo location data (city, country, coordinates) |
includeContact | boolean | No | Include contact info (email, phone) if visible to viewer |
includeExperience | boolean | No | Include work experience history |
includeEducation | boolean | No | Include education history |
includeSkills | boolean | No | Include skills with endorsement counts |
forceRefresh | boolean | No | Skip 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
| Status | Description |
|---|---|
| 200 | Profile information retrieved successfully |
| 400 | Bad request - Missing or invalid profileId |
| 401 | Unauthorized - Invalid or missing API key |
| 429 | Rate limit exceeded - Maximum 120 unique profiles per day |
Rate Limit Headers
All responses include rate limit information in the headers:
| Header | Description |
|---|---|
X-RateLimit-Action | The action type being rate limited |
X-RateLimit-Limit | Maximum actions allowed per period |
X-RateLimit-Used | Actions used in current period |
X-RateLimit-Remaining | Actions remaining |
X-RateLimit-Reset | ISO 8601 timestamp when limit resets |
200 Response Parameters
| Name | Type | Description |
|---|---|---|
success | boolean | Whether the request was successful |
profileId | string | The requested profile public ID |
accountId | string | LinkedIn account ID used for the request |
profile | object | Profile data (empty object if profile not found) |
experience | array | Work experience history (only included when includeExperience=true) |
skills | array | Skills with endorsement counts (only included when includeSkills=true) |
education | array | Education history (only included when includeEducation=true) |
cached | boolean | Whether the response was served from cache |
cachedAt | string (date-time) | When the profile was cached (only if cached=true) |
expiresAt | string (date-time) | When the cache expires |
message | string | Status 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,
"connectionDegree": "DISTANCE_1",
"invitationSent": false,
"invitationReceived": false,
"geoLocation": {
"city": "Delhi",
"state": null,
"country": "India",
"fullLocation": "Delhi, India",
"birthDate": null
}
},
"message": "Profile information retrieved successfully"
}400 Response Parameters
| Name | Type | Description |
|---|---|---|
success | boolean | |
error | object |
400 Example
{
"success": false,
"error": {
"issues": [
{
"code": "invalid_type",
"expected": "string",
"received": "undefined",
"path": [
"profileId"
],
"message": "Required"
}
],
"name": "ZodError"
}
}401 Response Parameters
| Name | Type | Description |
|---|---|---|
error | string |
401 Example
{
"error": "Unauthorized - Invalid credentials"
}429 Response Parameters
| Name | Type | Description |
|---|---|---|
error | string | |
success | boolean |
429 Example
{
"error": "Rate limit exceeded for PROFILE: 120/120 used. Resets at 2024-01-16T00:00:00.000Z",
"success": false
}LinkedIn Profiles API
Retrieve enriched LinkedIn profile data via API. Get work history, skills, education, and contact information for lead enrichment and CRM sync.
Endorse a skill on a LinkedIn profile
Endorse a specific skill on a LinkedIn profile, or randomly select and endorse an unendorsed skill. When random=true, the endpoint fetches all skills on the profile, filters out already-endorsed ones, and randomly endorses one.
