Expose user_location parameter for WebSearch tool

Resolved 💬 2 comments Opened Mar 21, 2026 by peterbodo Closed Apr 19, 2026

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:

  1. Add a user_location field to settings.json (applied to all WebSearch calls), or
  2. Expose user_location fields 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).

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗