返回顶部
🇺🇸 English
🇨🇳 简体中文
🇨🇳 繁體中文
🇺🇸 English
🇯🇵 日本語
🇰🇷 한국어
🇫🇷 Français
🇩🇪 Deutsch
🇪🇸 Español
🇷🇺 Русский
i

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.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
2,134
下载量
2
收藏
概述
安装方式
版本历史

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_TOKEN` in the OpenClaw dashboard (optional) - **Environment variable**: `export IPINFO_TOKEN="your-token"` - **Query parameter**: `?token=YOUR_TOKEN` (for one-off requests) ## Quick Lookup Single IP: ```bash curl -s "https://ipinfo.io/8.8.8.8" ``` Current IP: ```bash curl -s "https://ipinfo.io/json" ``` With token (optional, from environment): ```bash curl -s "https://ipinfo.io/8.8.8.8?token=${IPINFO_TOKEN}" ``` Or pass token directly: ```bash curl -s "https://ipinfo.io/8.8.8.8?token=YOUR_TOKEN" ``` ## Response Format JSON response includes: - `ip`: IP address - `hostname`: Reverse DNS hostname - `city`: City name - `region`: State/region - `country`: Two-letter country code (ISO 3166-1 alpha-2) - `postal`: Postal/ZIP code - `timezone`: IANA timezone - `loc`: Coordinates as "latitude,longitude" - `org`: Organization/ASN information ## Extract Specific Fields Using `jq`: ```bash curl -s "https://ipinfo.io/8.8.8.8" | jq -r '.city, .country, .loc' ``` Country only: ```bash curl -s "https://ipinfo.io/8.8.8.8" | jq -r '.country' ``` Parse coordinates: ```bash curl -s "https://ipinfo.io/8.8.8.8" | jq -r '.loc' | tr ',' '\n' ``` ## Batch Processing Process multiple IPs: ```bash 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 '\n' ', ')" else echo "$ip: $(curl -s "https://ipinfo.io/$ip" | jq -r '.city, .country' | tr '\n' ', ')" fi done ``` ## Python Usage ```python 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: ```python 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: ```python 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_TOKEN` via 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

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 ipinfo-1776376642 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 ipinfo-1776376642 技能

通过命令行安装

skillhub install ipinfo-1776376642

下载 Zip 包

⬇ 下载 ipinfo v1.0.0

文件大小: 1.91 KB | 发布时间: 2026-4-17 14:38

v1.0.0 最新 2026-4-17 14:38
- Initial release of the ipinfo skill for IP geolocation lookups using the ipinfo.io API.
- Supports converting IP addresses to geographic data: city, region, country, postal code, timezone, coordinates, and more.
- No API key required for up to 50,000 requests/month; optional IPINFO_TOKEN for higher rate limits.
- Includes instructions for single and batch IP lookups, extracting fields with jq, and Python usage examples.
- Outlines free and token-authenticated usage, configuration methods, and common use cases.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部