In this paper, we study the rainbow Erdős-Rothschild problem with respect to k-term arithmetic progressions. For a set of positive integers S ⊆ [n], an r-coloring of S is 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 ≥ k ≥ 3, we show that g r,k (S) < g r,k ([n]) for any proper subset S ⊂ [n]. Further, we prove that lim n→∞ g r,k ([n])/(k − 1) n = r k−1 . Our result is asymptotically best possible and implies that, almost all rainbow k-APfree r-colorings of [n] use only k − 1 colors.