Facebook Pixel
APILinkedIn Search

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).

POST/search/geo
Authentication requiredSearch

Code 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

FieldTypeRequiredDescription
accountIdstringNoLinkedIn account ID to use for the search. If not provided, uses the default account.
keywordsstringYesLocation name to search for (e.g., "San Francisco", "United States", "London")
countryCodesarrayNoLimit results to specific countries using ISO country codes (e.g., ["US", "GB"])

Example

{
  "keywords": "software engineer"
}

Responses

StatusDescription
200Geo locations retrieved successfully
400Bad Request - Missing required keywords parameter
401Unauthorized - Invalid or missing API key
500Internal Server Error - Failed to get LinkedIn credentials or search failed

200 Response Parameters

NameTypeDescription
successboolean
locationsarray
countnumberNumber 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

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