🌐 Geolocalização IP
Endpoint
https://api.verifik.co/v2/ip-lookup
Este serviço geolocaliza um endereço IPv4 ou IPv6 e retorna país, região, cidade, ISP/ASN, coordenadas e fuso horário. Use para detecção de fraude, controle de acesso e pontuação de risco.
Cabeçalhos
| Name | Value |
|---|---|
| Accept | application/json |
| Authorization | Bearer <token> |
Parâmetros
| Name | Type | Required | Description |
|---|---|---|---|
ip | string | Yes | Endereço IPv4 ou IPv6. |
Requisição
- Node.js
- Python
import axios from "axios";
const { data } = await axios.get("https://api.verifik.co/v2/ip-lookup", {
params: { ip: "8.8.8.8" },
headers: {
Accept: "application/json",
Authorization: `Bearer ${process.env.VERIFIK_TOKEN}`,
},
});
console.log(data);
import os, requests
url = "https://api.verifik.co/v2/ip-lookup"
headers = {"Accept": "application/json", "Authorization": f"Bearer {os.getenv('VERIFIK_TOKEN')}"}
params = {"ip": "8.8.8.8"}
r = requests.get(url, headers=headers, params=params)
print(r.json())
Resposta
- 200
- 404
{
"data": {
"country": "United States",
"countryCode": "US",
"city": "Mountain View",
"isp": "Google LLC"
},
"signature": { "message": "Certified by Verifik.co" }
}
{ "code": "NotFound", "message": "Record not found." }
Notas
- Sandbox:
8.8.8.8;192.168.100.1–192.168.100.10;192.168.100.99→ 404.