GET api/cities/names?startsWith={startsWith}

This method will return all the cities, and states based on what the city name starts with.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
startsWith

The letters a city name starts with

string

Required

Body Parameters

None.

Response Information

Resource Description

a list of cities, states i.e (Des Moines, Iowa) starting with the same letters as cityName

Collection of Geo
NameDescriptionTypeAdditional information
Id

globally unique identifier

None.

Zip

integer

None.

State

string

None.

City

string

None.

Longitude

decimal number

None.

Latitude

decimal number

None.

Response Formats

application/json, text/json

Sample:
[
  {
    "Id": "919f567f-3371-480b-a990-cfc6d85cfd01",
    "Zip": 2,
    "State": "sample string 3",
    "City": "sample string 4",
    "Longitude": 5.1,
    "Latitude": 6.1
  },
  {
    "Id": "919f567f-3371-480b-a990-cfc6d85cfd01",
    "Zip": 2,
    "State": "sample string 3",
    "City": "sample string 4",
    "Longitude": 5.1,
    "Latitude": 6.1
  }
]

application/xml, text/xml

Sample:
<ArrayOfGeo xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/GeoAPI.Models">
  <Geo>
    <City>sample string 4</City>
    <Id>919f567f-3371-480b-a990-cfc6d85cfd01</Id>
    <Latitude>6.1</Latitude>
    <Longitude>5.1</Longitude>
    <State>sample string 3</State>
    <Zip>2</Zip>
  </Geo>
  <Geo>
    <City>sample string 4</City>
    <Id>919f567f-3371-480b-a990-cfc6d85cfd01</Id>
    <Latitude>6.1</Latitude>
    <Longitude>5.1</Longitude>
    <State>sample string 3</State>
    <Zip>2</Zip>
  </Geo>
</ArrayOfGeo>