country: Get country code (plain text)

API: geojs.io:geojs-ip-geolocation-api
Endpoint: /ip/country
Response format: unknown
Auth: unknown
Method: GET
Last Status: 200
Latency: 239ms

Description

Returns the 2-letter country code as plain text

Parameters (1)

ip (string, query, optional)

IP address(es) to lookup. Omit to get info for requesting IP.

Examples (1)

Get country code (plain text) openapi-spec
curl 'https://get.geojs.io/v1/ip/country?ip=8.8.8.8'
import requests

resp = requests.get(
    "https://get.geojs.io/v1/ip/country",
    params={
        'ip': '8.8.8.8',
    },
)
data = resp.json()
import zingu_apis

api = zingu_apis.api("geojs-ip-geolocation")
result = api.fetch("ip/country", ip="8.8.8.8")

for item in result:
    print(item)
const resp = await fetch("https://get.geojs.io/v1/ip/country?ip=8.8.8.8");
const data = await resp.json();

Probe History

Latency

Status Codes

TimeStatusLatencySize
2026-04-16 03:47:41.152352 200 239ms
2026-04-15 03:15:31.245442 200 240ms
2026-04-14 02:03:55.888670 200 234ms
2026-04-12 14:47:30.568046 200 221ms
2026-04-10 03:17:57.090618 200 340ms
2026-04-09 00:15:06.090356 200 241ms