Reference Data
Companies
v1

Get Geo Suggestions

Changed on

Resolves a typed city name or postal code into geographic coordinates. The returned latitude / longitude can be used to populate the value.lat / value.lon of the Geo Filter (field: geo, operator: within). Results can be scoped to one or more countries via country_codes, and search_fields limits which address fields the text may match; when omitted, both cities and postal codes are searched.

Credit Note: This endpoint does not consume credits.

:::info Requires the companies:read OAuth2 scope. :::

get/v1/geo-suggestions

Request

  • Base URL
    https://api.leadfeeder.com
  • URL
    https://api.leadfeeder.com/v1/geo-suggestions
  • Auth
    • API key in header X-Api-Key
    • or OAuth 2
      Authorization code: https://api.leadfeeder.com/v1/oauth/authorize
      Token URL: https://api.leadfeeder.com/v1/oauth/token scopes: companies:read

Query parameters

account_idstring required

The Leadfeeder Account ID. The Account ID can be retrieved using the List Accounts endpoint.

searchstring required

Text to match against city names and postal codes. See search_fields to restrict which fields are matched.

search_fieldsstring[]

Address fields the search text may match, as a comma-separated list: postal_code, city, or both. When omitted, both cities and postal codes are searched.

country_codesstring

Comma-separated list of ISO-3166-1 alpha-2 country codes (e.g. DE,AT) to restrict suggestions to.

page[size]integer

Maximum number of suggestions to return. Values outside the 1–50 range are clamped to the nearest bound.

Response

Matching location suggestions

Example response

{
  "data": [
    {
      "attributes": {
        "city": "London",
        "country_code": "GB",
        "latitude": 51.51,
        "longitude": -0.13,
        "postal_code": "60311"
      },
      "id": "9b3f0a1c-2b7e-4e6f-9c1b-7f1a2c3d4e5f",
      "type": "geo_suggestion"
    }
  ],
  "meta": {
    "request_id": "cf054205-dd8c-4473-8689-07c30fe0789f"
  }
}

Changes

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status