搜索
开发中
GET
/search
请求参数
Query 参数
q
string
可选
示例值:
node
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request GET 'http://localhost:3000/search?q=node'
返回响应
🟢200成功
application/json
Body
object {0}
示例
{
"status": true,
"message": "查询课程列表成功。",
"data": {
"courses": [
{
"id": 9,
"createdAt": "2025-04-22 20:06:58",
"updatedAt": "2025-04-22 20:06:58",
"name": "Node.js 入门 - 使用 Express + Sequelize 实作 API",
"image": "http://localhost:3000/uploads/images/1745294815786-766619312.jpeg",
"recommended": false,
"introductory": true,
"likesCount": 0,
"chaptersCount": 0,
"categoryId": 2,
"userId": 1,
"category": {
"id": 2,
"name": "后端开发"
}
},
{
"id": 2,
"createdAt": "2025-04-22 18:35:13",
"updatedAt": "2025-05-28 17:36:47",
"name": "Node.js 项目实践",
"image": "http://localhost:3000/uploads/images/1745289257308-482473119.png",
"recommended": true,
"introductory": true,
"likesCount": 2,
"chaptersCount": 10,
"categoryId": 2,
"userId": 1,
"category": {
"id": 2,
"name": "后端开发"
}
}
],
"pagination": {
"currentPage": 1,
"pageSize": 10,
"total": 2
}
}
}