Skip to main content
Glama

get-weibo-trending

Fetch real-time trending topics from Weibo, covering social phenomena, entertainment news, celebrity updates, and other popular Chinese discussions, aggregated by Trends Hub.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function fetches Weibo trending topics from the API, filters out ads, constructs search URLs, and returns a list of formatted trending items with title, description, popularity, and 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(), }; }); },
  • The tool is registered using defineToolConfig, which defines the name, description, and points to 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