get_query_page_stats
Retrieve detailed 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:572-575 (registration)Registration of the 'get_query_page_stats' tool using the @mcp.tool decorator.name="get_query_page_stats", description="Get detailed traffic statistics for a specific query.", ) async def get_query_page_stats(
- mcp_server_bwt/main.py:576-594 (handler)The main handler function for the tool, which calls the Bing Webmaster API endpoint GetQueryPageStats and ensures type compatibility for MCP.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")