get_search_path
Retrieve search path analysis results for a keyword from Hubble Path Finder API. Specify region (kr or jp) and result limit.
Instructions
Make a request to the Path Finder API of Hubble with proper error handling. Args: keyword: str, 검색 키워드(모든 키워드는 소문자로 변환하여 요청) gl: str, 지역 코드 한국 일본(kr, jp) limit: int, 검색 경로 분석 결과 최대 개수(기본값 300) Returns: dict[str, Any] | None: 검색 키워드의 검색 경로 분석 결과
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| keyword | Yes | ||
| gl | No | kr | |
| limit | No |
Implementation Reference
- data_api.py:280-283 (registration)Tool registration via @mcp.tool() decorator on FastMCP instance
mcp = FastMCP("hubble") @mcp.tool() @async_retry(exceptions=(Exception), tries=2, delay=0.3) async def get_search_path(keyword: str, - data_api.py:283-293 (schema)Input schema: keyword (str), gl (Literal['kr','jp']), limit (int=300), returns dict or None
async def get_search_path(keyword: str, gl: Literal['kr', 'jp'] = "kr", limit=300) -> dict[str, Any] | None: """Make a request to the Path Finder API of Hubble with proper error handling. Args: keyword: str, 검색 키워드(모든 키워드는 소문자로 변환하여 요청) gl: str, 지역 코드 한국 일본(kr, jp) limit: int, 검색 경로 분석 결과 최대 개수(기본값 300) Returns: dict[str, Any] | None: 검색 키워드의 검색 경로 분석 결과 """ - data_api.py:283-303 (handler)Handler: Sends POST request to Hubble Path Finder API with keyword, gl, limit; returns response text
async def get_search_path(keyword: str, gl: Literal['kr', 'jp'] = "kr", limit=300) -> dict[str, Any] | None: """Make a request to the Path Finder API of Hubble with proper error handling. Args: keyword: str, 검색 키워드(모든 키워드는 소문자로 변환하여 요청) gl: str, 지역 코드 한국 일본(kr, jp) limit: int, 검색 경로 분석 결과 최대 개수(기본값 300) Returns: dict[str, Any] | None: 검색 키워드의 검색 경로 분석 결과 """ payload = {"keyword": keyword, "gl": gl, "limit": limit} headers = {"X-API-Key": HUBBLE_API_KEY} async with httpx.AsyncClient() as client: response = await client.post( f"{HUBBLE_API_URL}/path_finder", headers=headers, json=payload, timeout=30.0) response.raise_for_status() return response.text