> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://openrouter.ai/docs/llms.txt.
> For full documentation content, see https://openrouter.ai/docs/llms-full.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://openrouter.ai/docs/_mcp/server.

# UserLocation - Python SDK

The Python SDK and docs are currently in beta.
Report issues on [GitHub](https://github.com/OpenRouterTeam/python-sdk/issues).

Approximate user location for location-biased search results. Passed through to native providers that support it (e.g. Anthropic).

## Fields

| Field      | Type                                                                                   | Required             | Description |
| ---------- | -------------------------------------------------------------------------------------- | -------------------- | ----------- |
| `city`     | *OptionalNullable\[str]*                                                               | :heavy\_minus\_sign: | N/A         |
| `country`  | *OptionalNullable\[str]*                                                               | :heavy\_minus\_sign: | N/A         |
| `region`   | *OptionalNullable\[str]*                                                               | :heavy\_minus\_sign: | N/A         |
| `timezone` | *OptionalNullable\[str]*                                                               | :heavy\_minus\_sign: | N/A         |
| `type`     | [components.WebSearchPluginType](/docs/sdks/components/components/websearchplugintype) | :heavy\_check\_mark: | N/A         |