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

  • 3
    I'm afraid your question makes no sense. How does one "run Google" much less with an "older date"?
    – ale
    Nov 29, 2015 at 13:44

1 Answer 1


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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.