A k-antimagic labeling of a graph G is an injection from E(G) to {1, 2, . . . , |E(G)| + k} such that all vertex sums are pairwise distinct, where the vertex sum at vertex u is the sum of the labels assigned to edges incident to u. We call a graph k-antimagic when it has a k-antimagic labeling, and antimagic when it is 0-antimagic. Hartsfield and Ringel [13] conjectured that every simple connected graph other than K 2 is antimagic, but the conjecture is still open even for trees. Here we study k-antimagic labelings of caterpillars, which are defined as trees the removal of whose leaves produces a path, called its spine. As a general result, we use algorithmic aproaches, i.e., constructive approaches, to prove that any caterpillar of order n is ( (n − 1)/2 − 2)-antimagic. Furthermore, if C is a caterpillar with a spine of order s, we prove that when C has at least (3s + 1)/2 leaves or (s − 1)/2 consecutive vertices of degree at most 2 at one end of a longest path, then C is antimagic. As a consequence of a result by Wong and Zhu [22], we also prove that if p is a prime number, any caterpillar with a spine of order p, p − 1 or p − 2 is 1-antimagic. *