Intro

Geo Autocomplete allows websites to show possibilities that might complete user input. For example, "3350 Scot" might suggest "3350 Scott Bl, Santa Clara, CA" as a possible address. For a complete example of how to use this functionality, see the autocomplete tutorial.

Location type

{
    "name": "Duane Avenue",
    "address": "Duane Avenue, Santa Clara, Santa Clara County, CA, CA 95054, United States of America"
}

Attributes

addressstring
The street address of the business. If you would like to get the latitude and longitude of the street address, please issue a separate geocoding request. The latitude and longitude are not included since certain addresses may have conflicting coordinates from different providers.
namestring

The name of the place.

Autocomplete

GET/geo/names

Parameters

textstring(required)

The text to search.

distancestring(optional)

The square radius (in miles) of the search area (the distance is the length between the center and an edge of the square). This parameter is optional and defaults to 5. The maximum value for it is 10, resulting in a 400 square mile search area. Larger values likely mean slower response times.

latitudestring(optional)

The latitude of the center point that the user wants to do the autocompletion.

longitudestring(optional)

The longitude of the center that the user wants to do the autocompletion.

postal_codestring(optional)

When postal code is present in the request, the search area will be the area that the postal code covers.

restrictionstring(optional) 

Setting this value to 1 will exclude business names from the results. Possible values for this are likely to change in the future.

result_sizestring(optional)

The size limit of the result, useful for reducing latency.

Example

Request

curl "https://api.nettoolkit.com/v1/geo/names?text=duan&latitude=37.399848&longitude=-121.898101&distance=5" \
-H "X-NTK-KEY: $YOUR_KEY_HERE"

Response

{
    "code": 1000,
    "results": [
        {
            "name": "Duane Avenue",
            "address": "Duane Avenue, Santa Clara, Santa Clara County, CA, CA 95054, United States of America"
        },
        {
            "name": "Duarte Court",
            "address": "Duarte Court, Milpitas, Santa Clara County, CA, 95036, United States of America"
        },
        {
            "name": "Duarte",
            "address": "Duarte, Scott Boulevard, Santa Clara, Santa Clara County, CA, CA 95054, United States of America"
        }
    ]
}