The use of Internet-based systems for infectious disease surveillance has been increasingly explored in recent years. However, few studies have used Internet search query or social media data to monitor spatial and temporal trends of avian influenza in China. This study investigated the potential of using search query and social media data in detecting and monitoring avian influenza A (H7N9) cases in humans in China. We collected weekly data on laboratory-confirmed H7N9 cases in humans, as well as H7N9-related Baidu Search Index (BSI) and Weibo Posting Index (WPI) data in China from 2013 to 2017, to explore the spatial and temporal trends of H7N9 cases and H7N9-related Internet search queries. Our findings showed a positive relationship of H7N9 cases with BSI and WPI search queries spatially and temporally. The outbreak threshold time and peak time of H7N9-related BSI and WPI searches preceded H7N9 cases in most years. Seasonal autoregressive integrated moving average (SARIMA) models with BSI (β?=?0.008, p?0.001) and WPI (β?=?0.002, p?=?0.036) were used to predict the number of H7N9 cases. Regression tree model analysis showed that the average H7N9 cases increased by over 2.4-fold (26.8/11) when BSI for H7N9 was?>??=?11524. Both BSI and WPI data could be used as indicators to develop an early warning system for H7N9 outbreaks in the future.