IP Intelligence Updated May 18, 2026

IP Geolocation API

Look up country, timezone, ASN, organization, confidence, and source metadata for an IP address.

The IP Geolocation API returns normalized location and network context for a public IPv4 or IPv6 address.

Authentication is required.

Endpoint

GET https://api.requestguard.com/v1/ip/{ip}/geo

Parameters

ParameterTypeRequiredDescription
ipstringYesThe IPv4 or IPv6 address to query. URL-encode IPv6 addresses in the path.

Example Request

curl "https://api.requestguard.com/v1/ip/8.8.8.8/geo" \
  -H "Authorization: Bearer rg_sk_live_..."

IPv6 Example

curl "https://api.requestguard.com/v1/ip/2001%3A4860%3A4860%3A%3A8888/geo" \
  -H "Authorization: Bearer rg_sk_live_..."

Example Response

{
  "ip": "8.8.8.8",
  "countryCode": "US",
  "country_code": "US",
  "timezone": "America/Los_Angeles",
  "asn": 15169,
  "organization": "Google LLC",
  "confidence": 0.74,
  "lookup": {
    "method": "local_database",
    "fallback_used": false,
    "confidence": 0.74
  },
  "sources": [
    {
      "name": "Local geolocation database",
      "type": "dataset",
      "matched": true,
      "confidence": 0.74
    }
  ]
}

Response Fields

FieldMeaning
ipQueried IP address.
countryCode / country_codeISO 3166-1 alpha-2 country code when known.
timezoneIANA timezone when available.
asnAutonomous System Number when known.
organizationNetwork organization when known.
confidenceNormalized confidence for the location result.
lookup.methodLookup source strategy, such as local_database, edge_request, configured_fallback, or heuristic.
lookup.fallback_usedWhether a configured fallback source was used.
sourcesSource metadata used to build the response.