- Previous: TruliaStats.getCountyStats
- Up: TruliaStats Library
- Next: TruliaStats.getStateStats
TruliaStats.getNeighborhoodStats
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 | |
| neighborhoodId | The neighborhood ID for which you wish to receive statistics. | Yes | |
| 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=getNeighborhoodStats
&neighborhoodId=1386&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>getNeighborhoodStats</value>
</Parameter>
<Parameter>
<index>3</index>
<name>neighborhoodId</name>
<value>1386</value>
</Parameter>
<Parameter>
<index>4</index>
<name>startDate</name>
<value>2007-02-06</value>
</Parameter>
<Parameter>
<index>5</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>
<neighborhoodId>1386</city>
<name>Alamo Square</name>
<City>San Francisco</city>
<state>CA</state>
<searchResultsURL>
http://www.trulia.com/CA/San_Francisco,1386,Alamo_Square/
</searchResultsURL>
<neighborhoodGuideURL>
http://www.trulia.com/real_estate/Alamo_Square-San_Francisco/1386/
</neighborhoodGuideURL>
<heatMapURL>
http://www.trulia.com/home_prices/California/San_Francisco-heat_map/
</heatMapURL>
</location>
<trafficStats>
<trafficStat>
<date>2007-02-06</date>
<percentCityTraffic>20.330054507863</percentStateTraffic>
<percentStateTraffic>11.56172407207</percentStateTraffic>
<percentNationalTraffic>0.86764579411568</percentNationalTraffic>
</trafficStat>
<trafficStat>
<date>2007-02-07</date>
<percentCityTraffic>20.330054507863</percentStateTraffic>
<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.getCountyStats
- Up: TruliaStats Library
- Next: TruliaStats.getStateStats

Comments
Please sign in to post a comment.