1. A method comprising: receiving an input query from a computing device; comparing words in the input query to keywords, the keywords being associated with content items that can be provided to computing devices; generating, based on the comparing, matching scores indicating how well the input query matches keywords for different content items; obtaining geographies associated with the computing device and associated with the content items that can be provided to computing devices; identifying geographic matches between the computing device and at least some of the content items; including, in an auction, content items having matching scores that exceed a threshold and that match a geography of the computing device, the auction for receiving bids from content providers to determine which of the content items in the auction to output in response to the input query; determining, based at least in part on bids provided in the auction, candidate content items for output in response to the input query; obtaining geographic areas associated with the candidate content items; selecting a candidate content item having a smallest geographic area; and outputting the selected candidate content item in response to the input query.