Detection of illegal drug activities in Indonesia via social media X

Adi Hanif Sedar, Lukman Yudokusumo, Indra Budi, Amanah Ramadiah, Aris Budi Santoso, Prabu Kresna Putra

Abstract


In today's digital world, social media platforms such as X (formerly Twitter) are widely used for communication but also for illegal activities, such as selling illicit drugs. This study examines how posts from X related to illegal drug sales in Indonesia can be analyzed using machine learning techniques, with a focus on incorporating features related to personally identifiable information (PII) and web URLs. The main questions are how to use classification methods to detect these posts and which drugs are most often mentioned. A total of 11,777 posts from X were collected using web scraping. After cleaning and processing the data, five machine learning models were used. The support vector machine (SVM) model showed the best results with a weighted F1-score of 97.08%. The findings show that abortion pills are the most frequently mentioned drugs, followed by sexual enhancement and anesthetic drugs. This study also used visual tools to show the most common hashtags, posts distribution over time, and types of drugs discussed. This study underlines the importance of monitoring social media to protect public health and highlights how incorporating PII features can improve the detection of illegal activities. Future research should look at posts in other languages and from other platforms, considering PII features for enhanced analysis.

Keywords


Illicit drugs; Public health; Social media; Text classification; X

Full Text:

PDF


DOI: http://doi.org/10.11591/ijai.v15.i4.pp3376-3388

Refbacks

  • There are currently no refbacks.


Copyright (c) 2026 Adi Hanif Sedar, Lukman Yudokusumo, Indra Budi, Amanah Ramadiah, Aris Budi Santoso, Prabu Kresna Putra

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

IAES International Journal of Artificial Intelligence (IJ-AI)
ISSN/e-ISSN 2089-4872/2252-8938 
This journal is published by the Institute of Advanced Engineering and Science (IAES).

View IJAI Stats