WeSearch

I switched from ip-api.com to a zero-key API — here's why (HTTPS, CORS, no rate limits)

·3 min read · 0 reactions · 0 comments · 7 views
#api#webdev#javascript
I switched from ip-api.com to a zero-key API — here's why (HTTPS, CORS, no rate limits)
⚡ TL;DR · AI summary

The article discusses the author's transition from using ip-api.com to a zero-key API for geolocation services. The primary reason for this switch is the limitations of ip-api.com, which only supports HTTP and fails on HTTPS sites. The new API offers several advantages, including HTTPS support, no API key requirement, and CORS compatibility.

Key facts
Original article
DEV.to (Top)
Read full at DEV.to (Top) →
Opening excerpt (first ~120 words) tap to expand

try { if(localStorage) { let currentUser = localStorage.getItem('current_user'); if (currentUser) { currentUser = JSON.parse(currentUser); if (currentUser.id === 3966495) { document.getElementById('article-show-container').classList.add('current-user-is-article-author'); } } } } catch (e) { console.error(e); } Vix Posted on Jun 3 I switched from ip-api.com to a zero-key API — here's why (HTTPS, CORS, no rate limits) #webdev #python #api #javascript f you've ever tried to use ip-api.com on an HTTPS site, you've hit this error: "Mixed Content: The page was loaded over 'https', but requested an insecure resource 'http://ip-api.com/json'. This request has been blocked." ip-api.com is the most cited free geolocation API on the internet — Stack Overflow answers, tutorials, GitHub gists.

Excerpt limited to ~120 words for fair-use compliance. The full article is at DEV.to (Top).

Anonymous · no account needed
Share 𝕏 Facebook Reddit LinkedIn Threads WhatsApp Bluesky Mastodon Email

Discussion

0 comments

More from DEV.to (Top)