Fruit flies (Bactrocera sp.) are one of the major pests of chili pepper plants that can cause damage and reduce crop yields. Therefore, plant-based attractant alternatives are needed as a means of controlling fruit flies. This study aimed to determine the effect of basil leaf extract (Ocimum sanctum L.), clove leaves (Syzygium aromaticum), and a mixture of both extracts on the number of fruit flies captured, to determine the effect of different extract concentrations, to identify the most effective extract concentration, and to identify the species of fruit flies captured in the traps. This study was conducted on chili plants using a Randomized Block Design (RBD). Data were analyzed using the Kruskal-Wallis test, followed by Pairwise Comparisons. The research results showed that using traps with basil leaf extract, clove leaf extract, and a mixture of the two extracts had significantly different effects on the number of fruit flies caught (p < 0.05); however, further analysis showed no significant difference among the types of extracts (p > 0.05). Different extract concentrations had a significant effect on the number of fruit flies caught (p < 0.05). Post-hoc test results showed that a 20% concentration was significantly different from the control but not significantly different from the 30% concentration, so 20% was established as the lowest effective concentration. The fruit fly species identified during the study were Bactrocera carambolae, Bactrocera dorsalis, Bactrocera kandiensis, and Bactrocera umbrosa.