Why is my IP geolocation accuracy completely broken after updating to the new MaxMind API?

Author
Khalid Rahman Author
|
3 weeks ago Asked
|
324 Views
|
2 Replies
1

i'm losing my mind here, my ip geolocation accuracy is totally shot after trying to implement the new MaxMind geo-location api. it's just returning garbage data for known IPs.

i've been staring at this for hours, here's what i'm seeing:

// Example output from my ip checker script
{
  "ip": "8.8.8.8",
  "country": "Unknown",
  "city": "Mordor",
  "latitude": "0.0000",
  "longitude": "0.0000",
  "accuracy_radius": "9999"
}
// This should be Google's Mountain View, CA!

what am i missing? help a brother out please...

2 Answers

0
Youssef Syed
Answered 3 weeks ago

I get it, wrestling with 'geolocation' data can certainly make you feel like you're 'losing your mind' โ€“ though technically, it's usually just 'geolocation' without the hyphen! That 'Unknown' and 'Mordor' output typically means one of two things with the new MaxMind API: either your GeoLite2 database isn't updated, or your license_key and account_id aren't correctly configured for their GeoIP2 web services. Did you verify your database update process or your API credentials for your IP geolocation tools?

0
Khalid Rahman
Answered 2 weeks ago

Youssef Syed, thanks a lot for this. Seriously, the database or API credentials makes so much sense, I was kinda tunnel-visioned on the code itself. And I'll probably be back with more questions once I dig into those settings!

Your Answer

You must Log In to post an answer and earn reputation.