def _load_api_key_from_env_file() -> Optional[str]:
        """
        Load the Serper API key from the .env file.
        
        Returns:
            The API key if found, None otherwise
        """
        try:
            # Try to load from .env file
            env_path = pathlib.Path('.env')
            if env_path.exists():
                with open(env_path, 'r') as f:
                    for line in f:
                        if line.strip().startswith('SERPER_API_KEY='):
                            api_key = line.strip().split('=', 1)[1].strip()
                            # Remove quotes if present
                            if (api_key.startswith('"') and api_key.endswith('"')) or \
                               (api_key.startswith("'") and api_key.endswith("'")):
                                api_key = api_key[1:-1]
                            return api_key
        except Exception:
            pass
        return None

        Load the Serper API key from the .env file.
        
        Returns:
            The API key if found, None otherwise
        
src/upsonic/tools.py