Accurate forecasting of traffic flow is crucial for intelligent traffic control and guidance. It is very challenging to forecast the traffic flow due to the high non‐linearity, complexity and dynamicity of the data. Most existing forecasting methods focus on designing complicated graph neural network architectures to capture the spatio‐temporal features of traffic data with the help of predefined graphs. However, traffic data exhibit a strong spatial dependency, which means that there are often complex correlations between nodes in a road network topology graph. Moreover, the spatial correlations of the road network change over time. To capture the properties of the road network topology graph, a novel spatio‐temporal adaptive graph convolutional networks model (STAGCN) based on deep learning is proposed. Utilize adaptive graph generation block to capture the static and dynamic structures of the traffic road network respectively, and they are integrated to construct an adaptive road network topology graph. Then the spatio‐temporal features of the traffic data are captured using spatio‐temporal convolution blocks. Experiments were conducted on publicly available traffic datasets for freeway traffic in California, USA, and the results showed that the prediction accuracy of the STAGCN model outperformed multiple baseline methods.