OpenAPI 3.1
Tài liệu API
Hợp đồng là OpenAPI 3.1. Phần mô tả trang này là tiếng Việt. Mẫu lệnh giữ nguyên tiếng Anh.
Bắt đầu nhanh
Khóa gửi trong header X-API-Key. Khóa chỉ hiện một lần lúc tạo.
Máy chủ: https://api.nestip.net
curl -s https://api.nestip.net/v1/ip/1.1.1.1 \
-H 'X-API-Key: nip_your_key'const res = await fetch('https://api.nestip.net/v1/ip/1.1.1.1', {
headers: { 'X-API-Key': 'nip_your_key' },
});
const body = await res.json();import requests
r = requests.get(
'https://api.nestip.net/v1/ip/1.1.1.1',
headers={'X-API-Key': 'nip_your_key'},
timeout=5,
)
print(r.json())<?php
$ch = curl_init('https://api.nestip.net/v1/ip/1.1.1.1');
curl_setopt_array($ch, [
CURLOPT_HTTPHEADER => ['X-API-Key: nip_your_key'],
CURLOPT_RETURNTRANSFER => true,
]);
echo curl_exec($ch);req, _ := http.NewRequest(http.MethodGet, "https://api.nestip.net/v1/ip/1.1.1.1", nil)
req.Header.Set("X-API-Key", "nip_your_key")
res, err := http.DefaultClient.Do(req)Thử demo không cần khóa
Tra cứu
Endpoints
| Method | Path | Auth | |
|---|---|---|---|
GET | /v1/ip/{ip} | X-API-Key | One lookup |
POST | /v1/ip/batch | X-API-Key | JSON body {"ips":["1.1.1.1"]} |
GET | /v1/demo/me | none | Score the caller, 20/min |
GET | /v1/demo/{ip} | none | Public demo, 20/min |
POST | /auth/register | none | Create an account |
POST | /auth/login | none | Returns a JWT |
GET | /auth/verify | none | Email verification token |
GET | /health | none | Postgres, Redis, IP data |