def __init__(self, api_key: Optional[str] = None) -> None:
        """
        Initialize the Dappier Real Time Search tool spec.

        To obtain an API key, visit: https://platform.dappier.com/profile/api-keys
        """
        from dappier import Dappier

        self.api_key = api_key or os.environ.get("DAPPIER_API_KEY")
        if not self.api_key:
            raise ValueError(
                "API key is required. Provide it as a parameter or set DAPPIER_API_KEY in environment variables.\n"
                "To obtain an API key, visit: https://platform.dappier.com/profile/api-keys"
            )

        self.client = Dappier(api_key=self.api_key)

        Initialize the Dappier Real Time Search tool spec.

        To obtain an API key, visit: https://platform.dappier.com/profile/api-keys
        
llama-index-integrations/tools/llama-index-tools-dappier/llama_index/tools/dappier/real_time_search/base.py