By constructing a novel index, the oil security attention index, this paper uses the heterogeneous autoregressi (HAR)‐type and its extended models to study whether oil security attention can predict oil volatility. Based on the definition of the different dimensions of oil security and three‐pass regression filter (TPRF) dimension reduction technology, combined with Google search volume data of 23 keywords related to oil security, the oil security attention index is constructed. Considering the potential nonlinear relationship between attention and oil volatility, we incorporate asymmetric effects in the new extended HAR‐type models. The research findings show that the oil security attention index we propose can capture the volatility of West Texas Intermediate. The out‐of‐sample results indicate that the extended models have better predictive power, which confirms the asymmetric relationship between oil security attention and oil volatility. In the robustness analysis, we compare TPRF with traditional principal component analysis (PCA) and partial least squares (PLS), and show that the oil security attention index constructed using TPRF has more favourable information than PCA and PLS to capture the oil security attention of the public.