The production of pi ^{pm }, mathrm{K}^{pm }, mathrm{K}^{0}_{S}, mathrm{K}^{*}(892)^{0}, mathrm{p}, phi (1020), Lambda , Xi ^{-}, Omega ^{-}, and their antiparticles was measured in inelastic proton–proton (pp) collisions at a center-of-mass energy of sqrt{s} = 13 TeV at midrapidity (|y|<0.5) as a function of transverse momentum (p_{mathrm{T}}) using the ALICE detector at the CERN LHC. Furthermore, the single-particle p_{mathrm{T}} distributions of mathrm{K}^{0}_{S}, Lambda , and overline{Lambda } in inelastic pp collisions at sqrt{s} = 7 TeV are reported here for the first time. The p_{mathrm{T}} distributions are studied at midrapidity within the transverse momentum range 0le p_{mathrm{T}}le 20 GeV/c, depending on the particle species. The p_{mathrm{T}} spectra, integrated yields, and particle yield ratios are discussed as a function of collision energy and compared with measurements at lower sqrt{s} and with results from various general-purpose QCD-inspired Monte Carlo models. A hardening of the spectra at high p_{mathrm{T}} with increasing collision energy is observed, which is similar for all particle species under study. The transverse mass and x_{mathrm{T}}equiv 2p_{mathrm{T}}/sqrt{s} scaling properties of hadron production are also studied. As the collision energy increases from sqrt{s} = 7–13 TeV, the yields of non- and single-strange hadrons normalized to the pion yields remain approximately constant as a function of sqrt{s}, while ratios for multi-strange hadrons indicate enhancements. The p_mathrm{{T}}-differential cross sections of pi ^{pm }, mathrm {K}^{pm } and mathrm {p} (overline{mathrm{p}}) are compared with next-to-leading order perturbative QCD calculations, which are found to overestimate the cross sections for pi ^{pm } and mathrm{p} (overline{mathrm{p}}) at high p_mathrm{{T}}.