IPinfo
/install ipinfo
IPinfo Geolocation
Free IP geolocation API. No API key required for basic usage (50k requests/month), optional token for higher limits.
Configuration
The IPINFO_TOKEN environment variable is optional - the skill works without it using the free tier. Configure it via the OpenClaw dashboard UI for higher rate limits, or set it manually:
- Dashboard UI: Configure
IPINFO_TOKENin the OpenClaw dashboard (optional) - Environment variable:
export IPINFO_TOKEN="your-token" - Query parameter:
?token=YOUR_TOKEN(for one-off requests)
Quick Lookup
Single IP:
curl -s "https://ipinfo.io/8.8.8.8"
Current IP:
curl -s "https://ipinfo.io/json"
With token (optional, from environment):
curl -s "https://ipinfo.io/8.8.8.8?token=${IPINFO_TOKEN}"
Or pass token directly:
curl -s "https://ipinfo.io/8.8.8.8?token=YOUR_TOKEN"
Response Format
JSON response includes:
ip: IP addresshostname: Reverse DNS hostnamecity: City nameregion: State/regioncountry: Two-letter country code (ISO 3166-1 alpha-2)postal: Postal/ZIP codetimezone: IANA timezoneloc: Coordinates as "latitude,longitude"org: Organization/ASN information
Extract Specific Fields
Using jq:
curl -s "https://ipinfo.io/8.8.8.8" | jq -r '.city, .country, .loc'
Country only:
curl -s "https://ipinfo.io/8.8.8.8" | jq -r '.country'
Parse coordinates:
curl -s "https://ipinfo.io/8.8.8.8" | jq -r '.loc' | tr ',' '\
'
Batch Processing
Process multiple IPs:
for ip in 8.8.8.8 1.1.1.1 208.67.222.222; do
if [ -n "$IPINFO_TOKEN" ]; then
echo "$ip: $(curl -s "https://ipinfo.io/$ip?token=$IPINFO_TOKEN" | jq -r '.city, .country' | tr '\
' ', ')"
else
echo "$ip: $(curl -s "https://ipinfo.io/$ip" | jq -r '.city, .country' | tr '\
' ', ')"
fi
done
Python Usage
import os
import requests
# Without token (free tier)
response = requests.get("https://ipinfo.io/8.8.8.8")
data = response.json()
print(f"{data['city']}, {data['country']}")
print(f"Coordinates: {data['loc']}")
With token from environment:
import os
import requests
token = os.getenv("IPINFO_TOKEN")
if token:
response = requests.get("https://ipinfo.io/8.8.8.8", params={"token": token})
else:
response = requests.get("https://ipinfo.io/8.8.8.8")
data = response.json()
Or pass token directly:
response = requests.get("https://ipinfo.io/8.8.8.8", params={"token": "YOUR_TOKEN"})
Rate Limits
- Free tier: 50,000 requests/month, ~1 req/sec
- With token: Higher limits based on plan
- Configure
IPINFO_TOKENvia OpenClaw dashboard UI or environment variable
Common Use Cases
- Geolocate IP addresses
- Enrich IP lists with location data
- Filter IPs by country
- Calculate distances between IPs using coordinates
- Timezone detection for IPs
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install ipinfo - 安装完成后,直接呼叫该 Skill 的名称或使用
/ipinfo触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
IPinfo 是什么?
Perform IP geolocation lookups using ipinfo.io API. Convert IP addresses to geographic data including city, region, country, postal code, timezone, and coordinates. Use when geolocating IPs, enriching IP data, or analyzing geographic distribution. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 2190 次。
如何安装 IPinfo?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install ipinfo」即可一键安装,无需额外配置。
IPinfo 是免费的吗?
是的,IPinfo 完全免费(开源免费),可自由下载、安装和使用。
IPinfo 支持哪些平台?
IPinfo 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 IPinfo?
由 Tiago Martins(@tiagom101)开发并维护,当前版本 v1.0.0。