ip_lookup

IP Lookup

Asynchronous multi-provider IP metadata lookup backend.

This module retrieves geolocation, ASN, organization, and privacy information for any IP address.
It aggregates data from multiple free public APIsipapi.co, ipinfo.io, and BigDataCloud — and merges them into a unified JSON schema.
It works immediately without any account or API key, while supporting optional tokens for enhanced accuracy.

GitHub-hosted IP Lookup Backend Source


🚀 Features


⚙️ Environment Variables

Variable Description Example
REDIS_URL Optional Redis connection string (used for cache) redis://localhost:6379/0
IPCACHE_TTL_SEC Default cache lifetime (seconds) 1800
IPINFO_TOKEN Optional token for ipinfo.io API <your_token>
BDC_KEY Optional API key for BigDataCloud <your_key>

If no tokens are provided, the module still works using ipapi.co’s public endpoint.


🧠 Example Usage

Basic Python Call

import asyncio
from core.ip_lookup import lookup_ip

result = asyncio.run(lookup_ip("8.8.8.8"))
print(result)

⚙️Copyright © 2025 glitter.kr

Author: glitter💫 Trust Chain: DNSSEC · DANE · HSTS · CSP GitHub-hosted IP Lookup Backend Source


PHP Client Implementation — ip_lookup_php