BACKGROUND: Long COVID describes new or persistent symptoms at least 4 weeks after onset of acute COVID-19. Clinical codes to describe this phenomenon were recently created. AIM: To describe the use of long-COVID codes, and variation of use by general practice, demographic variables, and over time. DESIGN AND SETTING: Population-based cohort study in English primary care. METHOD: Working on behalf of NHS England, OpenSAFELY data were used encompassing 96% of the English population between 1 February 2020 and 25 May 2021. The proportion of people with a recorded code for long COVID was measured overall and by demographic factors, electronic health record software system (EMIS or TPP), and week. RESULTS: Long COVID was recorded for 23 273 people. Coding was unevenly distributed among practices, with 26.7% of practices having never used the codes. Regional variation ranged between 20.3 per 100 000 people for East of England (95% confidence interval [CI] = 19.3 to 21.4) and 55.6 per 100 000 people in London (95% CI = 54.1 to 57.1). Coding was higher among females (52.1, 95% CI = 51.3 to 52.9) than males (28.1, 95% CI = 27.5 to 28.7), and higher among practices using EMIS (53.7, 95% CI = 52.9 to 54.4) than those using TPP (20.9, 95% CI = 20.3 to 21.4). CONCLUSION: Current recording of long COVID in primary care is very low, and variable between practices. This may reflect patients not presenting; clinicians and patients holding different diagnostic thresholds; or challenges with the design and communication of diagnostic codes. Increased awareness of diagnostic codes is recommended to facilitate research and planning of services, and also surveys with qualitative work to better evaluate clinicians' understanding of the diagnosis.