Firearm-related violence is a leading cause of morbidity and mortality and is at the center of a major public health and policy debate in the United States. Despite the critical role of data in informing this debate, accurate and comprehensive data on firearm sales and ownership is not readily available. In this study, we evaluate the potential of using firearm-related internet search queries as a complementary, freely available, and near-real-time data source for tracking firearm sales and ownership that enables analysis at finer geographic and temporal scales. (Here, we examine data by state and by month to compare with other data sources, but search engine volume can be analyzed by city and by the week or by day). We validate search query volume against available data on background checks in all 50 US states, and find that they are highly correlated over time (Pearson's r = 0.96, Spearman's ρ = 0.94) and space (Pearson's r = 0.78, Spearman's ρ = 0.76). We find that stratifying this analysis by gun type (long-gun vs. handgun) increases this correlation dramatically, across both time and space. We also find a positive association between firearm-related search query volume and firearm-related mortality (Pearson's r = 0.87, Spearman's ρ = 0.90), and a negative association with the strength of state-level firearm control policies (Pearson's r = -0.82, Spearman's ρ = -0.83). Based on these findings, we propose a framework for prospective surveillance that incorporates firearm-related internet search volume as a useful complementary data source to inform the public health policy debate on this issue.