Organisms are equipped with regulatory systems that display a variety of dynamical behavior ranging from simple stable steady states, to switching and multistability, to oscillations. Earlier work has shown that oscillations in protein concentrations or gene expression levels are related to the presence of at least one negative feedback loop in the regulatory network. Here, we study the dynamics of a very general class of negative feedback loops. Our main result is that, when a single negative feedback loop dominates the dynamical behavior, the sequence of maxima and minima of the concentrations exhibit a pattern that uniquely identifies the interactions of the loop. This allows us to devise an algorithm to (i) test whether observed oscillating time series are consistent with a single underlying negative feedback loop, and if so, (ii) reconstruct the precise structure of the loop, i.e., the activating/repressing nature of each interaction. This method applies even when some variables are missing from the data set, or if the time series shows transients, like damped oscillations. We illustrate the relevance and the limits of validity of our method with three examples: p53-Mdm2 oscillations, circadian gene expression in cyanobacteria, and cyclic binding of cofactors at the estrogen-sensitive pS2 promoter.