  In this paper, we study the rainbow Erd\H{o}s-Rothschild problem with respect
to $k$-term arithmetic progressions. For a set of positive integers $S
\subseteq [n]$, an $r$-coloring of $S$ is \emph{rainbow $k$-AP-free} if it
contains no rainbow $k$-term arithmetic progression. Let $g_{r,k}(S)$ denote
the number of rainbow $k$-AP-free $r$-colorings of $S$. For sufficiently large
$n$ and fixed integers $r\ge k\ge 3$, we show that $g_{r,k}(S)<g_{r,k}([n])$
for any proper subset $S\subset [n]$. Further, we prove that $\lim_{n\to
\infty}g_{r,k}([n])/(k-1)^n= \binom{r}{k-1}$. Our result is asymptotically best
possible and implies that, almost all rainbow $k$-AP-free $r$-colorings of
$[n]$ use only $k-1$ colors.
