Lookup Caller IP

GEThttps://api-ip-intelligence.dataandapis.com/v1/ip/me

Lookup Caller IP es un endpoint de IP Intelligence API. País, ASN, detección de datacenter, nube y Tor con una puntuación de riesgo explicable para cualquier IP.

Envía tu clave en la cabecera X-Api-Key. Cada llamada cuesta 1 token; una clave gratuita incluye 500 tokens al mes.

Petición

Este endpoint no recibe parámetros.

Petición de ejemplo

curl
curl "https://api-ip-intelligence.dataandapis.com/v1/ip/me" \
  -H "X-Api-Key: YOUR_API_KEY"
JavaScript / TypeScript (paquete dataandapis)
// npm install dataandapis
import { DataAndApis } from "dataandapis";

const client = new DataAndApis(); // reads DATAANDAPIS_API_KEY

const data = await client.ipIntelligence.lookupCallerIp();
Node.js (fetch)
const res = await fetch("https://api-ip-intelligence.dataandapis.com/v1/ip/me", {
  headers: { "X-Api-Key": process.env.DATAANDAPIS_KEY },
});
const data = await res.json();
Python (paquete dataandapis)
# pip install dataandapis
from dataandapis import DataAndApis

client = DataAndApis()  # reads DATAANDAPIS_API_KEY

data = client.ip_intelligence.lookup_caller_ip()
Python (requests)
import os, requests

r = requests.get(
    "https://api-ip-intelligence.dataandapis.com/v1/ip/me",
    headers={"X-Api-Key": os.environ["DATAANDAPIS_KEY"]},
)
data = r.json()

Guía del paquete npm dataandapis →Guía del paquete dataandapis para Python →

Respuesta de ejemplo

Respuesta de ejemplo
{
  "ok": true,
  "ip": "8.8.8.8",
  "family": "ipv4",
  "mapped_from": null,
  "special_use": null,
  "country": "US",
  "registry_country": "US",
  "country_matches_registry": true,
  "asn": {
    "number": 15169,
    "organization": "GOOGLE",
    "registry_country": "US",
    "range": {
      "start": "8.8.8.0",
      "end": "8.8.8.255"
    }
  },
  "hosting": null,
  "is_datacenter": false,
  "is_cdn": false,
  "is_tor_exit": false,
  "is_routed": true,
  "risk": {
    "score": 0,
    "level": "none",
    "reasons": []
  }
…
Ver la respuesta completa
{
  "ok": true,
  "ip": "8.8.8.8",
  "family": "ipv4",
  "mapped_from": null,
  "special_use": null,
  "country": "US",
  "registry_country": "US",
  "country_matches_registry": true,
  "asn": {
    "number": 15169,
    "organization": "GOOGLE",
    "registry_country": "US",
    "range": {
      "start": "8.8.8.0",
      "end": "8.8.8.255"
    }
  },
  "hosting": null,
  "is_datacenter": false,
  "is_cdn": false,
  "is_tor_exit": false,
  "is_routed": true,
  "risk": {
    "score": 0,
    "level": "none",
    "reasons": []
  }
}