GET api/states/{state}/cities/{city}

This call will retrieve a given city in given state if it exists

Request Information

URI Parameters

NameDescriptionTypeAdditional information
state

the state name, for example IA for Iowa

string

Required

city

the city name, in full like Chicago or Des Moines

string

Required

Body Parameters

None.

Response Information

Resource Description

the information about the city you're looking for within a certain state

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": "3a2efe93-54ce-4f2d-8ba4-088b160f5968",
  "Zip": 2,
  "State": "sample string 3",
  "City": "sample string 4",
  "Longitude": 5.1,
  "Latitude": 6.1
}

application/xml, text/xml

Sample:
<Geo xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/GeoAPI.Models">
  <City>sample string 4</City>
  <Id>3a2efe93-54ce-4f2d-8ba4-088b160f5968</Id>
  <Latitude>6.1</Latitude>
  <Longitude>5.1</Longitude>
  <State>sample string 3</State>
  <Zip>2</Zip>
</Geo>