RELATED answer conclusively whether geonames uris need ending /
I know this has been answered and explained but I can't find the documentation at this moment
Yes, conclusively, Geonames URIs must end with forward slash. See GeoNames Ontology documentation > example*:
For the town Embrun in France we have these two URIs :
[1] https://sws.geonames.org/3020251/
[2] https://sws.geonames.org/3020251/about.rdf
*NOTE that we use the first of these two URI forms
tagging @coleherman43 as you are working on code