Skip to main content
Glama

get-tencent-news-trending

Retrieve trending news from Tencent, covering global and domestic events, social issues, financial updates, entertainment, and sports. Monitor comprehensive Chinese news insights with Trends Hub.

Instructions

获取腾讯新闻热点榜,包含国内外时事、社会热点、财经资讯、娱乐动态及体育赛事的综合性中文新闻资讯

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
page_sizeNo

Implementation Reference

  • The main handler function that fetches Tencent news trending list via HTTP GET to the API, parses args, validates response, filters out the first item, maps to standardized news format with title, description, cover, source, popularity, publish_time, and link.
    func: async (args) => { const { page_size } = tencentNewsRequestSchema.parse(args); const resp = await http.get<{ ret: number; idlist: [{ newslist: any[] }]; }>('https://r.inews.qq.com/gw/event/hot_ranking_list', { params: { page_size, }, }); if (resp.data.ret !== 0 || !Array.isArray(resp.data.idlist?.[0].newslist)) { throw new Error('获取腾讯新闻热点榜失败'); } return resp.data.idlist[0].newslist .filter((_, index) => index !== 0) .map((item) => { return { title: item.title, description: item.abstract, cover: item.thumbnails?.[0], source: item.source, popularity: item.hotEvent.hotScore, publish_time: item.time, link: item.url, }; }); },
  • Zod input schema defining optional page_size parameter (integer, default 20).
    const tencentNewsRequestSchema = z.object({ page_size: z.number().int().optional().default(20), });
  • Tool registration via defineToolConfig, setting name, description, input schema, and handler function.
    export default defineToolConfig({ name: 'get-tencent-news-trending', description: '获取腾讯新闻热点榜,包含国内外时事、社会热点、财经资讯、娱乐动态及体育赛事的综合性中文新闻资讯', zodSchema: tencentNewsRequestSchema, func: async (args) => { const { page_size } = tencentNewsRequestSchema.parse(args); const resp = await http.get<{ ret: number; idlist: [{ newslist: any[] }]; }>('https://r.inews.qq.com/gw/event/hot_ranking_list', { params: { page_size, }, }); if (resp.data.ret !== 0 || !Array.isArray(resp.data.idlist?.[0].newslist)) { throw new Error('获取腾讯新闻热点榜失败'); } return resp.data.idlist[0].newslist .filter((_, index) => index !== 0) .map((item) => { return { title: item.title, description: item.abstract, cover: item.thumbnails?.[0], source: item.source, popularity: item.hotEvent.hotScore, publish_time: item.time, link: item.url, }; }); }, });

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/baranwang/mcp-trends-hub'

If you have feedback or need assistance with the MCP directory API, please join our Discord server