The internet is a medium for research, a place for the exchange of drugs and knowledge, and a method for governing and surveilling drug users. Opportunities for drug research with and in digital spaces are expanding, using internet mediated methods such as online surveys, web scraping, and research with online communities such as users of cryptomarkets and apps. As the sphere of social data grows, so does the degree to which the data itself is a product of fractured, governed, privatised set of spaces. Research often has to work with these structural aspects and researchers have to be aware of the structural mediation of their data. The opportunities for research also demand that researchers consider the validity of traditional scientific hierarchies such as the assumed superiority of probability sampling, and parse the naturally occurring taxonomies that are produced by the systems they research. A positive development has been the growth of internet focused researchers who operate in and outwith the academy and who are creating an independent research infrastructure with potential for a democratic research politics. KW: Online, data, research methods Article: Arranging drug deals by the darknet cryptomarkets, via Instagram, Grindr or WeChat, or through Gumtree, are processes involving buyers and users in platforms with very different capabilities and risks (Barratt and Aldridge, 2016; Aldridge and Askew, 2017; Yang and Luo, 2017). Digital platforms allow for the often rapid production of massive data and invite the production of new methods such as virtual ethnography, crowdsourcing, web scraping, data mining or digital trace analysis (Aldridge and Décary-Hétu, 2016; Giommoni and Gunder, 2018). They invite new social research capacities such as the production of near real time metrics and rapid intervention analysis (Horton-Eddison and Cristofaro, 2017), which can support research with hard to reach groups who wish to remain anonymous (Coomber, 1997a). They are also new sites for surveillance and policing of users and dealers, and attempts to regulate the flow of information about illicit activity (Ladegaard, 2018).