Yeah, it should be freely available, you have to be able to know the rules you're supposed to obey in order to obey them well. I've been making a free API for US law search, you can point whatever model you want at it: https://law.agentlookups.ai/
Very much a work in progress, only federal and state so far, no municipal codes yet, and no case law yet. Big hole, I know. Also working on making the search ranking work better.
is there a dataset/torrent with all the underlying laws?