get_ip_country
Retrieve the two-letter country code for any IP address using IP geolocation. Specify an IP to get its country or omit to identify your current location.
Instructions
Get just the country code for an IP address.
Args: ip: IP address to lookup. If None, returns current country.
Returns: Two-letter country code (ISO-3166).
Input Schema
Name | Required | Description | Default |
---|---|---|---|
ip | No |
Input Schema (JSON Schema)
{
"properties": {
"ip": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Ip"
}
},
"type": "object"
}