Autocomplete

Example Request URL

curl -s \
"https://api.nettoolkit.com/v1/geo/names?text=duan&latitude=37.399848&longitude=-121.898101&distance=5&key=$your_key_here"

Resource Information

Response format
JSON
Authentication
Yes (Requires Key)

Parameters

key
The API Key, which is needed to make requests to Geocode services.
text
The text to search.
latitude
The latitude of the center point that the user wants to do the autocompletion.
longitude
The longitude of the center that the user wants to do the autocompletion.
distance
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 is default to 5. The maximum value for it is 10, resulting in a 400 square mile search area. Larger values likely mean slower response times.
postal_code
When postal code is present in the request, the search area will be the area that the postal code covers.
result_size
The size limit of the result, useful for reducing latency.

Return values

code
Response code
results
A JSON array of JSON objects containing the following fields (sorted by increasing distance):
- name
The name of the place.
- latitude
The latitude of the business location.
- longitude
The longitude of the business location.
- address
The street address of the business.

Sample JSON output

curl -s \
"https://api.nettoolkit.com/v1/geo/names?text=duan&latitude=37.399848&longitude=-121.898101&distance=5&key=$your_key_here"
{
    "code": 1000,
    "results": [
      {
        "name": "Duane Avenue",
        "latitude": 37.3792724609375,
        "longitude": -121.95532989501953,
        "address": "Duane Avenue, Santa Clara, Santa Clara County, CA, CA 95054, United States of America"
      },
      {
        "name": "Duarte Court",
        "latitude": 37.45305252075195,
        "longitude": -121.90550231933594,
        "address": "Duarte Court, Milpitas, Santa Clara County, CA, 95036, United States of America"
      },
      {
        "name": "Duarte",
        "latitude": 37.3797721862793,
        "longitude": -121.9754638671875,
        "address": "Duarte, Scott Boulevard, Santa Clara, Santa Clara County, CA, CA 95054, United States of America"
      }
    ]
  }