🌍 GeoLite API

基于GeoLite2-Country.mmdb的高性能IP地理位置查询服务

支持批量查询 • 混合IP与域名 • 一键部署Vercel

✨ 核心功能

🚀 测试接口

🧪 API接口 🧪 批量测试工具

📡 API接口

1. 单个查询接口

GET /api/query?input={IP或域名}
POST /api/query

请求示例:

curl "https://your-domain.vercel.app/api/query?input=8.8.8.8"
curl "https://your-domain.vercel.app/api/query?input=google.com"

响应示例:

{
  "success": true,
  "data": {
    "input": "8.8.8.8",
    "type": "ip",
    "ip": "8.8.8.8",
    "country_code": "US",
    "country_name": "美国",
    "continent_code": "NA",
    "continent_name": "北美洲",
    "status": "success"
  },
  "timestamp": "2024-01-01T00:00:00.000Z"
}

2. 批量查询接口

POST /api/batch

请求示例:

curl -X POST "https://your-domain.vercel.app/api/batch" \
  -H "Content-Type: application/json" \
  -d '{
    "inputs": ["8.8.8.8", "google.com", "1.1.1.1", "github.com"],
    "format": "json"
  }'

📊 响应字段说明