无聊做了几个api接口,公开出来使用。

1. 备案查询

Usage:
GET https://www.i45s.com/api/beian.xml?d={domain}
Type: text/xml

e.g.
GET https://www.i45s.com/api/beian.xml?d=baidu.com
Return:

<?xml version="1.0" encoding="UTF-8"?><root><code>200</code><message>请求成功</message><data><status>1</status><info>京ICP证030173号-1</info></data></root>

有速率限制,未备案root->data->status为2,已备案root->data->status为1。

2. IP属地查询(支持IPv6)

Usage: GET https://www.i45s.com/api/ip-location.php?ip={ip}
Type: text/plain

直接返回IP属地。

3. 一言API

Usage: GET https://www.i45s.com/proj/hitokoto.phtml

使用项目:
https://github.com/TheTNB/hitokoto-api/releases
https://github.com/hitokoto-osc/sentences-bundle
返回内容、用法与https://v1.hitokoto.cn完全一致。