Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

tools.0.web_search_20250305: Country code SG is not supported

Open
#995 3 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
28/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
python
Domain
api

Research direction

Start with the UserLocation definition in src/anthropic/types/web_search_tool_20250305_param.py and the supplied web_search_20250305 request. Reproduce the Singapore (SG) request and compare the code comment with the API's 400 response; the issue is resolved when the supported-country behavior or its documentation is clearly established.

Written by the indexing model from the issue text.

Description

api

According to code comment on UserLocation, country code in ISO_3166-1_alpha-2 are support but when testing with Singapore, it returns 400.
If not all countries listed in ISO_3166-1_alpha-2 are supported, where do we find the actually list of supported country? Thanks.

Tool
{
"type": "web_search_20250305",
"name": "web_search",
"user_location": {
"type": "approximate",
"country": "SG",
"city": "Singapore",
"region": "Singapore",
"timezone": "Asia/Singapore"
}
}

Error Message
BadRequestError: Error code: 400 - {'type': 'error', 'error': {'type': 'invalid_request_error', 'message': 'tools.0.web_search_20250305: Country code SG is not supported.'}}

Dominant language
Python
Stars
4k
Forks
879
Avg merge
10m
Merged PRs (30d)
7

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from anthropics/anthropic-sdk-python

All issues in anthropics/anthropic-sdk-python

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.