This research explores public sentiment towards the Indonesian government’s policies in the era of social commerce, based on Minister of Trade Regulation No. 31 of 2023. Sentiment analysis was conducted on a dataset comprising 1013 tweets on Twitter, employing various machine learning algorithms, including Naïve Bayes, Logistic Regression, Random Forest, SVM, and KNN. The results reveal that the Support Vector Machine (SVM) algorithm achieved the highest accuracy rate of 87%, outperforming other algorithms. Analyzing public sentiment towards the mentioned government policies, positive sentiment accounted for 20.2%, while negative sentiment reached 79.8%. This suggests that the policies, as outlined in the regulation, did not elicit a positive response from the public. Recommendations for future research include expanding the dataset and incorporating diverse data sources beyond Twitter for enhanced accuracy. This study contributes valuable insights into public sentiment analysis, particularly in the context of social commerce policies, providing a foundation for further investigations and policy adjustments.