Posted on February 7, 2024

Enhance your search with the new proximity-based Autocomplete API

We are excited to announce a significant enhancement to the Township America API: the addition of the proximity-based suggestion capability in our Autocomplete API. This new feature is set to improve how you search for legal land descriptions, offering results tailored to a specific geographic area.

Proximity parameter: bringing precision to your searches

The newly introduced 'proximity' parameter allows you to bias search results towards a specific location. This means that when you search for a legal land description, the Autocomplete API will prioritize results closest to the coordinates you provide, enhancing the relevance and efficiency of your searches.

How to leverage the new parameter

Incorporating this new feature is straightforward. Here’s an example using cURL to demonstrate how you can use the proximity parameter:

curl -X GET 'https://developer.townshipamerica.com/autocomplete/legal-location?location=12N+4E&proximity=-96.905923,35.499409' \
-H 'x-api-key: 1234567890abcdefghij'

Response with proximity parameter

{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "geometry": {
        "type": "Point",
        "coordinates": [-96.876785843, 35.506865327]
      },
      "properties": {
        "unit": "Township",
        "shape": "centroid",
        "state": "Oklahoma",
        "county": "Lincoln County",
        "search_term": "12N 4E",
        "survey_system": "PLSS",
        "legal_location": "12N 4E Indian Meridian",
        "alternate_legal_location": "12N 4E Lincoln County Oklahoma"
      }
    },
    {
      "type": "Feature",
      "geometry": {
        "type": "Point",
        "coordinates": [-96.967714495, 41.002683048]
      },
      "properties": {
        "unit": "Township",
        "shape": "centroid",
        "state": "Nebraska",
        "county": "Seward County",
        "search_term": "12N 4E",
        "survey_system": "PLSS",
        "legal_location": "12N 4E 6th Meridian",
        "alternate_legal_location": "12N 4E Seward County Nebraska"
      }
    },
    {
      "type": "Feature",
      "geometry": {
        "type": "Point",
        "coordinates": [-92.056654572, 32.014432043]
      },
      "properties": {
        "unit": "Township",
        "shape": "centroid",
        "state": "Louisiana",
        "county": "Caldwell Parish",
        "search_term": "12N 4E",
        "survey_system": "PLSS",
        "legal_location": "12N 4E Louisiana Meridian",
        "alternate_legal_location": "12N 4E Caldwell Parish Louisiana"
      }
    }
  ]
}

To illustrate the effectiveness of the proximity parameter, let's compare it with the response without using this parameter:

Response without proximity parameter

{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "geometry": {
        "type": "Point",
        "coordinates": [-86.082265822, 39.476765393]
      },
      "properties": {
        "unit": "Township",
        "shape": "centroid",
        "state": "Indiana",
        "county": "Johnson County",
        "search_term": "12N 4E",
        "survey_system": "PLSS",
        "legal_location": "12N 4E 2nd Meridian",
        "alternate_legal_location": "12N 4E Johnson County Indiana"
      }
    },
    {
      "type": "Feature",
      "geometry": {
        "type": "Point",
        "coordinates": [-88.752399942, 39.478059131]
      },
      "properties": {
        "unit": "Township",
        "shape": "centroid",
        "state": "Illinois",
        "county": "Shelby County",
        "search_term": "12N 4E",
        "survey_system": "PLSS",
        "legal_location": "12N 4E 3rd Meridian",
        "alternate_legal_location": "12N 4E Shelby County Illinois"
      }
    },
    {
      "type": "Feature",
      "geometry": {
        "type": "Point",
        "coordinates": [-90.041658962, 41.018403572]
      },
      "properties": {
        "unit": "Township",
        "shape": "centroid",
        "state": "Illinois",
        "county": "Knox County",
        "search_term": "12N 4E",
        "survey_system": "PLSS",
        "legal_location": "12N 4E 4th Meridian",
        "alternate_legal_location": "12N 4E Knox County Illinois"
      }
    }
  ]
}

Visualizing the difference

To further help your understanding, we've included a visual comparison: maps showing the response with and without the proximity parameter. These maps demonstrate the clear difference in search results, highlighting how the proximity parameter refines and localizes the search outcomes.

Map showing search results with the proximity parameter

Map showing search results with the proximity parameter

Map showing search results without the proximity parameter

Map showing search results without the proximity parameter

Get started

Visit our developer documentation for detailed information on pricing, API keys, and to access our quick-start guides. These guides provide you with step-by-step instructions on how to set up API keys and begin using our APIs effectively.

We can’t wait to see how you leverage this new feature in your applications. Happy coding!

Please note that the API key used in the example is for demonstration purposes only. Ensure you use your own API key in your requests.