Mammals taste many compounds yet use a sensory palette consisting of only five basic taste modalities: sweet, bitter, sour, salty and umami (the taste of monosodium glutamate). Although this repertoire may seem modest, it provides animals with critical information about the nature and quality of food. Sour taste detection functions as an important sensory input to warn against the ingestion of acidic (for example, spoiled or unripe) food sources. We have used a combination of bioinformatics, genetic and functional studies to identify PKD2L1, a polycystic-kidney-disease-like ion channel, as a candidate mammalian sour taste sensor. In the tongue, PKD2L1 is expressed in a subset of taste receptor cells distinct from those responsible for sweet, bitter and umami taste. To examine the role of PKD2L1-expressing taste cells in vivo, we engineered mice with targeted genetic ablations of selected populations of taste receptor cells. Animals lacking PKD2L1-expressing cells are completely devoid of taste responses to sour stimuli. Notably, responses to all other tastants remained unaffected, proving that the segregation of taste qualities even extends to ionic stimuli. Our results now establish independent cellular substrates for four of the five basic taste modalities, and support a comprehensive labelled-line mode of taste coding at the periphery. Notably, PKD2L1 is also expressed in specific neurons surrounding the central canal of the spinal cord. Here we demonstrate that these PKD2L1-expressing neurons send projections to the central canal, and selectively trigger action potentials in response to decreases in extracellular pH. We propose that these cells correspond to the long-sought components of the cerebrospinal fluid chemosensory system. Taken together, our results suggest a common basis for acid sensing in disparate physiological settings.