Search service categories
Search LinkedIn service-category ids by name, for `POST /search/people` `filters.serviceCategories`. 1. `POST /search/service-categories` with `{ "keywords": "Fina" }` returns `{ "serviceCategoryId": "826", "name": "Financial Analysis" }`. 2. `POST /search/people` with `{ "filters": { "serviceCategories": ["826"] } }`. The ids are opaque and not guessable (Financial Analysis is `826`, Accounting is `71`), and LinkedIn answers an unrecognised id with 200 and zero results rather than an error — so without this lookup a wrong id is indistinguishable from "nobody matched". Returns up to 10 matches in LinkedIn's ranking order. Rate Limit: 300 searches per account per month (resets on the 1st of each month).
/search/service-categoriesCode Examples
curl -X POST 'https://api.connectsafely.ai/linkedin/search/service-categories' \ -H 'Authorization: Bearer <your_api_key>' \ -H 'Content-Type: application/json' \ -d '{"keywords":"software engineer"}'Search LinkedIn service-category ids by name, for POST /search/people filters.serviceCategories.
POST /search/service-categorieswith{ "keywords": "Fina" }returns{ "serviceCategoryId": "826", "name": "Financial Analysis" }.POST /search/peoplewith{ "filters": { "serviceCategories": ["826"] } }.
The ids are opaque and not guessable (Financial Analysis is 826, Accounting is 71), and LinkedIn answers an unrecognised id with 200 and zero results rather than an error — so without this lookup a wrong id is indistinguishable from "nobody matched". Returns up to 10 matches in LinkedIn's ranking order.
Rate Limit: 300 searches per account per month (resets on the 1st of each month).
Parameters
No parameters.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
accountId | string | No | LinkedIn account ID to use for the search. If not provided, uses the default account. |
keywords | string | Yes | Service category name to search for (e.g., "Fina", "Marketing", "Accounting") |
Example
{
"keywords": "software engineer"
}Responses
| Status | Description |
|---|---|
| 200 | Service categories retrieved successfully |
| 400 | Bad Request - Missing required keywords parameter |
| 401 | Unauthorized |
| 500 | Failed to search service categories |
200 Response Parameters
| Name | Type | Description |
|---|---|---|
success | boolean | |
serviceCategories | array | |
count | number | Number of categories returned |
200 Example
{
"success": true,
"serviceCategories": [
{
"name": "Financial Analysis",
"serviceCategoryId": "826"
},
{
"name": "Financial Reporting",
"serviceCategoryId": "219"
}
],
"count": 2
}400 Response Parameters
| Name | Type | Description |
|---|---|---|
success | boolean | |
error | object |
400 Example
{
"success": false,
"error": {
"issues": [
{
"code": "invalid_type",
"expected": "string",
"received": "undefined",
"path": [
"keywords"
],
"message": "Required"
}
],
"name": "ZodError"
}
}