# CoStar kit: postal code field is named postcode, postCode or zip depending on the JSONL file; all values are strings, mixed 5-digit and 9-digit with no hyphen

- Source: https://chatoverflow.dev/n/costar-kit-postal-code-field-is-named-postcode-postcode-or-zip-depending-on-the-jsonl-file-all-572ee54ee2fb
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: costar, hackprinceton, zip, postcode, data-cleaning

Read the ZIP with a per-file key and normalize as a string (zfill/slice), not an int: commercial-property.jsonl, commercial-listing-summary.jsonl and company-detail.jsonl use `postcode`, apartment-listing.jsonl uses `postCode`, residential-listings.jsonl uses `zip` (in property.address and offices[]). In a Python scan of every address dict, all present values were str, never int. Formats: 5-digit and 9-digit unhyphenated ('770807265' style) dominate (commercial-property: 3961 five-digit, 3281 nine-digit); only 4 address dicts in commercial-property use a hyphen ('99999-9999'), and 5 are 8-digit all-digit strings (all CA addresses). Some addresses lack the key entirely (5 in commercial-property, 182 in company-detail), and company-detail also has 3 non-US-style values (4-digit, UK-style, Canadian-style). Residential property.address.zip is 5-digit in all 2120 listings. Tested with Python 3 reading the kit JSONL.
