赞
踩
一个提供开发中常用数据的一个稳定聚合 Api 接口,运行于独立服务器,免费,且长期维护,会持续添加新的接口!
GitHub 地址:RollToolsApi
推荐使用 https 接口更安全:https://www.mxnzp.com/api
之前的 http://www.mxnzp.com/api 可继续使用不受影响!
app_id=你的app_id&app_secret=你的app_secret
app_id
和app_secret
方式,扫描上方小程序码进行操作!说明: 所有的接口都会返回如下格式的数据,具体数据包装在data中,需要根据状态来确定请求是否成功。
请求方法: 所有的请求中都是大部分都是GET请求(如果有特殊情况,则会特殊标明)
数据返回格式:
{
"code": 1,
"msg": "数据返回成功",
"data": null
}
数据返回格式说明:
指定期号中奖号码
接口说明: 获取指定期号的双色球获奖号码信息
接口地址: [HOST]/lottery/ssq/aim_lottery?expect=2018135
参数说明: expect:彩票期号(七位)必传
返回数据:
数据样例:
{
"openCode": "01,03,06,10,11,29+16",
"code": "ssq",
"expect": "2018135",
"name": "双色球",
"time": "2018-11-18 21:18:20"
}
最新中奖号码信息
接口说明: 获取最新双色球中奖号码信息
接口地址: [HOST]/lottery/ssq/latest
参数说明: 无
返回数据:
数据样例:
{
"openCode": "10,12,15,25,26,27+14",
"code": "ssq",
"expect": "2018136",
"name": "双色球",
"time": "2018-11-20 21:18:20"
}
获取双色球中奖信息列表
接口说明: 获取最新双色球中奖号码信息
接口地址: [HOST]/lottery/ssq/lottery_list?page=1
参数说明: page 页号
返回数据:
page: 当前页数
totalCount: 总数量
totalPage: 总页数
limit: 每页数量
list: 每页具体数据
数据样例:
{
"page": 1,
"totalCount": 903,
"totalPage": 91,
"limit": 10,
"list": [
{
"openCode": "10,12,15,25,26,27+14",
"code": "ssq",
"expect": "2018136",
"name": "双色球",
"time": "2018-11-20 21:18:20"
},
{
"openCode": "01,03,06,10,11,29+16",
"code": "ssq",
"expect": "2018135",
"name": "双色球",
"time": "2018-11-18 21:18:20"
}
]
}
指定日期的节假日及万年历信息
接口说明: 获取指定日期的节假日及万年历信息
接口地址: [HOST]/holiday/single/{date} 【例如: [HOST]/holiday/single/20181121】
参数说明: date 日期 格式 yyyyMMdd
返回数据:
数据样例:
{
"code": 1,
"msg": "数据返回成功",
"data": {
"date": "2018-11-25",
"weekDay": 7,
"yearTips": "戊戌",
"type": 1,
"chineseZodiac": "狗",
"solarTerms": "小雪后",
"typeDes" : "休息日",
"avoid": "移徙.入宅.安门.作梁.安葬",
"lunarCalendar": "10-18",
"suit": "祭祀.祈福.求嗣.斋醮.沐浴.冠笄.出行.理发.拆卸.解除.起基.动土.定磉.安碓硙.开池.掘井.扫舍.除服.成服.移柩.启攒.立碑.谢土",
"dayOfYear": 329,
"weekOfYear": 47
}
}
指定多个日期的节假日及万年历信息
接口说明: 获取指定多个日期的节假日及万年历信息
接口地址: [HOST]/holiday/multi/{dates} 【例如: [HOST]/holiday/multi/20180101,20181010,20181011】
参数说明: dates 日期组 格式 yyyyMMdd,yyyyMMdd,yyyyMMdd (中间用英文逗号隔开)
返回数据:
数据样例:
{
"code": 1,
"msg": "数据返回成功",
"data": [
{
"date": "2018-01-01",
"weekDay": 1,
"yearTips": "丁酉",
"type": 2,
"chineseZodiac": "鸡",
"solarTerms": "冬至后",
"avoid": "出行.安葬.修坟.开市",
"lunarCalendar": "11-15",
"typeDes" : "元旦",
"suit": "祭祀.塑绘.开光.裁衣.冠笄.嫁娶.纳采.拆卸.修造.动土.竖柱.上梁.安床.移徙.入宅.安香.结网.捕捉.畋猎.伐木.进人口.放水",
"dayOfYear": 1,
"weekOfYear": 1
},
{
"date": "2018-10-10",
"weekDay": 3,
"yearTips": "戊戌",
"type": 0,
"chineseZodiac": "狗",
"solarTerms": "寒露后",
"typeDes" : "工作日",
"avoid": "造庙.嫁娶.掘井.栽种.造桥.作灶.动土",
"lunarCalendar": "9-2",
"suit": "祭祀.开光.出行.解除.伐木.作梁.出火.拆卸.入宅.移徙.安床.修造.造畜椆栖.扫舍",
"dayOfYear": 283,
"weekOfYear": 41
},
{
"date": "2018-10-11",
"weekDay": 4,
"yearTips": "戊戌",
"type": 0,
"typeDes" : "工作日",
"chineseZodiac": "狗",
"solarTerms": "寒露后",
"avoid": "入宅.上梁.斋醮.出火.谢土",
"lunarCalendar": "9-3",
"suit": "纳采.订盟.开市.交易.立券.会亲友.纳畜.牧养.问名.移徙.解除.作厕.入学.起基.安床.开仓.出货财.安葬.启攒.入殓.除服.成服",
"dayOfYear": 284,
"weekOfYear": 41
}
]
}
指定月份所有的节假日及万年历信息
接口说明: 获取指定月份的节假日及万年历信息
接口地址: [HOST]/holiday/list/month/{date} 【例如: [HOST]/holiday/list/month/201802】
参数说明: date 查询的月份 格式 yyyyMM (只有年月)
返回数据:
数据样例:
{
"code": 1,
"msg": "数据返回成功",
"data": [
{
"date": "2018-02-01",
"weekDay": 4,
"yearTips": "丁酉",
"type": 0,
"chineseZodiac": "鸡",
"typeDes" : "工作日",
"solarTerms": "大寒后",
"avoid": "开仓.嫁娶.移徙.入宅",
"lunarCalendar": "12-16",
"suit": "祭祀.沐浴.祈福.斋醮.订盟.纳采.裁衣.拆卸.起基.竖柱.上梁.安床.入殓.除服.成服.移柩.启攒.挂匾.求嗣.出行.合帐.造畜椆栖",
"dayOfYear": 32,
"weekOfYear": 5
},
...中间隐藏了"2018-02-02"~"2018-02-27"的数据
{
"date": "2018-02-28",
"weekDay": 3,
"yearTips": "戊戌",
"type": 0,
"chineseZodiac": "狗",
"typeDes" : "工作日",
"solarTerms": "雨水后",
"avoid": "掘井",
"lunarCalendar": "1-13",
"suit": "祭祀.斋醮.裁衣.合帐.冠笄.订盟.纳采.嫁娶.入宅.安香.谢土.入殓.移柩.破土.立碑.安香.会亲友.出行.祈福.求嗣.立碑.上梁.放水",
"dayOfYear": 59,
"weekOfYear": 9
}
]
}
指定年份指定类型的所有的节假日及万年历信息
接口说明: 获取指定月份的节假日及万年历信息
接口地址: [HOST]/holiday/list/year/{date}/{type} 【例如: [HOST]/holiday/list/year/2018/rest】
参数说明: date 查询的月份 格式 yyyy (只有年份),type 需要查询的类型{可选值:类型 workday 工作日 holiday 节假日 rest 休息日 festival 节日}
返回数据:
数据样例:
{
"code": 1,
"msg": "数据返回成功,域名已经成功备案,为了更优雅的调用,不久后将废弃8091端口,请尽快使用新域名直接调用,多有不便敬请谅解",
"data": [
{
"month": 1,
"year": 2018,
"days": [
{
"date": "2018-01-06",
"weekDay": 6,
"yearTips": "丁酉",
"type": 1,
"typeDes": "休息日",
"chineseZodiac": "鸡",
"solarTerms": "小寒后",
"avoid": "嫁娶.开市.入宅.安床.破土.安葬",
"lunarCalendar": "冬月廿",
"suit": "祭祀.斋醮.纳财.捕捉.畋猎",
"dayOfYear": 6,
"weekOfYear": 1
},
...中间还有一些数据没有显示...
{
"date": "2018-01-28",
"weekDay": 7,
"yearTips": "丁酉",
"type": 1,
"typeDes": "休息日",
"chineseZodiac": "鸡",
"solarTerms": "大寒后",
"avoid": "祈福.嫁娶.造庙.安床.谢土",
"lunarCalendar": "腊月十二",
"suit": "纳采.订盟.祭祀.求嗣.出火.塑绘.裁衣.会亲友.入学.拆卸.扫舍.造仓.挂匾.掘井.开池.结网.栽种.纳畜.破土.修坟.立碑.安葬.入殓",
"dayOfYear": 28,
"weekOfYear": 4
}
]
},
...中间有2月到11月的数据没有展示...
{
"month": 12,
"year": 2018,
"days": [
{
"date": "2018-12-01",
"weekDay": 6,
"yearTips": "戊戌",
"type": 1,
"typeDes": "休息日",
"chineseZodiac": "狗",
"solarTerms": "小雪后",
"avoid": "作灶.治病",
"lunarCalendar": "十月廿四",
"suit": "祭祀.祈福.订盟.纳采.裁衣.拆卸.修造.动土.起基.安床.移徙.入宅.安香.入殓.移柩.安葬.谢土.赴任.进人口.会亲友",
"dayOfYear": 335,
"weekOfYear": 48
},
...中间还有一些数据没有显示...
{
"date": "2018-12-30",
"weekDay": 7,
"yearTips": "戊戌",
"type": 1,
"typeDes": "元旦",
"chineseZodiac": "狗",
"solarTerms": "冬至后",
"avoid": null,
"lunarCalendar": "冬月廿四",
"suit": "塑绘.斋醮.出行.拆卸.解除.修造.移徙.造船.入殓.除服.成服.移柩.启攒.修坟.立碑.谢土",
"dayOfYear": 364,
"weekOfYear": 52
}
]
}
]
}
全国城市列表
接口说明: 获取全国城市列表信息
接口地址: [HOST]/address/list
参数说明: 无参
返回数据:
数据样例:
{
"code":1,
"msg":"数据返回成功",
"data":[
{
"code":"130000",
"name":"河北省",
"pchilds":[
{
"code":"130100",
"name":"石家庄市",
"cchilds":[
{
"code":"130101",
"name":"市辖区"
},
{
"code":"130102",
"name":"长安区"
},
...这里只显示了两个区...
]
},
{
"code":"130200",
"name":"唐山市",
"cchilds":[
{
"code":"130201",
"name":"市辖区"
},
{
"code":"130202",
"name":"路南区"
},
...这里只显示了两个区...
]
},
...这里只显示了两个市...
]
}
...这里只显示了一个省...
]
}
搜索全国城市列表
接口说明: 搜索全国城市列表信息
接口地址: [HOST]/address/search 【例如: [HOST]/address/search?type=1&value=深圳】
参数说明:
返回数据:
数据样例:
{
"code": 1,
"msg": "数据返回成功",
"data": [
{
"code": "440000",
"name": "广东省",
"pchilds": [
{
"code": "440300",
"name": "深圳市",
"cchilds": [
{
"code": "440301",
"name": "市辖区"
},
{
"code": "440303",
"name": "罗湖区"
},
...这里只显示了两个区...
]
}
]
}
]
}
获取访问者的 ip 地址信息
接口说明: 获取访问者的ip地址信息,先获取您的ip地址,再进行解析
接口地址: [HOST]/ip/self
参数说明: 无参
返回数据:
数据样例:
{
"code": 1,
"msg": "数据返回成功",
"data": {
"ip": "119.123.72.166",
"province": "广东省",
"provinceId": 440000,
"city": "深圳市",
"cityId": 440300,
"isp": "电信",
"desc": "广东省深圳市 电信"
}
}
获取指定 ip 的 ip 地址信息
接口说明: 获取指定ip的ip地址信息
接口地址: [HOST]/ip/aim_ip?ip=? 【例如: [HOST]/ip/aim_ip?ip=119.123.72.166】
参数说明: ip 被查询的ip地址 需保证是正确的ip地址格式
返回数据:
数据样例:
{
"code": 1,
"msg": "数据返回成功",
"data": {
"ip": "119.123.72.166",
"province": "广东省",
"provinceId": 440000,
"city": "深圳市",
"cityId": 440300,
"isp": "电信",
"desc": "广东省深圳市 电信"
}
}
获取不重复长ID
接口说明: 获取不重复长ID信息
接口地址: [HOST]/tools/no_repeat_id/long
参数说明: 无参
返回数据:
数据样例:
{
"code": 1,
"msg": "数据返回成功",
"data": {
"id": "8a2a789976e64a1c9455ebd90853d4c6"
}
}
获取不重复短ID
接口说明: 获取不重复短ID信息
接口地址: [HOST]/tools/no_repeat_id/short
参数说明: 无参
返回数据:
数据样例:
{
"code": 1,
"msg": "数据返回成功",
"data": {
"id": "jlazntmtjrvcrpnb"
}
}
获取特定城市今日天气
接口说明: 获取特定城市今日天气信息
接口地址: [HOST]/weather/current/{城市名} 【例如: [HOST]/weather/current/深圳市】
参数说明: {城市名} 传入你需要查询的城市,请尽量传入完整值,否则系统会自行匹配,可能会有误差
返回数据:
数据样例:
{
"code": 1,
"msg": "数据返回成功",
"data": {
"address": "广东省 深圳市",
"cityCode": "440300",
"temp": "18℃",
"weather": "小雨",
"windDirection": "东北",
"windPower": "≤3级",
"humidity": "92%",
"reportTime": "2018-11-27 22:40:53"
}
}
获取特定城市今天及未来天气
接口说明: 获取特定城市今天及未来天气信息
接口地址: [HOST]/weather/forecast/{城市名} 【例如: [HOST]/weather/forecast/深圳市】
参数说明: {城市名} 传入你需要查询的城市,请尽量传入完整值,否则系统会自行匹配,可能会有误差
返回数据:
address: 城市具体信息,比如 “广东省 深圳市”
cityCode: 城市code
reportTime: 此次天气发布时间
forecasts: 今天及未来天气列表
数据样例:
{
"code": 1,
"msg": "数据返回成功",
"data": {
"address": "广东省 深圳市",
"cityCode": "440300",
"reportTime": "2018-11-27 22:40:53",
"forecasts": [
{
"date": "2018-11-27",
"dayOfWeek": "2",
"dayWeather": "阵雨",
"nightWeather": "小雨",
"dayTemp": "22℃",
"nightTemp": "17℃",
"dayWindDirection": "无风向",
"nightWindDirection": "无风向",
"dayWindPower": "≤3级",
"nightWindPower": "≤3级"
},
...这里只显示了一条数据...
]
}
}
赞
踩
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。