The role of the central and peripheral nervous system in the generation of migraine is not well understood. Our aim was to determine whether peripheral trigeminal nerve stimuli, such as nasopharyngeal swabs, could trigger migraine attacks. A survey was sent to 658 doctors, nurses and medical students, asking about the presence of headache suggestive of migraine after carrying out a SARS-CoV-2 swab test, their previous history of migraine, and demographic and headache-related characteristics. Those who tested positive or had associated clinical signs and symptoms of COVID were excluded. A total of 377 people were recruited, 309 of whom were included in the sample. Forty-seven (15.2%) reported headache suggestive of migraine after the swab test and 42 (89.4%) of them had a previous history of migraine. The risk of developing migraine was higher in the subgroup of patients with a history of headache suggestive of migraine - odds ratio: 22.6 (95% confidence interval: 8.597-59.397); p < 0.001. No differences were found between the main characteristics of attacks suggestive of migraine before and after the swab test, except for a lower percentage of associated aura afterwards (42.8% vs. 26.1%; p = 0.016). Individuals with previous attacks suggestive of migraine with a frequency of more than two episodes per month had a higher risk of developing a headache suggestive of migraine after the test - odds ratio = 2.353 (95% confidence interval: 1.077-5.145); p = 0.03. Nasopharyngeal swabbing may trigger migraine attacks, with a greater likelihood in individuals with a higher frequency of previous migraines. This would confirm the idea that peripheral stimuli on the trigeminal nerve can trigger migraine attacks in individuals with migraine, according to their degree of trigeminovascular sensitisation.