Nociception is the process whereby primary afferent nerve fibers of the somatosensory system detect noxious stimuli. Pungent irritants from pepper, mint, and mustard plants have served as powerful pharmacological tools for identifying molecules and mechanisms underlying this initial step of pain sensation. These natural products have revealed three members of the transient receptor potential (TRP) ion channel family--TRPV1, TRPM8, and TRPA1--as molecular detectors of thermal and chemical stimuli that activate sensory neurons to produce acute or persistent pain. Analysis of TRP channel function and expression has validated the existence of nociceptors as a specialized group of somatosensory neurons devoted to the detection of noxious stimuli. These studies are also providing insight into the coding logic of nociception and how specification of nociceptor subtypes underlies behavioral discrimination of noxious thermal, chemical, and mechanical stimuli. Biophysical and pharmacological characterization of these channels has provided the intellectual and technical foundation for developing new classes of analgesic drugs.