Facebook Pixel
APILinkedIn Search

Search LinkedIn companies

Search for companies on LinkedIn by keywords and filters. Filter by headquarters location, industry, company size, and type. Useful for lead generation, market research, and finding potential business partners. Sales Navigator Support: Pass a Sales Navigator company search URL in the `url` parameter to search using Sales Navigator filters (revenue, employees, etc.). Requires Sales Navigator license on the LinkedIn account. Rate Limit: 300 searches per account per month (resets on the 1st of each month).

POST/search/companies
Authentication requiredSearch

Code Examples

curl -X POST 'https://api.connectsafely.ai/linkedin/search/companies' \
-H 'Authorization: Bearer <your_api_key>' \
-H 'Content-Type: application/json' \
-d '{"accountId":"acc_12345","keywords":"","url":"https://linkedin.com/in/example","count":25,"start":0,"filters":{"locationId":null,"industry":["Technology"],"companySize":["Acme Inc"],"companyType":["Acme Inc"],"followedCompanies":false}}'

Parameters

No parameters.

Request Body

FieldTypeRequiredDescription
accountIdstringNoLinkedIn account ID to use for the search. If not provided, uses the default account.
keywordsstringNoSearch keywords for company name or description (used for regular LinkedIn search)
urlstringNoSales Navigator company search URL (e.g., https://www.linkedin.com/sales/search/company?query=...). Requires Sales Navigator license. When provided, uses Sales Navigator API with advanced filters like revenue and employee count.
countnumberNoNumber of results to return per page
startnumberNoPagination offset (0-indexed)
filtersobjectNoOptional filters to narrow down search results

Example

{
  "accountId": "acc_12345",
  "keywords": "",
  "url": "https://linkedin.com/in/example",
  "count": 25,
  "start": 0,
  "filters": {
    "locationId": null,
    "industry": [
      "Technology"
    ],
    "companySize": [
      "Acme Inc"
    ],
    "companyType": [
      "Acme Inc"
    ],
    "followedCompanies": false
  }
}

Responses

StatusDescription
200Companies 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
companiesarray
paginationany
hasMorebooleanWhether more results are available

200 Example

{
  "success": true,
  "companies": [
    {
      "companyId": "1441",
      "name": "Google",
      "universalName": "google",
      "headline": "Software Development • Mountain View, CA",
      "description": "A problem isn't truly solved until it's solved for all.",
      "logoUrl": "https://media.licdn.com/dms/image/.../google_logo",
      "industry": "Software Development",
      "followerCount": 41000000,
      "companyUrl": "https://www.linkedin.com/company/google/",
      "location": "Mountain View, CA"
    },
    {
      "companyId": "1594050",
      "name": "Google DeepMind",
      "universalName": "googledeepmind",
      "headline": "Research Services • London, London",
      "description": "We're committed to solving intelligence.",
      "logoUrl": "https://media.licdn.com/dms/image/.../googledeepmind_logo",
      "industry": "Research Services",
      "followerCount": 1000000,
      "companyUrl": "https://www.linkedin.com/company/googledeepmind/",
      "location": "London, London"
    }
  ],
  "pagination": {
    "count": 25,
    "start": 0,
    "total": 1000
  },
  "hasMore": true
}

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 companies",
  "success": false
}