This protocol describes a behavioral assay for recording sugar-elicited search behavior using Drosophila melanogaster. The assay can be utilized to study feeding and foraging-related behaviors, as well as the underlying neuronal mechanisms.