This multicenter, randomized study will evaluate the efficacy and safety of apatinib compared to docetaxel treatment in patients with advanced gastric cancer. At the start of the trial, patients will be randomized to one treatment arm: Arm A: apatinib 850mg qd every 3 weeks; Arm B: docetaxel 60mg/m2 every 3 weeks. Tumor assessment will be done every 8 weeks according to RECIST 1.1. The primary endpoint is progression free survival (PFS).