首页 教育亲子 唐诗三百首
唐诗三百首

唐诗三百首

  • 1354
  • 1237
收录唐代诗人77家,共311首,包含解释、赏析等信息。通过作者、标题、内容等关键词进行模糊检索。
免费
https://api.jisuapi.com/tangshi/chapter
JSON,JSONP
GET POST
https://api.jisuapi.com/tangshi/chapter?appkey=yourappkey

请求参数:

API在线测试
参数名称类型必填说明

返回参数:

参数名称类型说明
detailid int 详情ID
name string 名称
author string 作者

请求代码:

查看代码
<?php

require_once 'curl.func.php';

$appkey = 'your_appkey_here';//你的appkey
$url = "https://api.jisuapi.com/tangshi/chapter?appkey=$appkey";
$result = curlOpen($url, ['ssl'=>true]);
$jsonarr = json_decode($result, true);
//exit(var_dump($jsonarr));

if($jsonarr['status'] != 0)
{
    echo $jsonarr['msg'];
    exit();
}

$result = $jsonarr['result'];
foreach($result as $val)
{
    echo $val['detailid'].' '.$val['name'].' '.$val['author'].'
'; }

JSON返回示例 :

{
    "status": 0,
    "msg": "ok",
    "result": [
        {
            "detailid": "1",
            "name": "行宫",
            "author": "元稹"
        },
        {
            "detailid": "2",
            "name": "登鹳雀楼",
            "author": "王之涣"
        },
        {
            "detailid": "3",
            "name": "新嫁娘词",
            "author": "王建"
        },
        {
            "detailid": "4",
            "name": "相思",
            "author": "王维"
        },
        {
            "detailid": "5",
            "name": "杂诗·君自故乡来",
            "author": "王维"
        },
        {
            "detailid": "6",
            "name": "鹿柴",
            "author": "王维"
        },
        {
            "detailid": "7",
            "name": "竹里馆",
            "author": "王维"
        },
        {
            "detailid": "8",
            "name": "山中送别",
            "author": "王维"
        },
        {
            "detailid": "9",
            "name": "问刘十九",
            "author": "白居易"
        },
        {
            "detailid": "10",
            "name": "哥舒歌",
            "author": "西鄙人"
        },
        {
            "detailid": "11",
            "name": "静夜思",
            "author": "李白"
        },
        {
            "detailid": "12",
            "name": "怨情",
            "author": "李白"
        },
        {
            "detailid": "13",
            "name": "登乐游原",
            "author": "李商隐"
        },
        {
            "detailid": "14",
            "name": "听筝",
            "author": "李端"
        },
        {
            "detailid": "15",
            "name": "渡汉江",
            "author": "李频"
        },
        {
            "detailid": "16",
            "name": "八阵图",
            "author": "杜甫"
        },
        {
            "detailid": "17",
            "name": "宿建德江",
            "author": "孟浩然"
        },
        {
            "detailid": "18",
            "name": "春晓",
            "author": "孟浩然"
        },
        {
            "detailid": "19",
            "name": "春怨",
            "author": "金昌绪"
        },
        {
            "detailid": "20",
            "name": "江雪",
            "author": "柳宗元"
        },
        {
            "detailid": "21",
            "name": "秋夜寄邱员外",
            "author": "韦应物"
        },
        {
            "detailid": "22",
            "name": "终南望余雪",
            "author": "祖咏"
        },
        {
            "detailid": "23",
            "name": "宫词·故国三千里",
            "author": "张祜"
        },
        {
            "detailid": "24",
            "name": "寻隐者不遇",
            "author": "贾岛"
        },
        {
            "detailid": "25",
            "name": "送崔九",
            "author": "裴迪"
        },
        {
            "detailid": "26",
            "name": "送灵澈",
            "author": "刘长卿"
        },
        {
            "detailid": "27",
            "name": "听弹琴",
            "author": "刘长卿"
        },
        {
            "detailid": "28",
            "name": "送上人",
            "author": "刘长卿"
        },
        {
            "detailid": "29",
            "name": "玉台体",
            "author": "权德舆"
        },
        {
            "detailid": "30",
            "name": "芙蓉楼送辛渐",
            "author": "王昌龄"
        },
        {
            "detailid": "31",
            "name": "闺怨",
            "author": "王昌龄"
        },
        {
            "detailid": "32",
            "name": "春宫曲",
            "author": "王昌龄"
        },
        {
            "detailid": "33",
            "name": "九月九日忆山东兄弟",
            "author": "王维"
        },
        {
            "detailid": "34",
            "name": "凉州词",
            "author": "王翰"
        }
    ]
}
                    

API错误码:

代号说明
201 关键词为空
203 没有信息

系统错误码:

代号说明
101 APPKEY为空或不存在
102 APPKEY已过期
103 APPKEY无请求此数据权限
104 请求超过次数限制
105 IP被禁止
106 IP请求超过限制
107 接口维护中
108 接口已停用

活动推荐ACTIVITY 更多

  • orc活动

其它推荐RECOMMENDED DATA 更多