Google Search – How to Search Google with a Date/Time Range

dategoogle-search

I want to restrict Google search to a specific date/time range. How can this be done?

Best Answer

I believe you are asking how to perform a Google search with a time value flag on the search.

This can be done by your program building its own search url. You likely already know that the searched string appears after the q= flag in the url. For time based searches you add the tbs=qdr: flag followed by the time period value you wish to use. Some of the possible values you can use are:

  • a for any time
  • n for **
    • Add a number after n to tell Google how many minutes (i.e. tbs=qdr:n15 for the last 15 minutes)
  • h for hour
    • Add a number after h to tell Google how many minutes (i.e. tbs=qdr:h3 for the last 3 hours)
  • d for day
  • w for week
  • m for month
  • y for year

Example: http://www.google.com/?gws_rd=ssl#q=querystring&tbs=qdr:d will search for querystring and return results that are dated in the last day.

You can also specify a date range using tbs=cdr:1,cd_min:xx/xx/xxxx,cd_max:xx/xx/xxxx.