In the last 20 years, the neutron time-of-flight facility n_TOF at CERN has been providing relevant data for the astrophysical slow neutron capture process (s process). At n_TOF, neutron-induced radiative capture (n,γ) as well as (n,p) and (n,α) reaction cross sections are measured as a function of energy, using the time-of-flight method. Improved detection systems, innovative ideas and collaborations with other neutron facilities have lead to a considerable contribution of the n_TOF collaboration to studying the s process in asymptotic giant branch stars. Results have been reported for stable and radioactive samples, i.e., 24,25,26Mg,26Al, 33S, 54,57Fe, 58,59,62,63Ni, 70,72,73Ge, 90,91,92,93,94,96Zr, 139La, 140Ce, 147Pm, 151Sm, 154,155,157Gd, 171Tm, 186,187,188Os, 197Au, 203,204Tl, 204,206,207Pb and 209Bi isotopes, while others are being studied or planned to be studied in the near future. In this contribution, we present an overview of the most successful achievements, and an outlook of future challenging measurements, including ongoing detection system developments.