Résumé : Differential production cross sections of prompt J/ψ and ψ(2S) charmonium and ϒ(nS) (n=1,2,3) bottomonium states are measured in proton–proton collisions at s=13TeV, with data collected by the CMS detector at the LHC, corresponding to an integrated luminosity of 2.3 fb−1 for the J/ψ and 2.7 fb−1 for the other mesons. The five quarkonium states are reconstructed in the dimuon decay channel, for dimuon rapidity