GET
游戏娱乐
看图猜成语游戏API
提供看图猜成语游戏的题目获取、答案提交、提示获取等功能
累计调用 9
今日调用 0
更新于 2026-10-16
调用地址
GET
https://itapi.top/api/chengyu
请求参数
| 参数名 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
| action | int | 必填 | 操作类型,可选值:get_question: 获取题目, submit_answer: 提交答案,必需参数id(题目ID)和answer(用户答案), get_hint:获取提示,必需参数id(题目ID),可选参数level(提示等级,1- | id |
| page | int | 可选 | 页码(可选,仅用于get_question和next_question操作) | 1 |
| id | int | 必填 | 题目ID(必需,用于submit_answer、get_hint、get_question_by_id操作) | 1 |
| answer | int | 必填 | 用户答案(必需,用于submit_answer操作) | 暂无 |
| level | int | 可选 | 提示等级(可选,1-5,用于get_hint操作) | 暂无 |
响应示例
200 OK
{"success":false,"error":"未知操作","timestamp":1792151717}
在线测试
代码示例
cURL · GET
curl "https://itapi.top/api/chengyu?action=id&page=1&id=1&answer=%E6%9A%82%E6%97%A0&level=%E6%9A%82%E6%97%A0"
PHP
<?php
$res = file_get_contents("https://itapi.top/api/chengyu?action=id&page=1&id=1&answer=%E6%9A%82%E6%97%A0&level=%E6%9A%82%E6%97%A0");
$json = json_decode($res, true);
print_r($json);
JavaScript
const res = await fetch("https://itapi.top/api/chengyu?action=id&page=1&id=1&answer=%E6%9A%82%E6%97%A0&level=%E6%9A%82%E6%97%A0");
const json = await res.json();
console.log(json);
Python
import requests
r = requests.get("https://itapi.top/api/chengyu?action=id&page=1&id=1&answer=%E6%9A%82%E6%97%A0&level=%E6%9A%82%E6%97%A0", timeout=10)
print(r.json())