系统收录:492 个人收录:8712 本日访问量:3495
等了三天多备案终于下来了(现在没了)
之前还搞过一个本地缓存方案(传送门:https://moa.moe/24,想要一言数据的也进这里)
注:本页提供的API数据全部源于hitokoto.us,由于源站关闭可能不会再添加数据。要获取持续更新的一言和新的功能请移步 hitokoto.cn
数据格式:JSON
地址:
系统收录: https://hitoapi.cc/s
系统+个人收录: https://hitoapi.cc/sp
已经配置CORS,可跨域访问
已禁止浏览器缓存
数据结构:
{
"catname" : "分类",
"author" : "投稿人",
"date" : "投稿时间",
"id" : "ID(可用<a rel='nofollow' href='http://hitokoto.us/view/"+id+".html'>链接到官方页面)",
"text" : "一言内容",
"source" : "来源(可能为空)"
}
示例代码(JS):
$.getJSON('https://hitoapi.cc/sp',function(hitokoto){
$('#hitocenters').html(`<span id="hitokoto" title="分类:${hitokoto.catname}${hitokoto.source?"
出自:"+hitokoto.source:""}
投稿:${hitokoto.author} @ ${hitokoto.date}"><a rel="nofollow" href="http://hitokoto.us/view/${hitokoto.id}.html" target="_blank">${hitokoto.text}</a></span>`);
});
数据格式:JSON(指定类别)
地址:
Anime - 动画 | https://hitoapi.cc/aa |
Comic - 漫画 | https://hitoapi.cc/b |
Game - 游戏 | https://hitoapi.cc/c |
Novel - 小说 | https://hitoapi.cc/d |
原创 | https://hitoapi.cc/e |
来自网络 | https://hitoapi.cc/f |
其他 | https://hitoapi.cc/g |
已经配置CORS,可跨域访问
已禁止浏览器缓存
数据结构:
{
"catname" : "分类",
"author" : "投稿人",
"date" : "投稿时间",
"id" : "ID(可用<a rel='nofollow' href='http://hitokoto.us/view/"+id+".html'>链接到官方页面)",
"text" : "一言内容",
"source" : "来源(可能为空)"
}
示例代码(JS):
$.getJSON('https://hitoapi.cc/aa',function(hitokoto){
$('#hitocenters').html(`<span id="hitokoto" title="分类:${hitokoto.catname}${hitokoto.source?"
出自:"+hitokoto.source:""}
投稿:${hitokoto.author} @ ${hitokoto.date}"><a rel="nofollow" href="http://hitokoto.us/view/${hitokoto.id}.html" target="_blank">${hitokoto.text}</a></span>`);
});
数据格式:JSON(指定UID)
地址:https://hitoapi.cc/id/UID (将UID替换)
已经配置CORS,可跨域访问
已禁止浏览器缓存
数据结构:
{
"catname" : "分类",
"author" : "投稿人",
"date" : "投稿时间",
"id" : "ID(可用<a rel='nofollow' href='http://hitokoto.us/view/"+id+".html'>链接到官方页面)",
"text" : "一言内容",
"source" : "来源(可能为空)"
}
示例代码(JS):
$.getJSON('https://hitoapi.cc/id/1',function(hitokoto){
$('#hitocenters').html(`<span id="hitokoto" title="分类:${hitokoto.catname}${hitokoto.source?"
出自:"+hitokoto.source:""}
投稿:${hitokoto.author} @ ${hitokoto.date}"><a rel="nofollow" href="http://hitokoto.us/view/${hitokoto.id}.html" target="_blank">${hitokoto.text}</a></span>`);
});
数据格式:JavaScript (不推荐,可能会减慢页面加载速度)
地址:
系统收录: https://hitoapi.cc/a
系统+个人收录: https://hitoapi.cc/ap
示例代码(HTML):
<script src="https://hitoapi.cc/ap"></script>
最近手上没有啥好折腾的,心慌啊。要不,也搭建个api来玩玩。过年了,先祝鸡年大吉吧!
谢谢博主。。
你好,我在一个web设计大赛里用了贵站提供的api,但是发现里面有些内容太黄暴来 。比如我想只使用小说里的(不黄暴一点),有办法进行筛选吗?
因为为了速度API后台是纯静态的,弄筛选的话很麻烦,可以使用一言官网的API(hitokoto.us),或者到 https://moa.moe/24 下载我抓取的一言数据库放到自己的数据库内
现在官网的API貌似有点抽风
http://www.littlehands.site/index.php/archives/24/
不知道这个对你有没有用
目前这个API处于抽风状态
使用官网的api会有跨域问题。。然后我参加的那个比赛是纯前端设计。。php或者数据库啥的全都不用(偷偷用api感觉已经在打擦边球hhh)。主要就是怕去评选的时候突然屏幕上滚过去一句“萝莉大法好”..."我最爱奶子了"什么什么的。感觉会被抓起来的说2333
http://hitokoto.cn/api
你试试他的API
奇怪怎么会有两条回复,我只发一次。。。