Tiago Martins

IPinfo

資料分析v1.0.0
作者:Tiago Martins更新於 2026-05-11ipinfo@clawhub_tiagom101/ipinfo
資料洞察使用者分析

據 AlphaMoat 統計,截至 2026-09,IPinfo 累計下載 3,166 次、獲 2 個星標,在全部 5,078 個 AI 技能中排名第 3,604 位,在「資料分析」分類(399 個)中排名第 271 位。

累計安裝
113
累計下載
3166
星標
2
全站排名
#3,604
全站前 71% · 「資料分析」前 68%
平台累計安裝累計下載星標評論
ClawHub ↗10030732-
SkillHub ↗11331662—

各平台的計數口徑不同,統計時間不一致。

這個技能是做什麼的

指南說明可用 curl 或 Python 請求 IPinfo,並返回城市、地區、國家、郵編、時區、座標和網路組織等欄位;IPINFO_TOKEN 為可選配置。查詢的 IP(包括示例中的當前公網 IP)會傳送給 IPinfo。應先確認這種資料共享符合工作流和資料政策,並避免把 token 寫進命令、URL、日誌或原始檔。

資料釋出於 2026-10-29

可以用來做什麼

  • 將 IP 地址補充為地理位置和時區資訊
  • 檢視響應中的國家、座標或網路組織欄位
  • 規劃受控的 IP 列表地理資訊處理流程

什麼時候用

  • 需要透過 IPinfo 查詢 IP 地理位置時
  • 查詢敏感 IP 前,確認允許將其傳送給外部服務;使用 token 時採用受保護的配置方式

示例提示詞

以下是根據技能文件生成的示例,不代表實際執行結果。

解釋 IPinfo 響應可能包含哪些地理位置欄位,不傳送任何 IP 查詢請求。
列出使用可選 IPINFO_TOKEN 時避免憑據洩露的儲存與日誌注意事項。

月度資料趨勢

累計下載3166
2049264932492026-03 · 累計下載 21322026-05 · 累計下載 25192026-06 · 累計下載 26672026-07 · 累計下載 28802026-08 · 累計下載 29632026-09 · 累計下載 316626-0326-09
星標2
1232026-03 · 星標 22026-05 · 星標 22026-06 · 星標 22026-07 · 星標 22026-08 · 星標 22026-09 · 星標 226-0326-09

2026-09 起統計方法調整:同名技能按作者分別統計,並覆蓋全部技能。圖中虛線為調整前的月份,與之後的資料不直接比較,也不計算跨越調整的增長。

月份累計下載環比星標
2026-093166—2
2026-082963+2.9%2
2026-072880+8.0%2
2026-062667+5.9%2
2026-052519—2
2026-032132—2

SKILL.md 原文

以下是作者釋出的原始檔案,按純文字顯示,本站未做修改或稽核;其中的連結不可點選,命令請核實後再執行。抓取於 2026-10-23。

3.3 KB · ClawHub v1.0.0
---
name: ipinfo
description: 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.
homepage: https://ipinfo.io
metadata:
  { "openclaw": { "emoji": "🌍", "requires": { "bins": ["curl"] }, "primaryEnv": "IPINFO_TOKEN" } }
---

# IPinfo Geolocation
展開全部(共 141 行)
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

「資料分析」分類下的熱門技能

資料月份:2026-09 · 下載/星標/安裝數聚合自公開技能註冊庫(ClawHub、SkillHub),按月更新。口徑說明見資料方法。