Why health researchers turned to Twitter
Social media gives health researchers something surveys rarely can: large volumes of unprompted talk, time-stamped as events happen. People describe symptoms, share experiences of care, react to public health campaigns and pass on misinformation, often in public. Hawn (2009) described early on how Twitter, Facebook and other platforms were starting to reshape communication in health care, and Alshaikh et al. (2014) reviewed how social network sites were being used as a way to collect health data.
During the 2010s Twitter became the platform most used in this work. Posts were short and similar in length, which suited text classification; the data were time-stamped, which suited time-series and surveillance; follower links allowed network analysis; and, crucially, an application programming interface (API) let researchers collect large samples cheaply. Sinnenberg et al. (2017) systematically reviewed this literature and grouped the studies by how they used the platform. Their categories are still a useful map of the field and are summarised in the table below.
| Use | What the researcher does | Typical doctoral question |
|---|---|---|
| Content analysis | Codes what people post about a health topic | How do patients describe side effects of a new treatment? |
| Sentiment analysis | Classifies posts as positive, negative or neutral | How did attitudes to a vaccine change after a policy announcement? |
| Surveillance | Tracks the volume of posts as a signal of events | Do symptom mentions rise before official influenza reports? |
| Prediction | Builds models from posting behaviour | Can language features predict later reported distress? (high ethical risk) |
| Engagement | Measures responses to health messages | Which campaign messages are shared and by whom? |
| Network analysis | Maps who connects to whom | How does misinformation spread between communities? |
| Recruitment | Uses the platform to reach participants | Can a hard-to-reach group be recruited for a survey or interview study? |
| Intervention | Delivers a health intervention through the platform | Does a support account change behaviour? |
Recruitment deserves separate mention because it is different in kind: the platform is used to reach people who then take part in a conventional study. Fenner et al. (2012) explored recruitment of young women for a health study through a social networking site, an approach many doctoral projects still use. The usual cautions about online samples then apply, and the survey itself should be reported with a checklist such as CHERRIES (Eysenbach, 2004).
What changed after 2023
That is no longer true. In 2023 Twitter, renamed X in July of that year, ended free API access and closed the Academic Research access route that many doctoral projects relied on; access now comes through paid tiers whose terms change and whose costs can be beyond a typical research budget. Other platforms tightened access in the same period: Reddit restricted its API in 2023, which also affected third-party archives built on it, and Meta closed CrowdTangle in August 2024. In the European Union, the Digital Services Act created a route for vetted researchers to request data from very large platforms for research on systemic risks, but it is a formal application process, not an open feed.
For a doctoral researcher this has three consequences. First, data access is now a feasibility risk that belongs in the proposal and the risk register, with a fallback. Second, studies built on older archived datasets must check whether the licence still allows use and sharing. Third, the choice of platform should follow the research question and the population, not habit: the people a health study needs to hear from may now be on other platforms entirely.
| Access route | Strengths | Limits to plan for |
|---|---|---|
| Paid platform API | Current data; structured fields | Cost; changing terms; rate limits; licence may forbid sharing |
| Regulated researcher access (e.g. EU Digital Services Act) | Formal, potentially richer data | Eligibility rules, application time, scope limited to approved questions |
| Existing archived datasets | Cheap; may cover past events | Licence status; deleted posts; unknown sampling |
| Open or decentralised platforms | More open interfaces on some services | Different, often smaller user populations |
| Data donation or consented collection | Consent and context are built in | Smaller samples; recruitment effort |
| Manual collection of a small sample | Feasible for qualitative work | Labour; must respect platform terms |
Validity: what social media data can and cannot show
Social media data are found data: they were produced for other purposes, by people who chose to post, on a platform whose design shapes what is said. Three threats matter most in health research.
- Who is speaking. Platform users are not a sample of any general population, and a small number of accounts, including organisations and automated accounts, produce a large share of posts. Findings describe posts, not people, unless the design links the two.
- What the words mean. Mentions of a condition may be jokes, news, marketing or self-disclosure. Keyword searches need validation against a hand-coded sample, with agreement statistics reported.
- Whether models generalise. Reviews of mental health prediction from social media found weak construct validity, unclear ground truth and little external validation (Chancellor & De Choudhury, 2020; Guntuku et al., 2017). Ernala et al. (2019) showed that proxy diagnostic signals inferred from posts did not match clinically confirmed diagnoses well, and Harrigian et al. (2020) found that models often performed poorly when applied to new datasets.
Sinnenberg and colleagues also noted the absence of standard procedures and the questions of validity, reliability and scalability that remain open (Sinnenberg et al., 2017). A doctoral design answers these questions explicitly rather than leaving them to the limitations section. For a critical look at one social media mental health study, see Sentiment analysis and doctoral mental health; for conventional primary data in medical doctorates, see Collecting primary data for a medical PhD in the UK.
Ethics: public is not the same as fair game
That a post is publicly visible does not settle the ethical questions. In a survey of Twitter users, Fiesler and Proferes (2018) found that many were unaware their posts could be used in research and that their comfort depended on context, such as who the researchers were and whether the posts would be quoted. Health topics raise the stakes, because a quoted post can usually be traced back to its author by a simple search.
The Association of Internet Researchers guidelines ask researchers to weigh expectations of privacy, vulnerability of the people involved and potential harm, rather than applying a single rule (franzke et al., 2020). For health research specifically, Benton et al. (2017) recommend ethics review even where it might not be strictly required, collecting only the data needed, separating identifiers from content, avoiding verbatim quotation of sensitive posts and being cautious about linking accounts to other data. In the UK and EU, posts about health are special category personal data under data protection law, so a lawful basis, data minimisation and secure storage must be documented.
Designing the study: a step-by-step plan
- Start from the question. Decide whether you need what people say (content), how much they say it (volume), who talks to whom (networks) or access to people (recruitment). Each implies different data.
- Choose the platform for the population. Justify the platform by who uses it and how they discuss the topic, not by which data are easiest to obtain.
- Secure access early. Confirm the route, cost, terms and whether you may keep and share the data, and agree a fallback with your supervisor.
- Define the sample. Specify search terms, languages, dates and exclusions; test the terms on a pilot sample and report precision.
- Validate measurement. Hand-code a random subset with two coders, report agreement, and compare any automated classifier with the hand-coded labels.
- Handle bots and organisations. Decide in advance how you will identify and treat automated and institutional accounts.
- Protect people. Obtain ethics approval, pseudonymise, store data securely and paraphrase rather than quote sensitive posts.
- Interpret within limits. Describe findings as patterns in posts on one platform at one time, not as population prevalence.
Worked example (illustrative)
An illustrative case: a doctoral researcher in public health wants to understand how people describe side effects after starting a new class of weight-loss medicine. Her first plan, to collect all posts mentioning the drug names from X for two years, fails the feasibility test: the paid access tier needed is beyond her budget, and the licence would not let her share the data with her examiners.
She revises the design. The research question becomes "What side effects and coping strategies do users describe, and how do they talk about stopping treatment?", a content analysis question that does not need millions of posts. She samples posts from two public patient forums whose terms permit research use, stratified by month, and hand-codes 1,200 posts with a second coder on a 20% subset. She excludes commercial accounts, paraphrases every example she reports, and states that her findings describe forum posts, not the experience of all patients. A short follow-on survey, recruited through the forums and reported with CHERRIES (Eysenbach, 2004), lets consenting participants add context. The design is smaller than her first plan, but it is feasible, ethical and defensible at the viva.
What to report
| Item | What to state |
|---|---|
| Platform and access route | Platform, interface or dataset used, dates of collection, licence terms |
| Sampling | Search terms, languages, date range, filters, exclusions and the number of posts at each step |
| Accounts | How bots, organisations and duplicate accounts were identified and handled |
| Measurement | Coding scheme, coder training, agreement statistics, classifier validation |
| Ethics and data protection | Approval, lawful basis, pseudonymisation, storage, quotation policy |
| Generalisability | Who the data can and cannot speak for; time period and platform limits |
| Sharing | What can be shared (IDs, code, codebook) under the platform terms |
Common mistakes
- Writing a proposal that assumes free API access without confirming cost and licence.
- Treating counts of posts as prevalence of a condition in the population.
- Using keyword matches without checking how many matched posts are actually about the topic.
- Reporting an accurate classifier without testing it on data from a different time or platform.
- Quoting sensitive health posts verbatim, so that authors can be found by a search.
- Ignoring bots, news outlets and organisational accounts in a study of public opinion.
Key takeaways
- Health researchers have used Twitter for content, sentiment, surveillance, engagement, network, recruitment and intervention studies (Sinnenberg et al., 2017).
- Free and academic access to X data ended in 2023, so data access is now a feasibility question for the proposal.
- Social media data describe posts by platform users, not populations, and models built on them often fail to generalise (Harrigian et al., 2020; Chancellor & De Choudhury, 2020).
- Public posts still raise ethical questions; users often do not expect research use (Fiesler & Proferes, 2018), and health data need protective handling (Benton et al., 2017; franzke et al., 2020).
- A defensible study states its access route, sampling, validation, ethics and limits in full.
