Brightness variations due to dark spots on the stellar surface encode information about stellar surface rotation and magnetic activity. In this work, we analyze the Kepler long-cadence data of 26,521 main-sequence stars of spectral types M and K in order to measure their surface rotation and photometric activity level. Rotation-period estimates are obtained by the combination of a wavelet analysis and autocorrelation function of the light curves. Reliable rotation estimates are determined by comparing the results from the different rotation diagnostics and four data sets. We also measure the photometric activity proxy Sph using the amplitude of the flux variations on an appropriate timescale. We report rotation periods and photometric activity proxies for about 60 per cent of the sample, including 4,431 targets for which McQuillan et al. (2013a,2014) did not report a rotation period. For the common targets with rotation estimates in this study and in McQuillan et al. (2013a,2014), our rotation periods agree within 99 per cent. In this work, we also identify potential polluters, such as misclassified red giants and classical pulsator candidates. Within the parameter range we study, there is a mild tendency for hotter stars to have shorter rotation periods. The photometric activity proxy spans a wider range of values with increasing effective temperature. The rotation period and photometric activity proxy are also related, with Sph being larger for fast rotators. Similar to McQuillan et al. (2013a,2014), we find a bimodal distribution of rotation periods.