Extract models and AICc from auto.arima() as data frame

In the following example, how do I extract the models and corresponding AICcs as a data frame? For instance, first two rows would be:

model AICc
ARIMA(2,0,2)(1,0,1)[12] with non-zero mean 1003.3450
ARIMA(0,0,0) 996.8378
library(forecast)

# Data
set.seed(123)
z <- ts(rnorm(120, 30, 17), start=2008, frequency=12)

# Auto ARIMA
auto.arima(z, trace = TRUE)
#> 
#>  ARIMA(2,0,2)(1,0,1)[12] with non-zero mean : 1003.345
#>  ARIMA(0,0,0)            with non-zero mean : 996.8378
#>  ARIMA(1,0,0)(1,0,0)[12] with non-zero mean : 999.0416
#>  ARIMA(0,0,1)(0,0,1)[12] with non-zero mean : 999.1399
#>  ARIMA(0,0,0)            with zero mean     : 1187.768
#>  ARIMA(0,0,0)(1,0,0)[12] with non-zero mean : 996.902
#>  ARIMA(0,0,0)(0,0,1)[12] with non-zero mean : 997
#>  ARIMA(0,0,0)(1,0,1)[12] with non-zero mean : 999.0153
#>  ARIMA(1,0,0)            with non-zero mean : 998.9257
#>  ARIMA(0,0,1)            with non-zero mean : 998.9227
#>  ARIMA(1,0,1)            with non-zero mean : 996.8584
#> 
#>  Best model: ARIMA(0,0,0)            with non-zero mean
#> Series: z 
#> ARIMA(0,0,0) with non-zero mean 
#> 
#> Coefficients:
#>          mean
#>       30.2625
#> s.e.   1.3823
#> 
#> sigma^2 estimated as 231.2:  log likelihood=-496.37
#> AIC=996.74   AICc=996.84   BIC=1002.31

Created on 2020-11-22 by the reprex package (v0.3.0)

It looks like broom has an arima method for tidy(), did you try that?

Thanks for your response. I just tried tidy(); not working :frowning: Could you give me a hand?