LinkedIn location id lookup API
LinkedIn’s own location typeahead: places matching a name, with the geo id the job search takes.
GET /v1/linkedin/search/locationsBeta1 credit per callRefunded on failureimport os, requests
res = requests.get(
"https://api.groundsocial.dev/v1/linkedin/search/locations?query=london",
headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
data = res.json()Response
200 · 1 credit{ "data": [ { "id": "90009496", "type": "GEO", "displayName": "London Area, United Kingdom", "trackingId": "IrO5yWYTRuewKTzSkrJhWg==" }, { "id": "90009538", "type": "GEO", "displayName": "London, Canada Metropolitan Area", "trackingId": "TZx9+actRXCVQRShhtW1ZA==" }, "… 8 more" ]}Parameters
| Name | Type | Description |
|---|---|---|
queryquery · required | string | A place name. Example: london. |
Response fields
200 with a LinkedInTypeaheadPage, in LinkedIn’s own schema.org JSON-LD, with the rest of the public page beside it.
| Field | Type | Description |
|---|---|---|
data | LinkedInTypeaheadHit[] |
Status codes
| Status | Meaning |
|---|---|
200 | Matching places. |
400 | Invalid input. Nothing was charged. |
401 | Missing or invalid API key. |
402 | Not enough credits, a spend cap was reached, or payment is required. |
403 | The target is private, or the account is suspended. |
404 | LinkedIn has no such public page, or it was removed. |
429 | Too many requests. Wait for Retry-After seconds. |
503 | LinkedIn is temporarily unavailable. Retryable; nothing was charged. |
Every error has code, message, hint and retryable. All error codes
Questions
How many results?
Up to 10.
LinkedIn is a trademark of LinkedIn Corporation. We are not affiliated with or endorsed by LinkedIn.