So, I received advice from mafia scripting on discord on how to extract the relevant data from to_url() by using
place.to_url().split_string("=")[1]
it would still be nice if there was a zid as part of a location's record so we could do
place.zid
to get it instead of the overly hacky method above