This research proposes a novel keyword extraction algorithm, WPKE, for analyzing complaints in Indonesian tweets, and compares its performance with the existing RAKE algorithm. WPKE achieves an accuracy of 72.92%, significantly higher than RAKE's 35.42%, by employing a weighting system based on grammatical relationships in the language. The study emphasizes the importance of processing unstructured data from social media for effective customer service and decision-making in companies.