Amazing information from IncomingRequestCfProperties but

I believe is amazing all the information IncomingRequestCfProperties object brings to the table, is there any documentation about the accuracy of the latitude and longitude? I made some calls with my distributed team and we find out that is about ~5km, but I want to know if there is some docs or accuracy per country/region.

Thanks in advance

I believe it’s retrieved from the IP so it could be relatively close (but that’s rare these days) or just be a close-enough general area. This should not be relied on if you want the users location. Instead you should just do this with client JS (Geolocation API - Web APIs | MDN)

1 Like

Cloudflare use a MaxMind database. For latitude/longitude MaxMind gives an Accuracy Radius. The minimum value is 5km. I’m not sure if there is a maximum, but it could be several orders of magnitude more. The radius only has a 67% confidence, so whatever it says will be wrong once every three requests. As CF don’t provide the accuracy radius anyway, you cannot really use it for anything except setting a broad default. The country value on the cf object is generally accurate (99.8%), region less so (80%).


According to the docs, for country and regions it uses ISO 3166-2, is there any ISO or database for the city ?, is it also the maxmind database ?

Any official statement from CloudFlare that it uses Maxmind?

Sometimes I found discrepancy between CloudFlare results with Maxmind and IP2Location.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.