GET /api/country

Auth X-Hub-Key from API_HUB_KEYExecute GET /run/squid/api/countryCache cached 1s, never served stale past that windowCost free · weight 0 · standard rate classSource billing free

Visitor country lookup; returns the country name and ISO code of the calling egress IP.

Parameters

No parameters documented.

Response

type: object
pagination: none
sample: {
  "countryName": "str",
  "countryCode": "str"
}

Safe request

Reads the credential from API_HUB_KEY; it never appears in the URL.

curl -sH "X-Hub-Key: $API_HUB_KEY" "https://openapihub.dev/run/squid/api/country"