Skip to main content
Glama

get_network_competitors_posts

Retrieve competitor posts from specified networks within a defined date range to analyze and draw insights for your brand strategy. Supports Twitter, Facebook, Instagram, YouTube, Twitch, and Bluesky.

Instructions

Get the list of posts from your competitors from your Metricool brand account. Add interesting conclusions for my brand about my competitors and analyze their posts.

Args: init date: Init date of the period to get the data. The format is YYYY-MM-DD end date: End date of the period to get the data. The format is YYYY-MM-DD network: Network to retrieve the posts. The format is "twitter", "facebook", "instagram", "youtube", "twitch" and "bluesky". Only these are accepted. blog id: Blog id of the Metricool brand account. limit: Limit of posts of competitors. By default = 50 timezone: Timezone of the post. The format is "Europe%2FMadrid". Use the timezone of the user extracted from the get_brands tool.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
blog_idYes
end_dateYes
init_dateYes
limitYes
networkYes
timezoneYes

Implementation Reference

  • The handler function for the get_network_competitors_posts tool. It is decorated with @mcp.tool(), which registers it automatically with FastMCP using the function name as the tool name. The function fetches competitors' posts from the Metricool API, handling Instagram by combining publications and reels data.
    @mcp.tool() async def get_network_competitors_posts(network: str, init_date: str, end_date: str, blog_id: int, limit: int, timezone: str) -> str | dict[str, Any]: """ Get the list of posts from your competitors from your Metricool brand account. Add interesting conclusions for my brand about my competitors and analyze their posts. Args: init date: Init date of the period to get the data. The format is YYYY-MM-DD end date: End date of the period to get the data. The format is YYYY-MM-DD network: Network to retrieve the posts. The format is "twitter", "facebook", "instagram", "youtube", "twitch" and "bluesky". Only these are accepted. blog id: Blog id of the Metricool brand account. limit: Limit of posts of competitors. By default = 50 timezone: Timezone of the post. The format is "Europe%2FMadrid". Use the timezone of the user extracted from the get_brands tool. """ if(network=="instagram"): url = f"{METRICOOL_BASE_URL}/v2/analytics/competitors/{network}/publications?from={init_date}T00%3A00%3A00&to={end_date}T23%3A59%3A59&blogId={blog_id}&userId={METRICOOL_USER_ID}&limit={limit}&timezone={timezone}&integrationSource=MCP" response_pub = await make_get_request(url) url = f"{METRICOOL_BASE_URL}/v2/analytics/competitors/{network}/publications?from={init_date}T00%3A00%3A00&to={end_date}T23%3A59%3A59&blogId={blog_id}&userId={METRICOOL_USER_ID}&limit={limit}&timezone={timezone}&integrationSource=MCP" response_reels = await make_get_request(url) response={"publications":response_pub, "reels":response_reels} else: url = f"{METRICOOL_BASE_URL}/v2/analytics/competitors/{network}/posts?from={init_date}T00%3A00%3A00&to={end_date}T23%3A59%3A59&blogId={blog_id}&userId={METRICOOL_USER_ID}&limit={limit}&timezone={timezone}&integrationSource=MCP" response = await make_get_request(url) if not response: return ("Failed to get competitors") return response

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/metricool/mcp-metricool'

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