Managers gain new insights into how operational benefits can be achieved. Forecasting problems for passenger flow in airports are gaining interest among marketing researchers, but comparison of stochastic optimisation methods via deep learning forecasts with search query data is not yet available in the aviation field. To fill this gap, the current study predicts the demand of Madrid airport demand with Google search query data using H2O deep learning method. The findings indicate that there is a long-term relationship between search queries and actual passenger demand. Besides, search queries “fly to madrid,” and “flights to madrid spain” were found to be the cause of the actual domestic air passenger demand in Madrid. Also, to determine the best forecasting accuracy, stochastic gradient descent (SGD) optimisers were used. Specifically, findings indicate that Adam is a better optimiser increasing forecasting accuracy for Madrid airports.