Expose user_location parameter for WebSearch tool
Feature Request
The Claude API's web search tool supports a user_location parameter for localizing search results:
"user_location": {
"type": "approximate",
"city": "Budapest",
"region": "Budapest",
"country": "HU",
"timezone": "Europe/Budapest"
}
This parameter is documented at https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool and works when calling the API directly.
However, Claude Code's built-in WebSearch tool only exposes query, allowed_domains, and blocked_domains. There is no way to configure user_location — neither per-query nor in settings.json.
Why this matters
For non-English use cases (e.g., searching Hungarian municipal websites), the lack of localization means Brave Search often returns irrelevant or missing results. The underlying Brave Search API supports country, search_lang, and ui_lang parameters, but these aren't configurable through Claude Code either.
Currently the only workaround is setting up a separate Google Custom Search MCP server with localization parameters — which works but adds unnecessary complexity for something the API already supports natively.
Proposed solution
Either:
- Add a
user_locationfield tosettings.json(applied to all WebSearch calls), or - Expose
user_locationfields as parameters on the WebSearch tool so Claude can set them per-query
Option 1 would be simpler and cover most cases (users typically search in one locale).
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗