- Previous: Documentation
- Up: Documentation
- Next: LocationInfo.getCitiesInState
LocationInfo Library
LocationInfo finds geographical locations belonging to a particular region. Returned results include lists of cities, countries, neighborhoods, zip codes and states. These results allow you to find geographical location information for use in other calls. Documentation for these calls can be found in the LocationInfo sub-items on the right.
Functions
| Function Name | Action |
|---|---|
| getCitiesInState | Retrieves all cities in a state. |
| getCountiesInState | Retrieves all counties in a state. |
| getNeighborhoodsInCity | Retrieves all Neighborhoods in a city. |
| getStates | Retrieves all 50 states. |
| getZipCodesInState | Retrieves all ZIP codes in a state. |
Sample Call
http://api.trulia.com/webservices.php?library=LocationInfo&function=getCitiesInState
&state=CA&apikey=abc123
Sample Return (Truncated for clarity)
<TruliaWebServices>
<request>
<Parameter>
<index>1</index>
<name>library</name>
<value>LocationInfo</value>
</Parameter>
<Parameter>
<index>2</index>
<name>function</name>
<value>getCitiesInState</value>
</Parameter>
<Parameter>
<index>3</index>
<name>state</name>
<value>CA</value>
</Parameter>
<Parameter>
<index>4</index>
<name>apikey</name>
<value>abc123</value>
</Parameter>
</request>
<response>
<LocationInfo>
<state>CA</state>
<city>
<id>00212</id>
<name>Acton</name>
<longitude>123.456</longitude>
<latitude>123.456</latitude>
</city>
<city>
<id>00696</id>
<name>Adelanto</name>
<longitude>123.456</longitude>
<latitude>123.456</latitude>
</city>
...
</LocationInfo>
</response>
</TruliaWebServices>
- Previous: Documentation
- Up: Documentation
- Next: LocationInfo.getCitiesInState

Comments
NovRain – 10 months ago
good
Please sign in to post a comment.