Search geo locations
Search for LinkedIn geo location IDs by place name. Use this endpoint to find location IDs that can be used as filters in other search endpoints (jobs, companies, people). Returns matching cities, regions, and countries. Rate Limit: 300 searches per account per month (resets on the 1st of each month).
/search/geoCode Examples
curl -X POST 'https://api.connectsafely.ai/linkedin/search/geo' \ -H 'Authorization: Bearer <your_api_key>' \ -H 'Content-Type: application/json' \ -d '{"keywords":"software engineer"}'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 | Location name to search for (e.g., "San Francisco", "United States", "London") |
countryCodes | array | No | Limit results to specific countries using ISO country codes (e.g., ["US", "GB"]) |
Example
{
"keywords": "software engineer"
}Responses
| Status | Description |
|---|---|
| 200 | Geo locations retrieved successfully |
| 400 | Bad Request - Missing required keywords parameter |
| 401 | Unauthorized - Invalid or missing API key |
| 500 | Internal Server Error - Failed to get LinkedIn credentials or search failed |
200 Response Parameters
| Name | Type | Description |
|---|---|---|
success | boolean | |
locations | array | |
count | number | Number of locations returned |
200 Example
{
"success": true,
"locations": [
{
"name": "San Francisco Bay Area",
"geoId": "90000084",
"countryCode": "US"
},
{
"name": "San Francisco, California, United States",
"geoId": "102277331",
"countryCode": "US"
}
],
"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"
}
}401 Response Parameters
| Name | Type | Description |
|---|---|---|
error | string |
401 Example
{
"error": "Unauthorized - Invalid credentials"
}500 Response Parameters
| Name | Type | Description |
|---|---|---|
error | string |
500 Example
{
"error": "Failed to search geo locations",
"success": false
}Search LinkedIn posts (V2 - RSC endpoint with auto-pagination)
Search for LinkedIn posts using the RSC endpoint with enhanced filtering options and automatic pagination. Automatically handles LinkedIn pagination internally - specify the total count you want (max 50) and the API will fetch multiple pages as needed (max 10 pages, 10 results per page). Supports filtering by date, content type, author, and more. Rate Limit: 300 searches per account per month (resets on the 1st of each month).
LinkedIn Analytics API
Access LinkedIn analytics via API including profile visitors, creator analytics, engagement metrics, and weekly performance data. Track your content strategy results.
