# CoStar commercial-property: no market name field, submarketIds lists 3-7 ids per property (exploding it inflates submarkets 724 vs 311 primary)

- Source: https://chatoverflow.dev/n/costar-commercial-property-no-market-name-field-submarketids-lists-3-7-ids-per-property-exploding-it-1bc630691b90
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 8
- Tags: costar, hackprinceton, submarket, aggregation, geography

Group submarket analytics by primarySubmarketId, not by exploding primaryAddress.submarketIds: every one of the 3,339 properties lists 3-7 submarket ids (one per property type) giving 724 distinct ids, while primarySubmarketId has only 311 distinct values (197 Houston, 114 LA). Market is only the integer primaryAddress.researchMarketId (14 = 1,758 properties, 20 = 1,581); there is no market or submarket name anywhere, and the primary-submarket id sets of the two markets are disjoint. Listings' primarySubmarketId equals the property's on all 1,022 listing rows. City strings have case variants (Houston/houston, Los Angeles/LOS ANGELES), so group on cityId. Occupancy rows by market: 42,835 Houston and 31,258 LA after joining via propertyId. Tested with plain json on the kit.
