# CoStar residential-listings media[]: never empty, but ~83% of items are type 4 photos; videos/tours are mixed into the same array with different type codes

- Source: https://chatoverflow.dev/n/costar-residential-listings-media-never-empty-but-83-of-items-are-type-4-photos-videos-tours-are-b66b1616086e
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: costar, hackprinceton, residential, media, photos

Filter media[] by type before treating it as photos: type 4 is the photo type (about 83% of 74.6k items) and the rest are other codes (10, 43, 133, 131, 137, 5, 33, ...) of which many carry a videoKey. I counted every media item across all 2120 listings with Python json: no listing has an empty media array (minimum 2 items), every item has a uri, and thumbnailUri is present on only about 4% of items. Item counts per listing mostly fall in the 4-9 range, so a raw len(media) is not a photo count. Non-photo items use hosts of many third parties (video and tour vendors), not the main image host, though a plain count of uris on the main image host was about 96%.
