稳定、快速、免费的 API 接口服务
看一看历史上的今天都发生了什么
接口地址: https://api.52vmy.cn/api/wl/today/new
返回格式: JSON
请求方式: GET
请求示例: https://api.52vmy.cn/api/wl/today/new
接口定制: 点此加入用户群
默认QPS: 每2秒最多4次 携带Token可无视限制
请求参数说明:
| 名称 | 必填 | 类型 | 说明 |
|---|---|---|---|
| id | 否 | string | 查询数据的ID |
| day | 否 | string | 查询日期,0101 |
| type | 是 | string | 返回格式默认JSON可选text |
返回参数说明:
| 名称 | 类型 | 说明 |
|---|
返回示例:
{
"code": 200,
"msg": "成功",
"data": [
{
"id": 1,
"year": "1529年06月08日",
"title": "中世纪的一次重大宗教战争——卡佩尔战争爆发"
},
{
"id": 2,
"year": "1810年06月08日",
"title": "德国作曲家舒曼诞辰"
},
{
"id": 3,
"year": "1881年06月08日",
"title": "清政府撤回留美学生"
},
{
"id": 4,
"year": "1921年06月08日",
"title": "印尼前总统苏哈托诞生"
},
{
"id": 5,
"year": "1932年06月08日",
"title": "作曲家、民族乐器演奏家刘天华逝世"
},
{
"id": 6,
"year": "1937年06月08日",
"title": "国共两党庐山谈判"
},
{
"id": 7,
"year": "1950年06月08日",
"title": "我国与缅甸建交"
},
{
"id": 8,
"year": "1957年06月08日",
"title": "毛泽东亲自起草“反右”文件"
},
{
"id": 9,
"year": "1958年06月08日",
"title": "大跃进运动放出第一颗亩产卫星"
},
{
"id": 10,
"year": "1967年06月08日",
"title": "抗日名将蒋光鼐逝世"
},
{
"id": 11,
"year": "1985年06月08日",
"title": "胡风病逝"
},
{
"id": 12,
"year": "1994年06月08日",
"title": "中科院首批外籍院士产生"
},
{
"id": 13,
"year": "1997年06月08日",
"title": "美公布教堂纵火案调查报告"
},
{
"id": 14,
"year": "2003年06月08日",
"title": "宁波杭州湾跨海大桥奠基"
}
]
}
PHP代码示例:
$id = $_GET["id"]; $day = $_GET["day"]; $type = $_GET["type"]; $url = "https://api.52vmy.cn/api/wl/today/new?id=".$id."&day=".$day."&type=".$type; echo file_get_contents($url);