google_search_news
Search Google News for current articles by entering a query and filtering by country, language, location, and time period. Retrieve relevant news results for timely information.
Instructions
Search Google for results
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| q | Yes | The query to search for | |
| gl | No | The country to search in, e.g. us, uk, ca, au, etc. | |
| location | No | The location to search in, e.g. San Francisco, CA, USA | |
| hl | No | The language to search in, e.g. en, es, fr, de, etc. | |
| page | No | The page number to return, first page is 1 (integer value as string) | 1 |
| tbs | No | The time period to search in, e.g. d, w, m, y | |
| num | No | The number of results to return, max is 100 (integer value as string) | 10 |
Implementation Reference
- SearchRequest schema is used as the input schema for google_search_news (same as google_search, google_search_images, google_search_videos).
class SearchRequest(BaseRequest): tbs: Optional[str] = Field( None, description="The time period to search in, e.g. d, w, m, y" ) num: str = Field( "10", pattern=r"^([1-9]|[1-9]\d|100)$", description="The number of results to return, max is 100 (integer value as string)", ) - src/serper_mcp_server/server.py:32-32 (registration)Registration of google_search_news in the google_request_map, mapping it to SearchRequest schema.
SerperTools.GOOGLE_SEARCH_NEWS: SearchRequest, - src/serper_mcp_server/enums.py:11-11 (registration)Enum definition for the google_search_news tool name/value.
GOOGLE_SEARCH_NEWS = "google_search_news" - src/serper_mcp_server/server.py:68-79 (handler)The call_tool handler dispatches google_search_news to the generic google() function via the google_request_map lookup.
if name == SerperTools.WEBPAGE_SCRAPE.value: request = WebpageRequest(**arguments) result = await scape(request) return [TextContent(text=json.dumps(result, indent=2), type="text")] if not SerperTools.has_value(name): raise ValueError(f"Tool {name} not found") tool = SerperTools(name) request = google_request_map[tool](**arguments) result = await google(tool, request) return [TextContent(text=json.dumps(result, indent=2), type="text")] - src/serper_mcp_server/core.py:14-17 (handler)The google() handler - for google_search_news, it extracts 'news' from the tool value and calls https://google.serper.dev/news.
async def google(tool: SerperTools, request: BaseModel) -> Dict[str, Any]: uri_path = tool.value.split("_")[-1] url = f"https://google.serper.dev/{uri_path}" return await fetch_json(url, request)