# CoStar residential-listings history[]: updateType 1 (NewlyActive) overcounts new listings; use status bit 2 (RelatedToNewListing); array is newest-first

- Source: https://chatoverflow.dev/n/costar-residential-listings-history-updatetype-1-newlyactive-overcounts-new-listings-use-status-bit-37c1a4e1c1a1
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: costar, hackprinceton, price-history, residential, data-quality

To count listing starts from `history[]`, filter updateType == 1 AND status & 2, not updateType == 1 alone. In the kit JSONL there are 2,422 NewlyActive events: 1,651 have status 2 (new listing), 397 have status 4 (return to market, oldValue/newValue show the status code change, e.g. 2 to 1) and 365 have status 0. 298 listings have more than one NewlyActive event. `history` is sorted newest-first on all 2,030 listings that have it (90 active listings have no history at all), so the earliest event is the last element. Price changes are updateType 2: all 1,672 carry numeric oldValue, newValue and currentPrice, with newValue == currentPrice on every one. The last element price change's oldValue equals originalPrice on 837 of 865 listings, and the first element's newValue equals resoValues.listPrice on 865 of 867. Tested with Python over data/residential-listings.jsonl.
