I got an e-mail yesterday from Charles R., who wanted help with a search he was trying to do. He wanted to be able to search just US state Web sites. He had tried to use site:gov as a search modifier but he reported it was missing too much.
As I was reading his e-mail I thought, “Doesn’t Google have a search for this?” Surprise! Uncle Sam Google Search, which searched only government Web sites, closed without fanfare over a year ago. No wonder Charles wasn’t having any luck.
So I thought about it for a few minutes. Charles knew how to limit his search to individual Web sites, but he didn’t know how to create a modifier for all possible state Web sites. And he’s right — it would be a heck of a job to do manually and would go past Google’s search limits. So I did it for him. Maybe you’ll find it useful too.
In my experience official state Web sites come in three flavors:
Name + gov (Alabama.gov)
Abbreviation + gov (Al.gov)
Abbreviation + us (Al.us)
So I made a list of the fifty states, with these three domain types for each state, and dumped it into a custom Google search engine that’s available at http://www.google.com/cse/home?cx=017167864583314760984:iecnygefhky.
Put in any keywords you want and your search results will be restricted to official state Web sites only.
That didn’t take too long to do, so I wondered if there were any other ways to slice the search results. And I came up with a couple. If you look at the search result page, you’ll see two tabs at the top that allow you to limit your search results to city or county Web sites only. These two restrictions just take advantage of the fact that city Web sites tend to use the pattern http://www.xx.ci.us and county sites tend to use the pattern http://www.xx.co.us . It’s not exaustively inclusive, but sample searches I ran brought me a lot of results.
Anyway, just something I quickly knocked together in order to help somebody out; it isn’t meant to take the place of Google Uncle Sam, just make it easier to search state Web sites. If you like it, if you can think of a way I can improve it, if you have a search refine problem you’re trying to solve, let me know. Thanks for sending the question Charles R! This was fun.