Find Geocode by Location
GET /find-geocode-by-location
Find LinkedIn geocode IDs by location name. Use this to get geo codes for search filters.
Pricing
1 credit per call.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
location | string | Yes | Location name to search (e.g., San Francisco, United States, California) |
Example Request
- cURL
- Python
- Node.js
curl --request GET \
--url 'https://api.infoplug.io/find-geocode-by-location?location=San%20Francisco' \
--header 'X-INFOPLUG-API-KEY: YOUR_API_KEY'
import requests
url = "https://api.infoplug.io/find-geocode-by-location"
params = {
"location": "San Francisco"
}
headers = {
"X-INFOPLUG-API-KEY": "YOUR_API_KEY"
}
response = requests.get(url, headers=headers, params=params)
print(response.json())
const response = await fetch(
'https://api.infoplug.io/find-geocode-by-location?location=San%20Francisco',
{
headers: {
'X-INFOPLUG-API-KEY': 'YOUR_API_KEY'
}
}
);
const data = await response.json();
console.log(data);
Example Response
- 200 OK
- 400 Bad Request
- 401 Unauthorized
- 500 Timeout
{
"data": {
"message": "ok",
"data": [
{
"geo_id": "102277331",
"name": "San Francisco, California, United States",
"type": "CITY"
},
{
"geo_id": "90000084",
"name": "San Francisco Bay Area",
"type": "METRO_AREA"
},
{
"geo_id": "102095887",
"name": "California, United States",
"type": "ADMIN_DIVISION"
}
]
}
}
{
"message": "invalid_parameter",
"parameter": "location",
"details": "Location is required"
}
{
"message": "unauthorized",
"details": "Invalid or missing API key"
}
{
"message": "error",
"error": "Request timed out waiting for geocode results"
}
Usage
Use the geo_id values from this endpoint in search filters:
- Search Leads -
geo_codesparameter - Search Companies -
headquarters_locationparameter - Search Jobs -
geo_codeparameter
Related
- Supported Locations - Get list of all supported countries
- How to Geocode - Tutorial on using geocodes