基础信息
查看接口基本信息和返回格式 接口描述
获取最新猫眼电影实时票房名单
七日请求统计
本周总请求: -
日均: -
请求方式
GET
POST 推荐
请求地址
https://api.cxzja.cn/api/piaofang
返回方式
JSON
默认返回格式,包含完整数据结构
返回预览
JSON
{
"code": 200,
"msg": "获取成功",
"data": [
{
"top": 1,
"movieName": "四渡",
"releaseInfo": "上映5天",
"sumBoxDesc": "1.01亿",
"boxRate": "32.4%",
"showCount": 89949,
"showCountRate": "23.5%",
"avgShowView": "0.7",
"avgSeatView": "0.5%"
},
{
"top": 2,
"movieName": "后室",
"releaseInfo": "上映5天",
"sumBoxDesc": "4448.3万",
"boxRate": "16.2%",
"showCount": 49143,
"showCountRate": "12.8%",
"avgShowView": "0.6",
"avgSeatView": "0.5%"
},
{
"top": 3,
"movieName": "玩具总动员5",
"releaseInfo": "上映12天",
"sumBoxDesc": "2.09亿",
"boxRate": "15.9%",
"showCount": 56412,
"showCountRate": "14.7%",
"avgShowView": "0.5",
"avgSeatView": "0.3%"
},
{
"top": 4,
"movieName": "给阿嬷的情书",
"releaseInfo": "上映62天",
"sumBoxDesc": "19.23亿",
"boxRate": "12.6%",
"showCount": 58317,
"showCountRate": "15.2%",
"avgShowView": "0.4",
"avgSeatView": "0.3%"
},
{
"top": 5,
"movieName": "抓特务",
"releaseInfo": "上映12天",
"sumBoxDesc": "1.01亿",
"boxRate": "4.9%",
"showCount": 32085,
"showCountRate": "8.4%",
"avgShowView": "0.3",
"avgSeatView": "0.2%"
},
{
"top": 6,
"movieName": "魔方小姐",
"releaseInfo": "上映首日",
"sumBoxDesc": "624.9万",
"boxRate": "3.5%",
"showCount": 12957,
"showCountRate": "3.3%",
"avgShowView": "0.6",
"avgSeatView": "0.5%"
},
{
"top": 7,
"movieName": "热血足球少年·英雄初升",
"releaseInfo": "上映4天",
"sumBoxDesc": "57.1万",
"boxRate": "2.5%",
"showCount": 190,
"showCountRate": "<0.1%",
"avgShowView": "19.2",
"avgSeatView": "17.9%"
},
{
"top": 8,
"movieName": "火遮眼",
"releaseInfo": "上映20天",
"sumBoxDesc": "1.96亿",
"boxRate": "1.9%",
"showCount": 22007,
"showCountRate": "5.7%",
"avgShowView": "0.2",
"avgSeatView": "0.1%"
},
{
"top": 9,
"movieName": "消失的人",
"releaseInfo": "上映61天",
"sumBoxDesc": "5.67亿",
"boxRate": "1.5%",
"showCount": 6596,
"showCountRate": "1.7%",
"avgShowView": "0.5",
"avgSeatView": "0.5%"
},
{
"top": 10,
"movieName": "超级少女",
"releaseInfo": "上映5天",
"sumBoxDesc": "637.5万",
"boxRate": "1.1%",
"showCount": 10785,
"showCountRate": "2.8%",
"avgShowView": "0.2",
"avgSeatView": "0.1%"
},
{
"top": 11,
"movieName": "我看见两朵一样的云",
"releaseInfo": "上映12天",
"sumBoxDesc": "5324.6万",
"boxRate": "0.8%",
"showCount": 6280,
"showCountRate": "1.6%",
"avgShowView": "0.3",
"avgSeatView": "0.3%"
},
{
"top": 12,
"movieName": "三国第一部:争洛阳",
"releaseInfo": "点映",
"sumBoxDesc": "147.3万",
"boxRate": "0.8%",
"showCount": 2095,
"showCountRate": "0.5%",
"avgShowView": "0.8",
"avgSeatView": "0.6%"
},
{
"top": 13,
"movieName": "爱是愤怒",
"releaseInfo": "上映12天",
"sumBoxDesc": "3606.1万",
"boxRate": "0.6%",
"showCount": 7077,
"showCountRate": "1.8%",
"avgShowView": "0.2",
"avgSeatView": "0.1%"
},
{
"top": 14,
"movieName": "关索岭",
"releaseInfo": "上映6天",
"sumBoxDesc": "78.2万",
"boxRate": "0.4%",
"showCount": 7228,
"showCountRate": "1.8%",
"avgShowView": "0.1",
"avgSeatView": "0.0%"
},
{
"top": 15,
"movieName": "揭秘日",
"releaseInfo": "上映19天",
"sumBoxDesc": "3201.5万",
"boxRate": "0.4%",
"showCount": 1232,
"showCountRate": "0.3%",
"avgShowView": "0.6",
"avgSeatView": "0.5%"
},
{
"top": 16,
"movieName": "我的爱人",
"releaseInfo": "上映4天",
"sumBoxDesc": "79.9万",
"boxRate": "0.4%",
"showCount": 1364,
"showCountRate": "0.3%",
"avgShowView": "0.7",
"avgSeatView": "0.7%"
},
{
"top": 17,
"movieName": "诺曼底72小时",
"releaseInfo": "上映25天",
"sumBoxDesc": "2202.5万",
"boxRate": "0.3%",
"showCount": 1083,
"showCountRate": "0.2%",
"avgShowView": "0.6",
"avgSeatView": "0.6%"
},
{
"top": 18,
"movieName": "万桐书",
"releaseInfo": "上映72天",
"sumBoxDesc": "1305.1万",
"boxRate": "0.3%",
"showCount": 57,
"showCountRate": "<0.1%",
"avgShowView": "10.5",
"avgSeatView": "13.3%"
},
{
"top": 19,
"movieName": "小气鬼",
"releaseInfo": "上映4天",
"sumBoxDesc": "222.8万",
"boxRate": "0.2%",
"showCount": 3386,
"showCountRate": "0.8%",
"avgShowView": "0.2",
"avgSeatView": "0.1%"
},
{
"top": 20,
"movieName": "一个部门的诞生",
"releaseInfo": "上映4天",
"sumBoxDesc": "94.0万",
"boxRate": "0.2%",
"showCount": 2148,
"showCountRate": "0.5%",
"avgShowView": "0.3",
"avgSeatView": "0.3%"
},
{
"top": 21,
"movieName": "蓝蓝的天上白云飘",
"releaseInfo": "上映首日",
"sumBoxDesc": "4.4万",
"boxRate": "0.2%",
"showCount": 3522,
"showCountRate": "0.9%",
"avgShowView": "0.1",
"avgSeatView": "0.1%"
},
{
"top": 22,
"movieName": "绝密任务",
"releaseInfo": "上映12天",
"sumBoxDesc": "436.7万",
"boxRate": "0.2%",
"showCount": 593,
"showCountRate": "0.1%",
"avgShowView": "0.5",
"avgSeatView": "0.6%"
},
{
"top": 23,
"movieName": "星球大战:曼达洛人与古古",
"releaseInfo": "上映40天",
"sumBoxDesc": "9256.6万",
"boxRate": "0.1%",
"showCount": 476,
"showCountRate": "0.1%",
"avgShowView": "0.6",
"avgSeatView": "0.5%"
},
{
"top": 24,
"movieName": "手捧繁星",
"releaseInfo": "",
"sumBoxDesc": "1.2万",
"boxRate": "0.1%",
"showCount": 3,
"showCountRate": "<0.1%",
"avgShowView": "146.3",
"avgSeatView": "100.0%"
},
{
"top": 25,
"movieName": "爸爸",
"releaseInfo": "上映4天",
"sumBoxDesc": "84.0万",
"boxRate": "0.1%",
"showCount": 900,
"showCountRate": "0.2%",
"avgShowView": "0.3",
"avgSeatView": "0.3%"
},
{
"top": 26,
"movieName": "不成功穿越指南",
"releaseInfo": "点映",
"sumBoxDesc": "17.5万",
"boxRate": "0.1%",
"showCount": 69,
"showCountRate": "<0.1%",
"avgShowView": "2.7",
"avgSeatView": "3.5%"
},
{
"top": 27,
"movieName": "这,就是青春",
"releaseInfo": "上映72天",
"sumBoxDesc": "20.6万",
"boxRate": "0.1%",
"showCount": 3,
"showCountRate": "<0.1%",
"avgShowView": "49.3",
"avgSeatView": "60.4%"
},
{
"top": 28,
"movieName": "浴血困牛山",
"releaseInfo": "上映58天",
"sumBoxDesc": "509.3万",
"boxRate": "<0.1%",
"showCount": 2,
"showCountRate": "<0.1%",
"avgShowView": "123.5",
"avgSeatView": "100.0%"
},
{
"top": 29,
"movieName": "北回归线以北",
"releaseInfo": "上映5天",
"sumBoxDesc": "173.9万",
"boxRate": "<0.1%",
"showCount": 702,
"showCountRate": "0.1%",
"avgShowView": "0.3",
"avgSeatView": "0.2%"
},
{
"top": 30,
"movieName": "蝴蝶楼·惊魂",
"releaseInfo": "上映89天",
"sumBoxDesc": "1.15亿",
"boxRate": "<0.1%",
"showCount": 808,
"showCountRate": "0.2%",
"avgShowView": "0.2",
"avgSeatView": "0.2%"
},
{
"top": 31,
"movieName": "寒战1994",
"releaseInfo": "上映61天",
"sumBoxDesc": "2.96亿",
"boxRate": "<0.1%",
"showCount": 86,
"showCountRate": "<0.1%",
"avgShowView": "1.8",
"avgSeatView": "2.0%"
},
{
"top": 32,
"movieName": "阴风诡影",
"releaseInfo": "上映12天",
"sumBoxDesc": "281.7万",
"boxRate": "<0.1%",
"showCount": 2105,
"showCountRate": "0.5%",
"avgShowView": "<0.1",
"avgSeatView": "0.0%"
},
{
"top": 33,
"movieName": "那山那水",
"releaseInfo": "",
"sumBoxDesc": "16.3万",
"boxRate": "<0.1%",
"showCount": 29,
"showCountRate": "<0.1%",
"avgShowView": "4.5",
"avgSeatView": "4.2%"
},
{
"top": 34,
"movieName": "惊蛰无声",
"releaseInfo": "",
"sumBoxDesc": "13.65亿",
"boxRate": "<0.1%",
"showCount": 3,
"showCountRate": "<0.1%",
"avgShowView": "18.0",
"avgSeatView": "16.9%"
},
{
"top": 35,
"movieName": "大鱼海棠",
"releaseInfo": "",
"sumBoxDesc": "5.74亿",
"boxRate": "<0.1%",
"showCount": 105,
"showCountRate": "<0.1%",
"avgShowView": "0.6",
"avgSeatView": "0.5%"
},
{
"top": 36,
"movieName": "迈克尔·杰克逊:巨星之路",
"releaseInfo": "上映68天",
"sumBoxDesc": "7133.2万",
"boxRate": "<0.1%",
"showCount": 66,
"showCountRate": "<0.1%",
"avgShowView": "0.9",
"avgSeatView": "0.9%"
},
{
"top": 37,
"movieName": "加菲猫家族",
"releaseInfo": "",
"sumBoxDesc": "1.90亿",
"boxRate": "<0.1%",
"showCount": 108,
"showCountRate": "<0.1%",
"avgShowView": "0.5",
"avgSeatView": "0.6%"
},
{
"top": 38,
"movieName": "飓风",
"releaseInfo": "",
"sumBoxDesc": "11.7万",
"boxRate": "<0.1%",
"showCount": 1,
"showCountRate": "<0.1%",
"avgShowView": "44.0",
"avgSeatView": "12.9%"
},
{
"top": 39,
"movieName": "八子参军",
"releaseInfo": "上映89天",
"sumBoxDesc": "42.0万",
"boxRate": "<0.1%",
"showCount": 1,
"showCountRate": "<0.1%",
"avgShowView": "88.0",
"avgSeatView": "48.0%"
},
{
"top": 40,
"movieName": "绵羊侦探团",
"releaseInfo": "上映46天",
"sumBoxDesc": "2230.1万",
"boxRate": "<0.1%",
"showCount": 51,
"showCountRate": "<0.1%",
"avgShowView": "0.6",
"avgSeatView": "0.7%"
},
{
"top": 41,
"movieName": "记忆碎片",
"releaseInfo": "上映33天",
"sumBoxDesc": "2335.2万",
"boxRate": "<0.1%",
"showCount": 49,
"showCountRate": "<0.1%",
"avgShowView": "0.7",
"avgSeatView": "0.7%"
},
{
"top": 42,
"movieName": "幻影游船",
"releaseInfo": "上映4天",
"sumBoxDesc": "33.2万",
"boxRate": "<0.1%",
"showCount": 450,
"showCountRate": "0.1%",
"avgShowView": "<0.1",
"avgSeatView": "0.0%"
},
{
"top": 43,
"movieName": "超级马力欧银河大电影",
"releaseInfo": "上映89天",
"sumBoxDesc": "1.54亿",
"boxRate": "<0.1%",
"showCount": 131,
"showCountRate": "<0.1%",
"avgShowView": "0.2",
"avgSeatView": "0.2%"
},
{
"top": 44,
"movieName": "加油吧!娜依拉",
"releaseInfo": "上映25天",
"sumBoxDesc": "193.6万",
"boxRate": "<0.1%",
"showCount": 21,
"showCountRate": "<0.1%",
"avgShowView": "0.7",
"avgSeatView": "0.9%"
},
{
"top": 45,
"movieName": "纵横四海",
"releaseInfo": "上映59天",
"sumBoxDesc": "1296.5万",
"boxRate": "<0.1%",
"showCount": 24,
"showCountRate": "<0.1%",
"avgShowView": "0.9",
"avgSeatView": "1.2%"
},
{
"top": 46,
"movieName": "猪猪侠大电影之竞速小英雄",
"releaseInfo": "上映61天",
"sumBoxDesc": "2785.0万",
"boxRate": "<0.1%",
"showCount": 184,
"showCountRate": "<0.1%",
"avgShowView": "0.1",
"avgSeatView": "0.1%"
},
{
"top": 47,
"movieName": "寂静的朋友",
"releaseInfo": "上映67天",
"sumBoxDesc": "519.0万",
"boxRate": "<0.1%",
"showCount": 10,
"showCountRate": "<0.1%",
"avgShowView": "1.3",
"avgSeatView": "2.2%"
},
{
"top": 48,
"movieName": "庐山恋",
"releaseInfo": "",
"sumBoxDesc": "2421",
"boxRate": "<0.1%",
"showCount": 1,
"showCountRate": "<0.1%",
"avgShowView": "12.0",
"avgSeatView": "25.0%"
},
{
"top": 49,
"movieName": "海洋之谜",
"releaseInfo": "",
"sumBoxDesc": "102.0万",
"boxRate": "<0.1%",
"showCount": 1,
"showCountRate": "<0.1%",
"avgShowView": "12.0",
"avgSeatView": "3.5%"
},
{
"top": 50,
"movieName": "我们的名字",
"releaseInfo": "上映2天",
"sumBoxDesc": "1.9万",
"boxRate": "<0.1%",
"showCount": 17,
"showCountRate": "<0.1%",
"avgShowView": "0.9",
"avgSeatView": "0.7%"
},
{
"top": 51,
"movieName": "特立独行",
"releaseInfo": "点映",
"sumBoxDesc": "278.3万",
"boxRate": "<0.1%",
"showCount": 12,
"showCountRate": "<0.1%",
"avgShowView": "1.6",
"avgSeatView": "1.2%"
},
{
"top": 52,
"movieName": "只此青绿",
"releaseInfo": "",
"sumBoxDesc": "5422.3万",
"boxRate": "<0.1%",
"showCount": 12,
"showCountRate": "<0.1%",
"avgShowView": "1.6",
"avgSeatView": "1.8%"
},
{
"top": 53,
"movieName": "宇宙巨人:希曼崛起",
"releaseInfo": "上映26天",
"sumBoxDesc": "1080.5万",
"boxRate": "<0.1%",
"showCount": 78,
"showCountRate": "<0.1%",
"avgShowView": "0.2",
"avgSeatView": "0.1%"
},
{
"top": 54,
"movieName": "只想比你多活一天",
"releaseInfo": "上映90天",
"sumBoxDesc": "2.1万",
"boxRate": "<0.1%",
"showCount": 1,
"showCountRate": "<0.1%",
"avgShowView": "10.0",
"avgSeatView": "50.0%"
},
{
"top": 55,
"movieName": "心犬相随",
"releaseInfo": "展映",
"sumBoxDesc": "137.6万",
"boxRate": "<0.1%",
"showCount": 64,
"showCountRate": "<0.1%",
"avgShowView": "0.2",
"avgSeatView": "0.2%"
},
{
"top": 56,
"movieName": "秋天的童话",
"releaseInfo": "展映",
"sumBoxDesc": "19.1万",
"boxRate": "<0.1%",
"showCount": 1,
"showCountRate": "<0.1%",
"avgShowView": "10.0",
"avgSeatView": "7.6%"
},
{
"top": 57,
"movieName": "午夜车库",
"releaseInfo": "上映26天",
"sumBoxDesc": "399.0万",
"boxRate": "<0.1%",
"showCount": 153,
"showCountRate": "<0.1%",
"avgShowView": "<0.1",
"avgSeatView": "0.0%"
},
{
"top": 58,
"movieName": "维米尔·旷世大展",
"releaseInfo": "上映40天",
"sumBoxDesc": "47.8万",
"boxRate": "<0.1%",
"showCount": 9,
"showCountRate": "<0.1%",
"avgShowView": "0.9",
"avgSeatView": "1.1%"
},
{
"top": 59,
"movieName": "穿普拉达的女王2",
"releaseInfo": "上映62天",
"sumBoxDesc": "1.04亿",
"boxRate": "<0.1%",
"showCount": 16,
"showCountRate": "<0.1%",
"avgShowView": "0.5",
"avgSeatView": "0.8%"
},
{
"top": 60,
"movieName": "森中有林",
"releaseInfo": "上映39天",
"sumBoxDesc": "1618.2万",
"boxRate": "<0.1%",
"showCount": 15,
"showCountRate": "<0.1%",
"avgShowView": "0.8",
"avgSeatView": "0.9%"
},
{
"top": 61,
"movieName": "登月(第一部)",
"releaseInfo": "上映68天",
"sumBoxDesc": "271.1万",
"boxRate": "<0.1%",
"showCount": 10,
"showCountRate": "<0.1%",
"avgShowView": "0.9",
"avgSeatView": "0.8%"
},
{
"top": 62,
"movieName": "青铜葵花",
"releaseInfo": "上映54天",
"sumBoxDesc": "315.0万",
"boxRate": "<0.1%",
"showCount": 10,
"showCountRate": "<0.1%",
"avgShowView": "0.9",
"avgSeatView": "1.2%"
},
{
"top": 63,
"movieName": "过春天",
"releaseInfo": "",
"sumBoxDesc": "1032.6万",
"boxRate": "<0.1%",
"showCount": 1,
"showCountRate": "<0.1%",
"avgShowView": "11.0",
"avgSeatView": "15.0%"
},
{
"top": 64,
"movieName": "钟馗",
"releaseInfo": "上映32天",
"sumBoxDesc": "2350.9万",
"boxRate": "<0.1%",
"showCount": 143,
"showCountRate": "<0.1%",
"avgShowView": "<0.1",
"avgSeatView": "0.0%"
},
{
"top": 65,
"movieName": "呼啸山庄",
"releaseInfo": "",
"sumBoxDesc": "3948.6万",
"boxRate": "<0.1%",
"showCount": 4,
"showCountRate": "<0.1%",
"avgShowView": "1.8",
"avgSeatView": "4.1%"
},
{
"top": 66,
"movieName": "营救飞虎",
"releaseInfo": "",
"sumBoxDesc": "3341.7万",
"boxRate": "<0.1%",
"showCount": 2,
"showCountRate": "<0.1%",
"avgShowView": "3.0",
"avgSeatView": "3.1%"
},
{
"top": 67,
"movieName": "小马宝莉:新世代",
"releaseInfo": "",
"sumBoxDesc": "2753.7万",
"boxRate": "<0.1%",
"showCount": 4,
"showCountRate": "<0.1%",
"avgShowView": "1.8",
"avgSeatView": "2.3%"
},
{
"top": 68,
"movieName": "续范亭将军",
"releaseInfo": "上映3天",
"sumBoxDesc": "1.0万",
"boxRate": "<0.1%",
"showCount": 17,
"showCountRate": "<0.1%",
"avgShowView": "0.4",
"avgSeatView": "0.4%"
},
{
"top": 69,
"movieName": "10间敢死队",
"releaseInfo": "上映61天",
"sumBoxDesc": "7192.3万",
"boxRate": "<0.1%",
"showCount": 18,
"showCountRate": "<0.1%",
"avgShowView": "0.3",
"avgSeatView": "0.2%"
},
{
"top": 70,
"movieName": "凌晨两点半4",
"releaseInfo": "上映47天",
"sumBoxDesc": "109.3万",
"boxRate": "<0.1%",
"showCount": 8,
"showCountRate": "<0.1%",
"avgShowView": "0.5",
"avgSeatView": "0.3%"
},
{
"top": 71,
"movieName": "救赎者",
"releaseInfo": "上映5天",
"sumBoxDesc": "11.9万",
"boxRate": "<0.1%",
"showCount": 5,
"showCountRate": "<0.1%",
"avgShowView": "0.4",
"avgSeatView": "0.3%"
},
{
"top": 72,
"movieName": "花伴雨",
"releaseInfo": "上映21天",
"sumBoxDesc": "47.2万",
"boxRate": "<0.1%",
"showCount": 22,
"showCountRate": "<0.1%",
"avgShowView": "0.1",
"avgSeatView": "0.0%"
},
{
"top": 73,
"movieName": "无微不至",
"releaseInfo": "上映12天",
"sumBoxDesc": "43.2万",
"boxRate": "<0.1%",
"showCount": 24,
"showCountRate": "<0.1%",
"avgShowView": "<0.1",
"avgSeatView": "0.0%"
},
{
"top": 74,
"movieName": "午夜怨灵",
"releaseInfo": "上映42天",
"sumBoxDesc": "239.8万",
"boxRate": "<0.1%",
"showCount": 27,
"showCountRate": "<0.1%",
"avgShowView": "<0.1",
"avgSeatView": "0.0%"
},
{
"top": 75,
"movieName": "走马观花",
"releaseInfo": "上映19天",
"sumBoxDesc": "5.3万",
"boxRate": "<0.1%",
"showCount": 2,
"showCountRate": "<0.1%",
"avgShowView": "1.0",
"avgSeatView": "1.6%"
},
{
"top": 76,
"movieName": "极限逃生",
"releaseInfo": "上映26天",
"sumBoxDesc": "682.7万",
"boxRate": "<0.1%",
"showCount": 37,
"showCountRate": "<0.1%",
"avgShowView": "<0.1",
"avgSeatView": "0.0%"
},
{
"top": 77,
"movieName": "陵水誓言",
"releaseInfo": "上映16天",
"sumBoxDesc": "4.5万",
"boxRate": "<0.1%",
"showCount": 4,
"showCountRate": "<0.1%",
"avgShowView": "0.3",
"avgSeatView": "0.2%"
},
{
"top": 78,
"movieName": "森林之声",
"releaseInfo": "上映32天",
"sumBoxDesc": "476.5万",
"boxRate": "<0.1%",
"showCount": 4,
"showCountRate": "<0.1%",
"avgShowView": "0.3",
"avgSeatView": "0.3%"
}
],
"api_source": "API官网:api.cxzja.cn",
"timestamp": "2026-06-30 09:31:25"
}计费标准
了解接口的计费方式和价格
免费接口
免费
完全免费
所有用户均可免费调用,无需付费
QPS限制
普通用户
不限
会员用户
不限
每日请求次数
普通用户
不限
会员用户
不限
安全认证
了解接口的认证方式和访问凭证管理 Token 认证
实名认证
无需实名认证
本接口对所有用户开放,无需实名认证即可访问
认证方式
推荐
Header 认证
通过 HTTP Header 传递认证信息
Authorization
Bearer {access_token}或通过curl请求参数传递:
curl
curl "https://api.cxzja.cn/api/piaofang?token=YOUR_TOKEN"
参数文档
查看接口请求参数和返回字段说明 请求参数
| 参数名 | 类型 | 必填 | 默认值 | 可选值 | 说明 |
|---|---|---|---|---|---|
| token | string | 必填 | 无 | 登录后显示你的请求token | 接口请求唯一认证标识! |
| mode | string | 可选 | json | json | 返回格式 |
返回参数
| 字段名 | 类型 | 说明 |
|---|---|---|
code
|
int | 返回状态码 |
状态码
了解接口返回的状态码含义及处理方式 接口状态码
| 状态码 | 说明 |
|---|---|
| 200 | 请求成功 |
| 201 | 请求失败 |
服务器状态码
| 状态码 | 说明 |
|---|---|
| 500 | 服务器错误 |
| 501 | 请求接口不存在 |
| 502 | 请求接口已下架 |
| 503 | 请求接口维护中 |
| 504 | 缺少请求token参数 |
| 505 | 请求token不存在 |
| 506 | 请求token已被封禁 |
| 507 | 请求token额度不足 |
| 508 | 今日请求token已达上限 |
| 509 | 请求ip不在token白名单内 |
| 510 | 请求token无权使用当前接口 |
| 511 | 接口请求频率过高,请稍后再试 |
| 512 | 该接口未开启在线测试功能 |
| 513 | 今日在线测试次数已达上限 |
| 514 | 今日该接口请求次数已达上限 |
| 515 | 该接口为会员专属接口,请携带会员token |
| 516 | 该接口为会员专属接口,请开通会员 |
| 517 | 接口请求过于频繁,已被临时限制 |
| 518 | 该接口需要实名认证,请先完成实名认证 |
| 519 | 当前Token今日请求次数已达上限 |
| 520 | 当前Token已被禁止使用 |
| 521 | 请求token余额不足 |
| 522 | 请求token额度和余额均不足 |
| 530 | 接口服务异常,请稍后再试 |
| 531 | 接口响应超时 |
| 532 | 接口返回数据格式错误 |
| 533 | 接口请求失败 |
在线测试
在线调试接口,实时查看响应结果 发起请求
GET/POST
示例代码
多种语言的接口调用示例PHP
JavaScript
NodeJs
Python
Go
Java
C#
C
C++
易语言
PHP
<?php
$API_TOKEN = 'YOUR_TOKEN';
$API_URL = 'https://api.cxzja.cn/api/piaofang';
$params = array(
'token' => 'YOUR_TOKEN',
'mode' => 'json',
);
$res = api::send($API_URL, $params, 'GET/POST');
print($res);
class api {
public static function send($url, $data, $type) {
$data = http_build_query($data);
$ch = curl_init();
if ($type == 'POST') {
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
} else {
curl_setopt($ch, CURLOPT_URL, $url . '?' . $data);
}
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
$res = curl_exec($ch);
curl_close($ch);
return $res;
}
}JavaScript
$.ajax({
url: 'https://api.cxzja.cn/api/piaofang',
data: {
token: 'YOUR_TOKEN',
mode: 'json',
},
type: 'GET/POST',
dataType: 'json',
success: function(data) {
console.log(data);
},
error: function(err) {
console.log('请求失败', err);
}
});Python
import requests
url = "https://api.cxzja.cn/api/piaofang"
data = {
"token": "YOUR_TOKEN",
"mode": "json",
}
response = requests.post(url, data=data)
print(response.json())Java
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.*;
public class ApiRequest {
public static void main(String[] args) throws Exception {
URL url = new URL("https://api.cxzja.cn/api/piaofang");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET/POST");
conn.setConnectTimeout(10000);
BufferedReader reader = new BufferedReader(
new InputStreamReader(conn.getInputStream()));
String line;
StringBuilder result = new StringBuilder();
while ((line = reader.readLine()) != null) {
result.append(line);
}
reader.close();
System.out.println(result.toString());
}
}Go
package main
import (
"fmt"
"io/ioutil"
"net/http"
"strings"
)
func main() {
data := "token=YOUR_TOKEN&mode=json"
resp, _ := http.Post("https://api.cxzja.cn/api/piaofang",
"application/x-www-form-urlencoded", strings.NewReader(data))
defer resp.Body.Close()
body, _ := ioutil.ReadAll(resp.Body)
fmt.Println(string(body))
}C#
using System;
using System.Net.Http;
using System.Threading.Tasks;
class Program {
static async Task Main() {
using var client = new HttpClient();
var data = new FormUrlEncodedContent(new Dictionary<string, string> {
{"token", "YOUR_TOKEN"},
{"mode", "json"},
});
var response = await client.PostAsync("https://api.cxzja.cn/api/piaofang", data);
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(response);
}
}NodeJs
const https = require('https');
const querystring = require('querystring');
const postData = querystring.stringify({
'token': 'YOUR_TOKEN',
'mode': 'json',
});
const options = {
hostname: 'api.cxzja.cn',
path: '/api/piaofang',
method: 'POST',
headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
};
const req = https.request(options, res => {
let data = '';
res.on('data', d => data += d);
res.on('end', () => console.log(data));
});
req.write(postData);
req.end();
C
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <curl/curl.h>
static size_t WriteCallback(void *contents, size_t size, size_t nmemb, void *userp) {
((char*)userp)[0] = '\0';
strcat(userp, contents);
return size * nmemb;
}
int main() {
CURL *curl;
CURLcode res;
char response[4096] = {0};
curl_global_init(CURL_GLOBAL_DEFAULT);
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "https://api.cxzja.cn/api/piaofang");
curl_easy_setopt(curl, CURLOPT_POST, 1L);
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "token=YOUR_TOKEN&mode=json");
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteCallback);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, response);
curl_easy_setopt(curl, CURLOPT_TIMEOUT, 10L);
res = curl_easy_perform(curl);
if(res == CURLE_OK) printf("%s\n", response);
curl_easy_cleanup(curl);
}
curl_global_cleanup();
return 0;
}C++
#include <iostream>
#include <string>
#include <curl/curl.h>
size_t WriteCallback(void* contents, size_t size, size_t nmemb, std::string* userp) {
userp->append((char*)contents, size * nmemb);
return size * nmemb;
}
int main() {
CURL* curl = curl_easy_init();
std::string response;
if (curl) {
curl_easy_setopt(curl, CURLOPT_URL, "https://api.cxzja.cn/api/piaofang");
curl_easy_setopt(curl, CURLOPT_POST, 1L);
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "token=YOUR_TOKEN&mode=json");
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteCallback);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &response);
curl_easy_setopt(curl, CURLOPT_TIMEOUT, 10L);
CURLcode res = curl_easy_perform(curl);
if (res == CURLE_OK) std::cout << response << std::endl;
curl_easy_cleanup(curl);
}
curl_global_cleanup();
return 0;
}易语言
.版本 2 .支持库 spec .局部变量 url, 文本型 .局部变量 params, 文本型 .局部变量 result, 文本型 url = "https://api.cxzja.cn/api/piaofang" params = "token=YOUR_TOKEN&mode=json" result = 编码_URL解码 (网页_访问 (url, , params)) 调试输出 (result)
AI开发文档
导出接口文档供AI助手快速理解接口结构
复制下方内容粘贴给AI助手,即可快速生成对接代码。
JSON 格式
0 KB