Research Letter
Abstract
A sentiment analysis of 5051 Twitter posts from January 2022 found that 53.4% of them expressed positive views on ivermectin as a COVID-19 treatment, 35.6% of them were neutral, and 11% of them were negative, highlighting the polarized public perception and the need for careful interpretation of social media data in health communication.
JMIR Form Res 2025;9:e50536doi:10.2196/50536
Keywords
Introduction
As the COVID-19 pandemic evolves, the scientific community confronts the limitations of vaccines due to emerging viral mutations that potentially decrease vaccine efficacy [
], thus necessitating a parallel investigation into additional therapeutic agents. Ivermectin, a well-established, safe drug, has emerged as a repurposed drug candidate due to preliminary studies suggesting its antiviral properties against SARS-CoV-2 in vitro [ , ]. Nonetheless, the scientific debate remains vigorous, with discussions on the drug’s appropriate formulation and dosing for potential COVID-19 prophylaxis and treatment [ ].Simultaneously, ivermectin’s role has garnered widespread attention on social media, reflecting the public's quest for alternative treatments. Twitter (now X), a hub for real-time public discourse, has become a fertile ground for divergent views on COVID-19 treatment [
, ]. This sentiment analysis focuses on Twitter discussions about ivermectin, showing public opinion that, while not devoid of misinformation risks, these discussions offer an alternative lens to understand the societal pulse on this contentious topic [ ]. By examining the sentiments expressed on Twitter, we aim to add nuance to the ongoing discourse, acknowledging the platform's influence on public perception and its implications for health communication strategies.Methods
Overview
This cross-sectional examined the COVID-19–related sentiments on ivermectin using Twitter data. Primary data were collected from Twitter posts about ivermectin worldwide from January 15 to 22, 2022. We searched posts with the keyword “ivermectin” and retrieved raw data with various variables. Data cleaning involved lowercasing capital letters, eliminating retweet symbols, removing punctuation marks, and other preprocessing steps to ensure data accuracy [
]. People’s sentiments were determined by creating a corpus (body of text) and loading a lexicon dictionary based on the positive and negative words. The sentiment score was calculated with the Bing method using a range of –6 to +6 and considered 3 sentiment types: positive, neutral, and negative [ , ]. The Bing lexicon was chosen for its proven effectiveness and simplicity in extensive dataset analysis. Frequency analysis of single terms (unigrams), word pairs (bigrams), and bigram networks helped identify frequently mentioned terms and explore relationships between words [ , ]. Despite its simplicity, this approach is as robust as more complex methods, as it accurately categorizes sentiments and identifies patterns through unigram and bigram frequency analysis [ ]. This computational analysis–focused methodology offers valuable insights into public sentiment, complementing traditional clinical evaluation without extensive statistical validation. Data were mined using Twitter’s limited application programming interface (version 2) and analyzed using RStudio (R Foundation) and relevant packages for visualization.Ethical Considerations
There was no direct connection with Twitter users. We removed all individual data, usernames, IDs, and tweets in the manuscript and supporting material. Therefore, ethical approval was not required.
Results
In total, 5051 ivermectin-related tweets underwent sentiment analysis, revealing a prevailing positive sentiment (53.4%), followed by neutral (35.6%) and negative (11%) sentiments among the analyzed tweets (
). The analysis identified frequently mentioned positive terms such as “medication,” “potentially,” and “treatment,” while negative terms like “poised,” “smuggling,” and “toxic” were less common. Notably, analysis of word pairings unveiled strong associations with positive sentiments, further supporting the notion of ivermectin’s potential efficacy in COVID-19 treatment. Examining these word pairings facilitated in-depth exploration of sentiment patterns within the bigram network, revealing significant connections and relationships in the analyzed tweets ( ).

Discussion
Principal Findings
Our analysis shows that tweets about repurposing ivermectin for COVID-19 treatment are predominantly positive. Terms like “medication,” “potentially,” and “treatment” frequently appeared in positive contexts, reinforcing this finding. Phrases such as “ivermectin works,” “available ivermectin,” and “ivermectin medication” were strongly associated with positive sentiment. These results align with previous findings showing ivermectin’s popularity on Twitter for COVID-19 treatment [
, ]. However, some negative sentiment was observed, particularly concerning warnings from the Food and Drug Administration and the limited clinical evidence supporting ivermectin’s efficacy in COVID-19 prevention and treatment [ ].Twitter data have proven valuable in monitoring public responses to the COVID-19 pandemic, as evidenced by a study of millions of SARS-CoV-2–related tweets [
]. This study not only identified dominant topics like new cases, death rates, and preventive measures, but also explored the geographic distribution of sentiments through tweet-embedded geolocation data (code available in ).Limitations
Of note, the findings are based on Twitter data, which may not represent the entire population’s sentiments. Therefore, researchers conducted cross-validation of the sources.
Conclusions
This sentiment analysis highlights the polarized perception of ivermectin in COVID-19–related discourse and reflects broader public health debates. Given the regulatory advisories and the limited clinical evidence, these public sentiments must be interpreted cautiously.
Acknowledgments
We acknowledge receiving the Ministry of Higher Education, Science, and Technology Overseas Postgraduate Education scholarship (DIKTI BPP-LN grant T/915/D3.2/KD.02.01/2019) awarded to AK. Despite this financial support, we have diligently maintained transparency and objectivity in our work.
Conflicts of Interest
None declared.
References
- Jiang S. Don't rush to deploy COVID-19 vaccines and drugs without sufficient safety guarantees. Nature. Mar 16, 2020;579(7799):321-321. [CrossRef] [Medline]
- Caly L, Druce JD, Catton MG, Jans DA, Wagstaff KM. The FDA-approved drug ivermectin inhibits the replication of SARS-CoV-2 in vitro. Antiviral Res. Jun 2020;178:104787. [FREE Full text] [CrossRef] [Medline]
- The WP. NIH trial may settle debate over ivermectin as a covid-19 treatment. The Washington Post. URL: https://www.washingtonpost.com/health/2021/04/08/ivermectin-covid-drug/ [accessed 2023-03-06]
- de Melo T, Figueiredo CMS. Comparing news articles and tweets about COVID-19 in Brazil: sentiment analysis and topic modeling approach. JMIR Public Health Surveill. Feb 10, 2021;7(2):e24585. [FREE Full text] [CrossRef] [Medline]
- Garcia K, Berton L. Topic detection and sentiment analysis in Twitter content related to COVID-19 from Brazil and the USA. Appl Soft Comput. Mar 2021;101:107057. [FREE Full text] [CrossRef] [Medline]
- Hill S, Scott R. Developing an Approach to Harvesting, Cleaning, and Analyzing Data from Twitter Using R. Inf Sys Educ J. 2017;15(3):15.
- Liu B, Hu M, Cheng J. Opinion observer: analyzing and comparing opinions on the Web. 2005. Presented at: WWW '05: Proceedings of the 14th international conference on World Wide Web; May 10-14, 2005:342-351; Chiba, Japan. [CrossRef]
- Liu B. Sentiment Analysis: Mining Opinions, Sentiments, and Emotions. Cambridge, United Kingdom. Cambridge University Press; 2020.
- Why You Should Not Use Ivermectin to Treat or Prevent COVID-19. Food and Drug Administration. URL: https://nycourts.gov/reporter/webdocs/Why-You-Should-Not-Use-Ivermectin-to-Treat-or-Prevent-COVID-19.pdf [accessed 2022-03-01]
- Xue J, Chen J, Hu R, Chen C, Zheng C, Su Y, et al. Twitter discussions and emotions about the COVID-19 pandemic: machine learning approach. J Med Internet Res. Nov 25, 2020;22(11):e20550. [FREE Full text] [CrossRef] [Medline]
Edited by A Mavragani; submitted 05.07.23; peer-reviewed by R Gore, J Plasek, A Naser, B Cao; comments to author 16.11.23; revised version received 12.02.24; accepted 09.09.24; published 27.03.25.
Copyright©Angga Prawira Kautsar, Rano Kurnia Sinuraya, Jurjen van der Schans, Maarten Jacobus Postma, Auliya A Suwantika. Originally published in JMIR Formative Research (https://formative.jmir.org), 27.03.2025.
This is an open-access article distributed under the terms of the Creative Commons Attribution License (https://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work, first published in JMIR Formative Research, is properly cited. The complete bibliographic information, a link to the original publication on https://formative.jmir.org, as well as this copyright and license information must be included.