- Previous: TruliaStats.getCityStats
- Up: TruliaStats Library
- Next: TruliaStats.getNeighborhoodStats
TruliaStats.getCountyStats
Description
Retrieves all statistics for a county within the given date range. General information about Trulia stats can be found at the TruliaStats library page.
Function Parameters
| Parameter | Description | Required | Format |
|---|---|---|---|
| apikey | Your TruliaAPI key | Yes | |
| county | The county for which you wish to receive statistics. | Yes | |
| state | The state which contains the above county | Yes | 2-letter postal code |
| startDate | The first date for which you wish to receive statistics. | Yes | YYYY-MM-DD |
| endDate | The last date for which you wish to receive statistics. | Yes | YYYY-MM-DD |
| statType | The type of statistic you wish to receive. | No (Defaults to "all") | Valid types: {"all", "traffic", "listings"} |
Sample Call
http://api.trulia.com/webservices.php?library=TruliaStats&function=getCountyStats
&county=Santa Clara&state=CA&startDate=2009-02-06&endDate=2009-02-07&apikey=abc123
Sample Return
<TruliaWebServices>
<request>
<Parameter>
<index>1</index>
<name>library</name>
<value>TruliaStats</value>
</Parameter>
<Parameter>
<index>2</index>
<name>function</name>
<value>getCountyStats</value>
</Parameter>
<Parameter>
<index>3</index>
<name>county</name>
<value>New York</value>
</Parameter>
<Parameter>
<index>4</index>
<name>state</name>
<value>NY</value>
</Parameter>
<Parameter>
<index>5</index>
<name>startDate</name>
<value>2007-02-06</value>
</Parameter>
<Parameter>
<index>6</index>
<name>endDate</name>
<value>2007-02-07</value>
</Parameter>
<Parameter>
<index>7</index>
<name>apikey</name>
<value>abc123</value>
</Parameter>
</request>
<response>
<TruliaStats>
<location>
<county>New York</county>
<state>NY</state>
<resultsURL>http://www.trulia.com/advanced_results/?state=CA
&a_county=Santa+Clara&advanced=1
&searchButton_top=SEARCH&qtype=county
</resultsURL>
<heatMapURL>
http://www.trulia.com/home_prices/California/Santa_Clara_County-heat_map/
</heatMapURL>
</location>
<trafficStats>
<trafficStat>
<date>2007-02-06</date>
<percentStateTraffic>11.56172407207</percentStateTraffic>
<percentNationalTraffic>0.86764579411568</percentNationalTraffic>
</trafficStat>
<trafficStat>
<date>2007-02-07</date>
<percentStateTraffic>12.330054507863</percentStateTraffic>
<percentNationalTraffic>0.93573479906427</percentNationalTraffic>
</trafficStat>
</trafficStats>
<listingStats>
<listingsStat>
<weekEndingDate>2007-02-10</weekEndingDate>
<avgListingValue>
<subcategory>
<type>All Properties</type>
<averageListingPrice>1707962</averageListingPrice>
<numberOfProperties>2921</numberOfProperties>
</subcategory>
<subcategory>
<type>1 Bedroom Properties</type>
<averageListingPrice>730219</averageListingPrice>
<numberOfProperties>1095</numberOfProperties>
</subcategory>
<subcategory>
<type>2 Bedroom Properties</type>
<averageListingPrice>1453855</averageListingPrice>
<numberOfProperties>807</numberOfProperties>
</subcategory>
...
</avgListingValue>
</listingsStat>
</listingStats>
</TruliaStats>
</response>
</TruliaWebServices> - Previous: TruliaStats.getCityStats
- Up: TruliaStats Library
- Next: TruliaStats.getNeighborhoodStats

Comments
Please sign in to post a comment.