Skip to main content
Glama

get-weibo-trending

Retrieve real-time trending topics from Weibo's hot search list to monitor Chinese social media discussions about current events, entertainment, and popular culture.

Instructions

获取微博热搜榜,包含时事热点、社会现象、娱乐新闻、明星动态及网络热议话题的实时热门中文资讯

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function fetches Weibo trending topics from 'https://weibo.com/ajax/side/hotSearch', filters out ads, formats each topic with title, description, popularity, and search link.
    func: async () => { const resp = await http.get<{ ok: number; data: { realtime: any[]; }; }>('https://weibo.com/ajax/side/hotSearch'); if (resp.data.ok !== 1 || !Array.isArray(resp.data.data.realtime)) { throw new Error('获取微博热搜榜失败'); } return resp.data.data.realtime .filter((item) => item.is_ad !== 1) .map((item: any) => { const key = item.word_scheme || `#${item.word}`; const url = new URL('https://s.weibo.com/weibo'); url.searchParams.set('q', key); url.searchParams.set('band_rank', '1'); url.searchParams.set('Refer', 'top'); return { title: item.word, description: item.note || key, popularity: item.num, link: url.toString(), }; }); },
  • Tool registration using defineToolConfig, defining name 'get-weibo-trending', description, and references the handler function.
    export default defineToolConfig({ name: 'get-weibo-trending', description: '获取微博热搜榜,包含时事热点、社会现象、娱乐新闻、明星动态及网络热议话题的实时热门中文资讯', func: async () => { const resp = await http.get<{ ok: number; data: { realtime: any[]; }; }>('https://weibo.com/ajax/side/hotSearch'); if (resp.data.ok !== 1 || !Array.isArray(resp.data.data.realtime)) { throw new Error('获取微博热搜榜失败'); } return resp.data.data.realtime .filter((item) => item.is_ad !== 1) .map((item: any) => { const key = item.word_scheme || `#${item.word}`; const url = new URL('https://s.weibo.com/weibo'); url.searchParams.set('q', key); url.searchParams.set('band_rank', '1'); url.searchParams.set('Refer', 'top'); return { title: item.word, description: item.note || key, popularity: item.num, link: url.toString(), }; }); }, });

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