def get_earnings_history(api_key: Dict[str, str], symbol: str) -> pd.DataFrame:
    """
    Get actual, estimated earnings and surprise history for a given stock ticker symbol.

    If somehow api response is not found, returns an empty dataframe.
    """
    ALPHA_VANTAGE_API_KEY = api_key["ALPHA_VANTAGE"]

    earnings_df = pd.DataFrame()

    response = requests.request(
        "GET",
        f"https://www.alphavantage.co/query?function=EARNINGS&symbol={symbol}&apikey={ALPHA_VANTAGE_API_KEY}",
    )
    if response.status_code != 200:
        return earnings_df

    earnings_df = pd.json_normalize(response.json())

    earnings_df = pd.DataFrame(earnings_df["quarterlyEarnings"][0])
    earnings_df = earnings_df[
        [
            "fiscalDateEnding",
            "reportedDate",
            "reportedEPS",
            "estimatedEPS",
            "surprise",
            "surprisePercentage",
        ]
    ]
    return earnings_df.rename(
        columns={
            "fiscalDateEnding": "Fiscal Date Ending",
            "reportedEPS": "Reported EPS",
            "estimatedEPS": "Estimated EPS",
            "reportedDate": "Reported Date",
            "surprise": "Surprise",
            "surprisePercentage": "Surprise Percentage",
        }
    )

    Get actual, estimated earnings and surprise history for a given stock ticker symbol.

    If somehow api response is not found, returns an empty dataframe.
    
llama-index-integrations/tools/llama-index-tools-finance/llama_index/tools/finance/earnings.py