get_query_page_stats
Retrieve traffic statistics for specific search queries to analyze performance and optimize website visibility in Bing search results.
Instructions
Get detailed traffic statistics for a specific query.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| site_url | Yes | ||
| query | Yes |
Implementation Reference
- mcp_server_bwt/main.py:576-594 (handler)The handler function for the get_query_page_stats tool. It takes site_url and query parameters, calls the Bing Webmaster API endpoint GetQueryPageStats, and returns the processed statistics with type annotation.site_url: Annotated[str, "The URL of the site"], query: Annotated[str, "The search query to analyze"], ) -> List[Dict[str, Any]]: """ Get detailed traffic statistics for a specific query. Args: site_url: The URL of the site query: The search query to analyze Returns: List of page statistics for the given query """ async with api: stats = await api._make_request( f"GetQueryPageStats?siteUrl={site_url}&query={query}" ) return api._ensure_type_field(stats, "QueryPageStats")
- mcp_server_bwt/main.py:572-575 (registration)Registration of the get_query_page_stats tool using the @mcp.tool decorator, specifying the name and description.name="get_query_page_stats", description="Get detailed traffic statistics for a specific query.", ) async def get_query_page_stats(