# get_host_url

> **Function** in `langsmith`

📖 [View in docs](https://reference.langchain.com/python/langsmith/utils/get_host_url)

Get the host URL based on the web URL or API URL.

## Signature

```python
get_host_url(
    web_url: Optional[str],
    api_url: str,
)
```

---

[View source on GitHub](https://github.com/langchain-ai/langsmith-sdk/blob/c2450d95237768ddd7e77a60f4939f164fca3e8d/python/langsmith/utils.py#L898)