Agricultural price forecasting plays an important role in stabilising markets and ensuring food security. It provides insights for various stakeholders to optimise planting choices, allocate resources efficiently and mitigate potential risks. However, price forecasting during food safety incidents poses unique challenges. This study focused on a case of tuna fraud in Spain in 2017, which caused 105 people to fall ill and influenced consumer behaviour in fish purchases. To forecast fish prices during an incident of fraud, we used an artificial neural network model (ANN) based on the price of tuna and its substitutes, salmon and hake, as well as a communication index based on the number of posts regarding the tuna fraud from the social media platform X (formerly Twitter). ANN was compared with a threshold vector autoregressive model (TVAR), a classical time series econometric model that offers valuable insights into price dynamics. The results showed that, in the short term, TVAR offers a better price forecast for tuna and salmon, considering the impacts of the X platform. In the medium term, ANN outperformed TVAR. This study contributes to the ANN literature regarding agrifood price forecasting during food safety incidents.