Search code examples
google-sheetsweb-scrapingxpathgoogle-query-languagegoogle-finance

How to get Consumer Price Index(CPI) in Google Sheets?


Need to get Australia Consumer Price Index(CPI) and update all the prices in my sheet every quarter based on it.

Tried to do that using GoogleFinance.

Found that its possible to use exchange like ASX for that and indexes from the list. But CPI index is not represented there.

Is there any way to get Australia CPI index in Google Sheets or calculate it based on other indexes?


Solution

  • try:

    =QUERY(ARRAY_CONSTRAIN(IMPORTXML(
     "https://au.investing.com/economic-calendar/cpi-1011", "//*"), 1500, 5), 
     "select Col4 where Col3 ='Actual' limit 1", 0)
    

    0