Does anyone know how to get accurate country/city data?

I've been attempting to use request.cf.country but sometimes it returns XX, and cities empty, despite having valid LAT, LONG values which can be used to find the correct location. I am using a vpn when testing other locations but I'm confusesd as to how the LAT,LONG values are correct but are not able to be geolocated in the other headers.

Testing it again i see that the LAT,LONG values are incorrect but I am able to get the correct location from getting the Geolocation of the IP from
request.headers.get('CF-Connecting-IP')


How do i get accruate country/city data? I don't want to use maxMind if there's a workers/cloudflare trasnform feature that I'm missing.
Was this page helpful?