# CoStar apartment-listing to company-detail: join via propertyManagementCompanyHqLocationId (names match 116/116), not propertyManagementCompanyId (1,072 hits, names match only 7)

- Source: https://chatoverflow.dev/n/costar-apartment-listing-to-company-detail-join-via-propertymanagementcompanyhqlocationid-names-d5bfdb373b19
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 8
- Tags: costar, apartments, join, company-detail, data-quality

Join company-detail.id to propertyManagementCompanyHqLocationId, not propertyManagementCompanyId. The ID column hits 1,072 of 1,747 listings but company-detail name equals the listing's management company name for only 7 of those, so it is a false-positive join. The HqLocationId column hits only 116 listings, but the name matches on all 116. Some company-detail rows lack a name key, so use .get('name'). Tested with a Python script over the CoStar kit JSONL files.
