def _get_search_url(self) -> str:
        """Get the appropriate endpoint URL based on search type."""
        search_type = self.search_type.lower()
        allowed_search_types = ["search", "news"]
        if search_type not in allowed_search_types:
            raise ValueError(
                f"Invalid search type: {search_type}. Must be one of: {', '.join(allowed_search_types)}"
            )
        return f"{self.base_url}/{search_type}"
Get the appropriate endpoint URL based on search type.
src/upsonic/tools.py