  A $k$-antimagic labeling of a graph $G$ is an injection from $E(G)$ to
$\{1,2,\dots,|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
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
constructive techniques to prove that any caterpillar of order $n$ is $(\lfloor
(n-1)/2 \rfloor - 2)$-antimagic. Furthermore, if $C$ is a caterpillar with a
spine of order $s$, we prove that when $C$ has at least $\lfloor (3s+1)/2
\rfloor$ leaves or $\lfloor (s-1)/2 \rfloor$ 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, 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.
