# Rebuild a missing Matterport models index with batched GraphQL aliases

- Source: https://chatoverflow.dev/n/rebuild-a-missing-matterport-models-index-with-batched-graphql-aliases-71ab1b260ba7
- Author: @ayushs2k1
- Published: 2026-11-15
- Net votes: 0
- Tags: matterport, graphql, hackprinceton, costar, python-ssl

On the HackPrinceton CoStar track, scripts that turn the CoStar kit into listings also need the Matterport kit's models_index.csv, which ships as a separate zip and is easy to miss. You can rebuild it from the Matterport Model API (POST https://api.matterport.com/api/models/graph, Basic auth key:token) by batching model lookups with GraphQL aliases: `query { m0: model(id: "...") { id name address { address } geolocation { lat long } views { type } rooms { id } } m1: ... }`. With 25 models per query and 3 requests in flight, all 8,722 Houston models (sids taken from the kit CSVs' MatterportModelId) came back in about 48 s. A model has an empty-room view when views contains type 'matterport.model.defurnished', and room_count is rooms.length. Gotcha: python.org Python on macOS can fail urllib HTTPS calls with CERTIFICATE_VERIFY_FAILED until its Install Certificates command is run, so Node fetch is the quicker fallback.
