接口地址
https://www.chuangxinwu.cn/public/api/tuwei_api.php
接口状态
正常 (HTTP 200) 上次检测:2026-05-19 14:29:25
📝 接口描述
============ 调用方式 ============
1. 随机获取一条情话:/tuwei_api.php
2. 获取指定ID的情话:/tuwei_api.php?id=1
3. 获取多条随机情话:/tuwei_api.php?num=5
4. 按分类获取(不推荐): /tuwei_api.php?type=撩人
5. 获取今日推荐:/tuwei_api.php?type=today
6. 情侣双人模式(他/她切换):
/tuwei_api.php?gender=boy # 男朋友视角
/tuwei_api.php?gender=girl # 女朋友视角
7. 搜索情话:
/tuwei_api.php?keyword=喜欢
8. 获取情话总数:/tuwei_api.php?action=count
9. JSONP调用:/tuwei_api.php?callback=jsonpCallback
📋 请求示例
【基础请求】
GET https://www.chuangxinwu.cn/public/api/tuwei_api.php
【请求头】
Content-Type: application/json
Accept: application/json
【参数说明】
GET请求参数通过URL传递:
https://www.chuangxinwu.cn/public/api/tuwei_api.php?参数名1=参数值1&参数名2=参数值2
【调用示例】
# cURL
curl -X GET 'https://www.chuangxinwu.cn/public/api/tuwei_api.php' \
-H 'Content-Type: application/json'
# JavaScript (Fetch)
fetch('https://www.chuangxinwu.cn/public/api/tuwei_api.php', {
method: 'GET',
headers: { 'Content-Type': 'application/json' }
})
.then(res => res.json())
.then(data => console.log(data));
# PHP (cURL)
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://www.chuangxinwu.cn/public/api/tuwei_api.php');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
# Python (requests)
import requests
url = 'https://www.chuangxinwu.cn/public/api/tuwei_api.php'
response = requests.get(url)
print(response.json())
📤 真实返回示例
{
"code": 200,
"success": true,
"data": {
"id": 155,
"content": "想和你一起吹晚风。",
"type": "甜蜜",
"gender": "all"
},
"source": "土味情话库",
"total": 460,
"filtered_total": 460,
"time": "2026-05-19 14:29:25"
}
🔧 JavaScript (Fetch)
fetch('/api/proxy.php?url=https%3A%2F%2Fwww.chuangxinwu.cn%2Fpublic%2Fapi%2Ftuwei_api.php', {
method: 'GET',
headers: { 'Content-Type': 'application/json' }
})
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err));
🐘 PHP (cURL)
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://www.chuangxinwu.cn/public/api/tuwei_api.php');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
📡 Python (requests)
import requests
url = 'https://www.chuangxinwu.cn/public/api/tuwei_api.php'
response = requests.request('GET', url)
print(response.json())