We study foliations in \(\mathbb {C}^2\) given by polynomial deformations of the form \(dH+\epsilon \eta =0\) , with \(\gamma (t)\subset H^{-1}(t)\) a family of cycles. The Poincaré first return map is of the form \(P(t)=t+\sum _j \epsilon ^j M_j^\gamma (t).\) The functions \(M_j^\gamma \) are called Melnikov functions and are given by iterated integrals of orbit length at most j. We show that, for each \(k\in \mathbb {N}\) , there exists a universal Noetherianity index \(n_{\scriptscriptstyle H,\gamma }(k)\) , independent of the deformation \(\eta \) , such that, if \(M_j^\gamma \equiv 0\) , for \(j=1,\ldots ,n_{ H,\gamma }(k)\) , then \(M_j^\gamma \) is of orbit length \(j-k\) , for any Melnikov function \(M_j^\gamma \) . We call the smallest index with this property just the Noetherianity index \(\nu _{\scriptscriptstyle H,\gamma }(k)\) . To prove this theorem, we develop a structure theorem for Melnikov functions and use the Ritt–Raudenbush differential algebra theorem. We calculate the universal Noetherianity index \(n_{H,\gamma }(k)\) in various nontrivial examples.