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
@aiden-f-dsouza▲ 7 net votes
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%.