Skip to main content
Glama
ascentkorea

Hubble MCP Server

by ascentkorea

crawl_google_trends

Collect and analyze Google Trends data for specified keywords, locations, and timeframes, providing search interest scores from 0 to 100 for trend comparison.

Instructions

구글 트렌드 수집 요청 최근 며칠 이내의 키워드 트렌드 추이를 0~100 사이의 값으로 표현 됩니다. (검색량은 아니고, 검색 관심도를 나타냅니다. 해당 수치는 0~100 사이의 값으로 표현 됩니다.) trends: 기간을 기준으로 차트에서 가장 높은 지점 대비 검색 관심도를 나타냅니다. 값은 검색 빈도가 가장 높은 검색어의 경우 100, 검색 빈도가 그 절반 정도인 검색어의 경우 50, 해당 검색어에 대한 데이터가 충분하지 않은 경우 0으로 나타납니다. args: keywords: List[str], 키워드 리스트 location: Literal['South Korea', 'Japan'], timeframe: Literal['now 1-H', 'now 7-d', 'today 1-m'], gl: Literal['kr', 'jp'] returns: dict[Any] | None: 구글 트렌드 수집 결과

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
glYes
keywordsYes
locationYes
timeframeYes

Implementation Reference

  • Handler function for 'crawl_google_trends' tool. Registered via @mcp.tool() decorator. Fetches Google Trends data by POSTing to Hubble API /google_trend endpoint with input parameters.
    @async_retry(exceptions=(Exception), tries=2, delay=0.3) async def crawl_google_trends( req_param: GoogleTrendsParameters) -> dict[Any] | None: ''' 구글 트렌드 수집 요청 최근 며칠 이내의 키워드 트렌드 추이를 0~100 사이의 값으로 표현 됩니다. (검색량은 아니고, 검색 관심도를 나타냅니다. 해당 수치는 0~100 사이의 값으로 표현 됩니다.) trends: 기간을 기준으로 차트에서 가장 높은 지점 대비 검색 관심도를 나타냅니다. 값은 검색 빈도가 가장 높은 검색어의 경우 100, 검색 빈도가 그 절반 정도인 검색어의 경우 50, 해당 검색어에 대한 데이터가 충분하지 않은 경우 0으로 나타납니다. 키워드 하나에 대한 검색 관심도 추이를 알수 있으며, 최대 3개 키워드를 비교 할수 있습니다. 특정 키워드하나를 입력했을때, 특정 기간의 최대값이 100 이라고 했을때, 키워드 여러개 입력시에는 검색관심도가 가장 큰 키워드는 0~100 사이값으로 표현되고, 나머지는 적절히 스케일링 되므로 비교시에 특정 키워드의 최대값은 100이 아닐수 있습니다. 따라서, 키워드간 관심도 비교시에 4개 이상의 키워드를 비교 하기 위해서는 우선 3개를 비교 하고, 이후 가장 높은 관심도가 있는 키워드를 계속 같이 추가해야 각 수치간에 비교가 가능해집니다. args: keywords: List[str], 키워드 리스트 location: Literal['South Korea', 'Japan'], timeframe: Literal['now 1-H', 'now 7-d', 'today 1-m'], gl: Literal['kr', 'jp'] returns: dict[Any] | None: 구글 트렌드 수집 결과 ''' async with httpx.AsyncClient() as client: headers = {"X-API-Key": HUBBLE_API_KEY} response = await client.post( f"{HUBBLE_API_URL}/google_trend", headers=headers, json=req_param.model_dump(), timeout=30.0) response.raise_for_status() return response.text
  • Pydantic model defining input schema for crawl_google_trends: list of 1-3 keywords, location (South Korea/Japan), timeframe (now 1-H/7-d/today 1-m), gl (kr/jp). Used as req_param in handler.
    class GoogleTrendsParameters(BaseModel): keywords: List[str] = Field( min_items=1, max_items=3, ) location: Literal['South Korea', 'Japan'] timeframe: Literal['now 1-H', 'now 7-d', 'today 1-m'] gl: Literal['kr', 'jp'] @mcp.tool()
  • data_api.py:464-464 (registration)
    @mcp.tool() decorator registers the crawl_google_trends function as an MCP tool in the FastMCP server.
    @async_retry(exceptions=(Exception), tries=2, delay=0.3)

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/ascentkorea/hubble_mcp'

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