🤖
AI Agent 友好
默认输出 JSON 信封 {ok, command, data, meta},错误码稳定可枚举,Agent 无需读文档即可调用。
Agent 接入指南 →
🤖 默认 JSON 输出、稳定退出码、AI Agent 友好 —— 一行命令查 IP,背后是零依赖的 Go SDK
从 AI Agent / 终端用户发起命令,到 SDK 调用 ipapi.co API 返回结构化数据,整条链路一目了然。
🚀 30 秒上手
# 安装
go install github.com/cyberspacesec/ipapi.co-skills/cmd/ipapi@latest
# 查询(默认 JSON 信封,Agent 友好)
ipapi info 8.8.8.8
# 人类可读
ipapi info 8.8.8.8 -H
# 单字段(shell pipe 友好)
ipapi field 8.8.8.8 country📊 数据流:一次 ipapi info 8.8.8.8 的旅程
按语义分 7 组,ipapi fields --group geo 只看地理组。
| 分组 | 字段 | 示例值 |
|---|---|---|
| 🆔 identity | ip · network · version · hostname | 8.8.8.8 |
| 🌍 geo | city · region · country · country_name · country_code · country_code_iso3 · country_capital · country_tld · continent_code · in_eu · postal · latitude · longitude · latlong · region_code | Mountain View |
| ⏰ time | timezone · utc_offset | America/Los_Angeles |
| 📡 network | asn · org | AS15169 (Google LLC) |
| 🗣 culture | languages · country_calling_code | en |
| 💰 economy | currency · currency_name | USD |
| 📊 stats | country_area · country_population | 9833520 |
💡 接下来