Facebook Pixel
APILinkedIn Search

Search LinkedIn people (V2 - RSC endpoint with auto-pagination)

Search for LinkedIn members using the RSC endpoint with enhanced filtering options and automatic pagination. Supports additional filters like connectionOf, followerOf, and schoolIds. Automatically handles LinkedIn page-based pagination internally - specify the total count you want and the API will fetch multiple pages as needed (max 10 pages, ~10 results per page). Better for finding people connected to specific profiles or following specific accounts. Rate Limit: 300 searches per account per month (resets on the 1st of each month). Maximum 1000 results per search.

POST/search/people/v2
Authentication requiredSearch

Code Examples

curl -X POST 'https://api.connectsafely.ai/linkedin/search/people/v2' \
-H 'Authorization: Bearer <your_api_key>' \
-H 'Content-Type: application/json' \
-d '{"accountId":"acc_12345","keywords":"","count":25,"start":0,"filters":{"connectionDegree":["example_value"],"geoUrn":["urn:li:example:123456"],"firstName":"example_value","lastName":"example_value","title":"Senior Developer","company":"Acme Inc","school":"example_value","currentCompanyIds":["Acme Inc"],"pastCompanyIds":["Acme Inc"],"industry":["Technology"],"schoolIds":["12345"],"profileLanguage":["example_value"],"serviceCategories":["example_value"],"openToVolunteer":false,"connectionOf":["example_value"],"followerOf":["example_value"]}}'

Parameters

No parameters.

Request Body

FieldTypeRequiredDescription
accountIdstringNoLinkedIn account ID to use. If not provided, uses the default account.
keywordsstringNoSearch keywords for name, title, company, or skills
countnumberNoTotal number of results to return. API will automatically paginate through LinkedIn pages (each page ~10 results) to collect this many.
startnumberNoStarting offset (0-indexed). Used to calculate which page to start from.
filtersobjectNoOptional filters to narrow down search results

Example

{
  "accountId": "acc_12345",
  "keywords": "",
  "count": 25,
  "start": 0,
  "filters": {
    "connectionDegree": [
      "example_value"
    ],
    "geoUrn": [
      "urn:li:example:123456"
    ],
    "firstName": "example_value",
    "lastName": "example_value",
    "title": "Senior Developer",
    "company": "Acme Inc",
    "school": "example_value",
    "currentCompanyIds": [
      "Acme Inc"
    ],
    "pastCompanyIds": [
      "Acme Inc"
    ],
    "industry": [
      "Technology"
    ],
    "schoolIds": [
      "12345"
    ],
    "profileLanguage": [
      "example_value"
    ],
    "serviceCategories": [
      "example_value"
    ],
    "openToVolunteer": false,
    "connectionOf": [
      "example_value"
    ],
    "followerOf": [
      "example_value"
    ]
  }
}

Responses

StatusDescription
200People retrieved successfully
400Bad Request - Invalid request parameters
401Unauthorized - Invalid or missing API key
500Internal Server Error - Failed to get LinkedIn credentials or search failed

200 Response Parameters

NameTypeDescription
successboolean
peoplearray
countnumberNumber of people returned in this response
totalCountnumberTotal number of matching results available on LinkedIn (may be 0 if unknown)

200 Example

{
  "success": true,
  "people": [
    {
      "profileId": "shaarifalam",
      "profileUrn": "urn:li:fsd_profile:ACoAACVNMaoBXNhxhJNadDzmfn6cX1bbEa8DFZI",
      "firstName": "Shaarif",
      "lastName": "Alam",
      "headline": "Google Certified UI UX Designer",
      "profilePicture": "https://media.licdn.com/dms/image/.../profile-displayphoto",
      "location": "Delhi, India",
      "connectionDegree": "2nd",
      "profileUrl": "https://www.linkedin.com/in/shaarifalam/",
      "isPremium": false,
      "isOpenToWork": false
    }
  ],
  "count": 3,
  "totalCount": 0
}

400 Response Parameters

NameTypeDescription
successboolean
errorobject

400 Example

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

401 Response Parameters

NameTypeDescription
errorstring

401 Example

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

500 Response Parameters

NameTypeDescription
errorstring

500 Example

{
  "error": "Failed to search people",
  "success": false
}