Your IP address doesn't automatically correspond to your city, even without a VPN.

Then add your city as an argument to the curl. It works well enough regardless and doesn't use hundreds of megabytes of RAM which is what the initial complaint was.