apipick-ip-geolocation

TotalClaw 作者 totalclaw

使用 apipick IP 地理位置 API 查找任何 IPv4 或 IPv6 地址的地理位置和网络信息。返回国家/地区、大陆、城市、纬度/经度、时区、货币、ISP 和 ASN。当用户想要对 IP 地址进行地理定位、查找 IP 的国家或城市、识别 IP 的 ISP 或 ASN、查找 IP 的时区或货币或检查自己的公共 IP 位置时使用。省略IP参数来查找调用者自己的IP。需要 apipick API 密钥 (x-api-key)。在 https://www.apipick.com 获取免费密钥。

安装 / 下载方式

TotalClaw CLI推荐
totalclaw install totalclaw:totalclaw~javainthinking-apipick-ip-geolocation
cURL直接下载,无需登录
curl -fsSL https://skills.taituai.com/api/skills/totalclaw%3Atotalclaw~javainthinking-apipick-ip-geolocation/file -o javainthinking-apipick-ip-geolocation.md
## 概述(中文)

使用 apipick IP 地理位置 API 查找任何 IPv4 或 IPv6 地址的地理位置和网络信息。返回国家/地区、大陆、城市、纬度/经度、时区、货币、ISP 和 ASN。当用户想要对 IP 地址进行地理定位、查找 IP 的国家或城市、识别 IP 的 ISP 或 ASN、查找 IP 的时区或货币或检查自己的公共 IP 位置时使用。省略IP参数来查找调用者自己的IP。需要 apipick API 密钥 (x-api-key)。在 https://www.apipick.com 获取免费密钥。

## 原文

# apipick IP Geolocation

Look up location and network information for any public IPv4 or IPv6 address.

## Endpoint

```
GET https://www.apipick.com/api/ip-geolocation
```

**Authentication:** `x-api-key: YOUR_API_KEY` header required.
Get a free API key at https://www.apipick.com/dashboard/api-keys

## Request

```bash
# Look up a specific IP
GET /api/ip-geolocation?ip=8.8.8.8

# Look up caller's own IP (omit parameter)
GET /api/ip-geolocation
```

## Response

```json
{
  "success": true,
  "code": 200,
  "message": "ok",
  "data": {
    "ip": "8.8.8.8",
    "country_code": "US",
    "country_name": "United States",
    "continent": "North America",
    "continent_code": "NA",
    "city": "Mountain View",
    "latitude": 37.4056,
    "longitude": -122.0775,
    "timezone": "America/Los_Angeles",
    "currency": "USD",
    "isp": "Google LLC",
    "asn": 15169
  },
  "credits_used": 1,
  "remaining_credits": 99
}
```

`city`, `latitude`, `longitude` may be empty or null for some IPs.

## Error Codes

| Code | Meaning |
|------|---------|
| 400 | Invalid or private/reserved IP address |
| 401 | Missing or invalid API key |
| 402 | Insufficient credits |
| 404 | No geolocation data available for this IP |
| 503 | Geolocation database temporarily unavailable |

**Cost:** 1 credit per request

## Usage Pattern

1. Use `$APIPICK_API_KEY` env var as the `x-api-key` header value; if not set, ask the user for their apipick API key
2. Make the GET request (with or without `ip` query parameter)
3. Present location data in a readable format

See [references/api_reference.md](references/api_reference.md) for full response field descriptions.