Skip to main content
Glama

get_keyword_search_posts

Retrieve social media posts matching specific keywords across platforms like Twitter, Reddit, and YouTube for search and analysis purposes.

Instructions

Get raw posts from a keyword search. Returns the actual social media posts matching the search query.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
search_idYesKeyword search ID
platformNoFilter by platform (default: all)

Implementation Reference

  • The "get_keyword_search_posts" tool is defined and implemented directly within the registration block in src/tools/posts.ts. The handler is the inline async function passed as the fourth argument.
    server.tool(
      "get_keyword_search_posts",
      "Get raw posts from a keyword search. Returns the actual social media posts matching the search query.",
      {
        search_id: z.number().int().positive().describe("Keyword search ID"),
        platform: z
          .enum(["all", "twitter", "reddit", "bluesky", "youtube", "instagram", "facebook", "weibo", "linkedin"])
          .optional()
          .describe("Filter by platform (default: all)"),
      },
      async (params) => {
        try {
          const query = params.platform ? `?platform=${params.platform}` : "";
          const data = await apiGet(`/iq/keyword_search/${params.search_id}/posts_data${query}`);
          return { content: [{ type: "text", text: `${UNTRUSTED_CONTENT_NOTICE}\n\n${JSON.stringify(data, null, 2)}` }] };
        } catch (e) {
          return { content: [{ type: "text", text: String(e) }], isError: true };
        }
      }
    );

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/rolliinc/rolli-mcp'

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