如何查询 JSON 的 RIPE API

How to query the RIPE API for JSON

如何让 RIPE REST API 为您提供 JSON 与从命令行上的 whois 命令获得的相同数据?

例如。类似于

的输出
whois 1.1.1.1

https://whoapi.com/ 但我想有更简单的方法 and/or 更便宜的方法 就像用 nodejs 后端设置 VPS 并使用类似这样的东西:https://www.npmjs.com/package/parse-whois

与使用别人的 API 相比,您将学到更多的构建方法(创建速度也足够快),也更适合您的情况

Python

中介绍了如何执行此操作
from ipwhois import IPWhois
from pprint import pprint

ip = "1.1.1.1"
obj = IPWhois(ip)
results = obj.lookup_rdap(depth=1)
pprint(results)