启航 AI 聚合 API 文档

启航 AI 聚合 API 文档

更新时间:2025-10-20

API Key 获取地址

https://api.qhaigc.net/console/token

快速开始

  • 基础地址:https://api.qhaigc.net/v1/api/functions
  • 请求方法:POST
  • 认证方式:HTTP Header Authorization: Bearer <你的 sk-apikey>
  • 功能选择:HTTP Header Function-Type: <功能名>(例如 eventHistory
  • 内容类型:HTTP Header Content-Type: application/json
  • 通用请求体:随功能不同携带不同 JSON 参数(见各接口章节)

通用响应包裹字段(大多数接口一致):

  • request_id:请求唯一 ID
  • success:布尔,是否成功
  • message:字符串,信息
  • code:数值状态码(成功通常为 200)
  • data:功能实际数据载荷(类型视接口而定)
  • time:服务器时间戳
  • usage:用量/计数(若有)

错误码:当前示例均为 200 成功返回,其他错误码按后端实际返回为准(建议在客户端对非 200 或 success=false 做兜底处理)。

接口速查表

  • 历史上的今天相关

    • eventHistory:按当天日期获取历史事件列表
    • eventHistoryGet:根据事件 id 获取事件详情
    • eventHistorySearch:按关键字搜索历史事件
  • 音乐相关(网易云)

    • musicSearch:按 keyword 搜索歌曲
    • musicDetail:根据歌曲 id 获取详情
    • musicUrl:根据歌曲 id 获取播放地址
    • musicLyric:根据歌曲 id 获取歌词
    • musicCommentHot:根据歌曲 id 获取热门评论
    • musicPlaylist:根据歌单/用户列表 id 获取清单(见示例)
  • 天气相关

    • tianqi:实时天气(按 provincecity
    • tianqiSeven:7 日天气预报(按 provincecity
  • 资讯/榜单

    • wbtop:微博热搜榜
    • zaobao:60 秒早报
  • 知乎日报相关

    • zhihu:获取当天知乎日报
    • zhihuGet:按 date 获取指定日期知乎日报
    • zhihuNews:按 id 获取单条日报详情(HTML 内容)
    • zhihuShortComments:按 id 获取短评

历史上的今天系列

eventHistory

  • 功能:按当天日期获取历史事件列表
  • Function-Type:eventHistory
  • 请求体参数:
    • format(可选):"json"(示例中使用)

示例:

curl --location --request POST 'https://api.qhaigc.net/v1/api/functions' \
--header 'Authorization: Bearer sk-apikey' \
--header 'Function-Type: eventHistory' \
--header 'Content-Type: application/json' \
--data-raw '{
		"format": "json"
}'

返回示例(节选):

{
	"request_id": "838824613100814336",
	"success": true,
	"code": 200,
	"data": [
		{
			"id": "387f40fe53ba11eb90470c42a1415493",
			"title": "中共中央通知认真贯彻执《公民道德建设实施纲要》",
			"year": 2001,
			"month": 10,
			"day": 20,
			"monthday": "1020",
			"date": "2001年10月20日",
			"desc": "..."
		}
	],
	"time": 1760951372,
	"usage": 0
}

数据要点:data 为事件数组,包含 id/title/year/month/day/date/desc 等。

eventHistoryGet

  • 功能:根据事件 id 获取详情
  • Function-Type:eventHistoryGet
  • 请求体参数:
    • id(必填):事件 ID(来源于 eventHistory 列表)
    • format(可选):"json"

示例:

curl --location --request POST 'https://api.qhaigc.net/v1/api/functions' \
--header 'Authorization: Bearer sk-apikey' \
--header 'Function-Type: eventHistoryGet' \
--header 'Content-Type: application/json' \
--data-raw '{
		"id":"387f40fe53ba11eb90470c42a1415493",
		"format":"json"
}'

返回示例(节选):

{
	"success": true,
	"code": 200,
	"data": {
		"id": "387f40fe53ba11eb90470c42a1415493",
		"title": "中共中央通知认真贯彻执《公民道德建设实施纲要》",
		"year": 2001,
		"month": 10,
		"day": 20,
		"date": "2001年10月20日",
		"content": "...",
		"desc": "..."
	}
}

字段要点:详情字段增加了全文 content

eventHistorySearch

  • 功能:按关键字搜索历史事件
  • Function-Type:eventHistorySearch
  • 请求体参数:
    • word(必填):搜索关键词

示例:

curl --location --request POST 'https://api.qhaigc.net/v1/api/functions' \
--header 'Authorization: Bearer sk-apikey' \
--header 'Function-Type: eventHistorySearch' \
--header 'Content-Type: application/json' \
--data-raw '{
		"word":"第一台计算机"
}'

返回示例(节选):

{
	"success": true,
	"code": 200,
	"data": [
		{
			"id": "38429e4d53ba11eb90470c42a1415493",
			"title": "世界第一台计算机问世",
			"date": "1946年2月14日",
			"year": 1946,
			"month": 2,
			"day": 14,
			"desc": "..."
		}
	]
}

音乐系列(网易云)

musicSearch

  • 功能:按关键字搜索歌曲
  • Function-Type:musicSearch
  • 请求体参数:
    • keyword(必填):搜索关键字
    • format(可选):"json"

示例:

curl --location --request POST 'https://api.qhaigc.net/v1/api/functions' \
--header 'Authorization: Bearer sk-apikey' \
--header 'Function-Type: musicSearch' \
--header 'Content-Type: application/json' \
--data-raw '{
		"keyword": "送别",
		"format":"json"
}'

返回示例(节选):

{
	"success": true,
	"code": 200,
	"data": {
		"songs": [
			{
				"id": 1959437612,
				"name": "送别",
				"artists": [{"id": 4721, "name": "朴树"}],
				"album": {"id": 147152469, "name": "送别"},
				"duration": 168280
			}
		],
		"hasMore": true,
		"songCount": 300
	}
}

musicDetail

  • 功能:根据歌曲 id 获取详情
  • Function-Type:musicDetail
  • 请求体参数:
    • id(必填):歌曲 ID
    • format(可选):"json"

示例:

curl --location --request POST 'https://api.qhaigc.net/v1/api/functions' \
--header 'Authorization: Bearer sk-apikey' \
--header 'Function-Type: musicDetail' \
--header 'Content-Type: application/json' \
--data-raw '{
		"id": "397952",
		"format":"json"
}'

返回示例(节选):

{
	"success": true,
	"code": 200,
	"data": {
		"songs": [
			{
				"id": 397952,
				"name": "送别(李叔同填词 奥德威曲杨鸿年改编)",
				"ar": [{"id": 13687, "name": "中国交响乐团附属少年及女子合唱团"}],
				"al": {"id": 39360, "name": "天籁童声", "picUrl": "..."},
				"dt": 180346
			}
		],
		"privileges": [
			{"id": 397952, "pl": 320000, "dl": 999000, "maxbr": 999000}
		],
		"code": 200
	}
}

musicUrl

  • 功能:根据歌曲 id 获取播放地址
  • Function-Type:musicUrl
  • 请求体参数:
    • id(必填):歌曲 ID
    • format(可选):"json"

示例:

curl --location --request POST 'https://api.qhaigc.net/v1/api/functions' \
--header 'Authorization: Bearer sk-apikey' \
--header 'Function-Type: musicUrl' \
--header 'Content-Type: application/json' \
--data-raw '{
		"id": "397952",
		"format":"json"
}'

返回示例(节选):

{
	"success": true,
	"code": 200,
	"data": {
		"id": 397952,
		"url": "http://m701.music.126.net/.../xxx.mp3?vuutv=...",
		"size": 7216109,
		"md5": "cba9e63b85176a9f46cddc3ec25207fd",
		"encode_type": "mp3"
	}
}

注意:url 具有有效期,请及时使用。

musicLyric

  • 功能:根据歌曲 id 获取歌词(LRC)
  • Function-Type:musicLyric
  • 请求体参数:
    • id(必填):歌曲 ID
    • format(可选):"json"

示例与返回(节选):

curl --location --request POST 'https://api.qhaigc.net/v1/api/functions' \
--header 'Authorization: Bearer sk-apikey' \
--header 'Function-Type: musicLyric' \
--header 'Content-Type: application/json' \
--data-raw '{
		"id": "397952",
		"format":"json"
}'
{
	"success": true,
	"code": 200,
	"data": {
		"lyric": "[00:25.97]长亭外 古道边\n[00:32.60]芳草碧连天\n..."
	}
}

musicCommentHot

  • 功能:根据歌曲 id 获取热门评论
  • Function-Type:musicCommentHot
  • 请求体参数:
    • id(必填):歌曲 ID
    • format(可选):"json"

示例:

curl --location --request POST 'https://api.qhaigc.net/v1/api/functions' \
--header 'Authorization: Bearer sk-apikey' \
--header 'Function-Type: musicCommentHot' \
--header 'Content-Type: application/json' \
--data-raw '{
		"id": "397952",
		"format":"json"
}'

返回示例(节选):

{
	"success": true,
	"code": 200,
	"data": {
		"comments": [
			{
				"commentId": 7759187568,
				"content": "奶奶,一路走好...",
				"timeStr": "昨日23:50",
				"likedCount": 0,
				"user": {"userId": 427803027, "nickname": "Togyk"}
			}
		],
		"more": true,
		"total": 4382
	}
}

musicPlaylist

  • 功能:根据 id 获取歌单/列表详情(示例展示头像、昵称与 playlist 列表)
  • Function-Type:musicPlaylist
  • 请求体参数:
    • id(必填):列表/歌单 ID
    • format(可选):"json"

示例与返回(节选):

curl --location --request POST 'https://api.qhaigc.net/v1/api/functions' \
--header 'Authorization: Bearer sk-apikey' \
--header 'Function-Type: musicPlaylist' \
--header 'Content-Type: application/json' \
--data-raw '{
		"id": "477078794",
		"format":"json"
}'
{
	"success": true,
	"code": 200,
	"data": {
		"avatar_url": "http://p1.music.126.net/...jpg",
		"user_id": 106774717,
		"nickname": "赵天戈",
		"playlist": [
			{"name": "Night Of The Betrayal", "id": 441716, "user_name": "久石让"}
		]
	}
}

天气系列

tianqi(实时天气)

  • 功能:按省市获取当前天气与空气质量、小时预报和生活指数
  • Function-Type:tianqi
  • 请求体参数:
    • province(必填):省(如:"天津"
    • city(必填):市(如:"天津"
    • format(可选):"json"

示例与返回(节选):

curl --location --request POST 'https://api.qhaigc.net/v1/api/functions' \
--header 'Authorization: Bearer sk-apikey' \
--header 'Function-Type: tianqi' \
--header 'Content-Type: application/json' \
--data-raw '{
		"province": "天津",
		"city":"天津",
		"format":"json"
}'
{
	"success": true,
	"code": 200,
	"data": {
		"city": "天津",
		"date": "2025-10-20",
		"weather": "晴",
		"temp": 9.5,
		"air": "19",
		"aqi": {"air_level": "优", "pm25": "7"},
		"hour": [{"time": "2025-10-20 17:00:00", "temp": 9, "wea": "晴"}]
	}
}

tianqiSeven(7 日预报)

  • 功能:获取 7 日逐日天气及逐小时趋势(返回较长)
  • Function-Type:tianqiSeven
  • 请求体参数:
    • province(必填)
    • city(必填)
    • format(可选):"json"

示例与返回(节选一日):

curl --location --request POST 'https://api.qhaigc.net/v1/api/functions' \
--header 'Authorization: Bearer sk-apikey' \
--header 'Function-Type: tianqiSeven' \
--header 'Content-Type: application/json' \
--data-raw '{
		"province": "天津",
		"city":"天津",
		"format":"json"
}'
{
	"success": true,
	"code": 200,
	"data": [
		{
			"date": "2025-10-20",
			"temp_day": "12",
			"temp_night": "1",
			"wea_day": "阴",
			"wea_night": "晴",
			"sunrise": "06:25",
			"sunset": "17:26",
			"hour": [{"time": "01:00", "temp": "9", "wea": "阴"}],
			"index": [{"name": "过敏指数", "level": "不易发"}]
		}
	]
}

榜单与资讯

wbtop(微博热搜榜)

  • 功能:获取当前微博热搜词与链接
  • Function-Type:wbtop
  • 请求体参数:
    • format(可选):"json"

示例与返回(节选):

curl --location --request POST 'https://api.qhaigc.net/v1/api/functions' \
--header 'Authorization: Bearer sk-apikey' \
--header 'Function-Type: wbtop' \
--header 'Content-Type: application/json' \
--data-raw '{
		"format":"json"
}'
{
	"success": true,
	"code": 200,
	"data": [
		{"hot_word": "四中全会", "url": "https://s.weibo.com/weibo?q=%23...%23"}
	]
}

zaobao(60 秒早报)

  • 功能:每日资讯摘要、配图与音频
  • Function-Type:zaobao
  • 请求体参数:
    • format(可选):"json"

示例与返回(节选):

curl --location --request POST 'https://api.qhaigc.net/v1/api/functions' \
--header 'Authorization: Bearer sk-apikey' \
--header 'Function-Type: zaobao' \
--header 'Content-Type: application/json' \
--data-raw '{
		"format":"json"
}'
{
	"success": true,
	"code": 200,
	"data": {
		"date": "2025-10-20",
		"news": ["1、2025全国最低工资标准更新:...", "2、百色通报灾情及应对进展:..."],
		"weiyu": "【微语】...",
		"image": "https://file.alapi.cn/60s/202510201760900402.png",
		"audio": "https://file.alapi.cn/60s/audio/2025-10-20_...mp3"
	}
}

知乎日报系列

zhihu(当天知乎日报)

  • 功能:获取当天知乎日报概要(stories 与 top_stories)
  • Function-Type:zhihu
  • 请求体参数:
    • format(可选):"json"

示例与返回(节选):

curl --location --request POST 'https://api.qhaigc.net/v1/api/functions' \
--header 'Authorization: Bearer sk-apikey' \
--header 'Function-Type: zhihu' \
--header 'Content-Type: application/json' \
--data-raw '{
		"format":"json"
}'
{
	"success": true,
	"code": 200,
	"data": {
		"date": "20251020",
		"stories": [
			{"id": 9784741, "title": "古代为什么没有发现地球是圆的?", "url": "https://daily.zhihu.com/story/9784741"}
		],
		"top_stories": [
			{"id": 9784741, "title": "古代为什么没有发现地球是圆的?"}
		]
	}
}

zhihuGet(指定日期知乎日报)

  • 功能:按日期获取知乎日报(YYYYMMDD)
  • Function-Type:zhihuGet
  • 请求体参数:
    • date(必填):如 "20251010"
    • format(可选):"json"

示例(节选):

curl --location --request POST 'https://api.qhaigc.net/v1/api/functions' \
--header 'Authorization: Bearer sk-apikey' \
--header 'Function-Type: zhihuGet' \
--header 'Content-Type: application/json' \
--data-raw '{
		"date":"20251010",
		"format":"json"
}'

返回结构与 zhihu 类似,data.date 为指定日期。

zhihuNews(日报详情 HTML)

  • 功能:按 id 获取日报正文 HTML(包含图片、样式资源等)
  • Function-Type:zhihuNews
  • 请求体参数:
    • id(必填):日报故事 ID(来源于 stories[].id
    • format(可选):"json"

示例与返回(节选):

curl --location --request POST 'https://api.qhaigc.net/v1/api/functions' \
--header 'Authorization: Bearer sk-apikey' \
--header 'Function-Type: zhihuNews' \
--header 'Content-Type: application/json' \
--data-raw '{
		"id":"9784741",
		"format":"json"
}'
{
	"success": true,
	"code": 200,
	"data": {
		"title": "古代为什么没有发现地球是圆的?",
		"url": "https://daily.zhihu.com/story/9784741",
		"body": "<div class=\"main-wrap content-wrap\">...HTML 省略...</div>",
		"css": ["http://news-at.zhihu.com/css/news_qa.auto.css?v=4b3e3"]
	}
}

提示:客户端可直接渲染 body 的 HTML;如需纯文本可自行清洗标签。

zhihuShortComments(短评)

  • 功能:按 id 获取短评列表
  • Function-Type:zhihuShortComments
  • 请求体参数:
    • id(必填):日报故事 ID
    • format(可选):"json"

示例与返回(节选):

curl --location --request POST 'https://api.qhaigc.net/v1/api/functions' \
--header 'Authorization: Bearer sk-apikey' \
--header 'Function-Type: zhihuShortComments' \
--header 'Content-Type: application/json' \
--data-raw '{
		"id":"9784741",
		"format":"json"
}'
{
	"success": true,
	"code": 200,
	"data": {
		"comments": [
			{"author": "sooha", "content": "古代看月食...推演可知是地球的影子。", "likes": 0}
		]
	}
}

使用建议与注意事项

  • 认证:确保在 Header 中携带有效的 Authorization: Bearer sk-xxxx
  • 功能选择:不同接口通过 Function-Type 指定,路径固定为 /v1/api/functions
  • 返回体处理:请先判断 successcode,再使用 data 字段。
  • 频率与配额:若接口存在限频/配额限制,以后端实际策略为准;出现 429/限流时请退避重试。
  • 数据时效性:如 musicUrl 的直链具有时效性,建议即取即用;天气与榜单数据会随时间更新。

启航 AI 聚合 API 文档
https://blog.thelazy.top/archives/1760954580336
作者
Administrator
发布于
2025年10月20日
更新于
2025年10月20日
许可协议