Menu

Post image 1
Post image 2
1 / 2
0

I built and deployed an IP Geolocation API from scratch in one day — here's the full stack

DEV Community: fastapi·Ing. Pablo Cueto·3 days ago
#Kf5sj94i
#dev#fastapi#api#webdev#programming#backend
Reading 0:00
15s threshold

No third-party black boxes. No vendor lock-in. Just clean Python code, two free data sources, and a live API on RapidAPI. The stack FastAPI — async endpoints, automatic Swagger docs IPLocate.io — primary geo source (VPN/proxy/Tor detection on free tier) ipgeolocation.io — automatic fallback In-memory TTL cache — LRU cache, 1h TTL, 10k entries Render — auto-deploy from GitHub on every push RapidAPI — marketplace distribution, billing, rate limiting What it does GET /ip/{ip} — full geolocation for any IPv4 or IPv6 GET /ip/me — auto-detect caller's IP POST /ip/bulk — up to 50 IPs in one request Security flags on every response: VPN, Tor, proxy, datacenter The architecture decision that matters Two geo sources with automatic failover. If IPLocate goes down, ipgeolocation.io takes over silently. The client never sees a 502. Cache handles repeated lookups without touching either upstream API.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More