REST API: Cities/Nearby

This lookup endpoint is used to return cities near an argument city. GET the set with a state and city query string filter to receive a set of cities near the arg city/state. GET with a minpop filter to receive only cities that exceed the minimum population. As minpop increases, the search becomes slower. Use with caution. Api key required.

Resource URI

only the set is used

Resource Properties

Parameter

Format

Description

Allows Null

code string city name  no 
decsription  string city name no 
       
       
       
       
       
       

Error Responses


REST API: Cities/Nearby Set

 GET the set with a state  and city query string filter to receive a set of cities near the arg city/state.  GET with a minpop filter to receive only cities that exceed the minimum population.  As minpop increases, the search becomes slower.  Use with caution. Api key required.

Resource URI

Cities/Nearby/?state=MD&city=rockville&minpop=75000&api_key=xxxx

Set Filters

ParameterFormatDescriptionAllows Null
state  string  the state for the argument city No 
city  string  the city you want cities nearby No.
minpop  number  the minimum population for the nearby cities Yes.

HTTP GET

GET the set with a state and city query string filter to receive a set of cities near the arg city. GET with a minpop filter to receive only cities exceeding that population. Api key required.

JSON Request:

Request Body is empty

JSON Response:

[
{
"code": "MD",
"description": "columbia"
},
{
"code": "MD",
"description": "silver spring"
},
{
"code": "DC",
"description": "washington"
},
{
"code": "VA",
"description": "arlington"
},
{
"code": "VA",
"description": "alexandria"
}
]

XML Request:

Request Body is empty

XML Response: