IP Checker Logo

API & Developer Docs

A small, predictable JSON API. Endpoints are server-proxied through our provider abstraction layer, with response normalization, light caching, and graceful error handling.

Endpoints

GET /api/my-ip

Returns geolocation and network data for the caller's public IP, as seen by the server.

curl https://ipcheck.mubarokah.com/api/my-ip

GET /api/lookup?q=<ip|domain>

Look up any IPv4, IPv6 or bare domain. Schemes and paths are rejected.

curl "https://ipcheck.mubarokah.com/api/lookup?q=8.8.8.8"

POST /api/bulk

Batch lookups (up to 50 per request). Concurrency is bounded server-side.

curl -X POST -H 'content-type: application/json' \
  -d '{"queries":["8.8.8.8","1.1.1.1","example.com"]}' \
  https://ipcheck.mubarokah.com/api/bulk

Response shape

{
  "ok": true,
  "query": "8.8.8.8",
  "ip": "8.8.8.8",
  "ipVersion": "IPv4",
  "location": {
    "continent": "North America",
    "country": "United States",
    "countryCode": "US",
    "regionName": "Virginia",
    "city": "Ashburn",
    "zip": "20149",
    "lat": 39.0438,
    "lon": -77.4874,
    "timezone": "America/New_York",
    "utcOffsetSeconds": -14400,
    "currency": "USD"
  },
  "network": {
    "isp": "Google LLC",
    "org": "Google Public DNS",
    "as": "AS15169 Google LLC",
    "asname": "GOOGLE",
    "reverse": "dns.google"
  },
  "flags": { "mobile": false, "proxy": false, "hosting": true }
}

Errors

Rate limits & caching

Responses are cached server-side for 10 minutes per query. The free public tier of the upstream provider is rate-limited and intended for non-commercial use. For production traffic we recommend configuring a commercial provider through the environment variables documented below.

Provider abstraction

Set the following environment variables on the server. Secrets are never exposed to the browser.

IP_PROVIDER=ip-api            # or ip-api-pro
IP_API_KEY=...                # required for pro
IP_API_BASE=http://ip-api.com

Notes