googlesearch icon indicating copy to clipboard operation
googlesearch copied to clipboard

support tbs parameter

Open zhuangAnjun opened this issue 1 year ago • 3 comments

Time-Based Search (tbs) Parameter

You can also refine search results based on time. The tbs parameter allows you to filter results by various time ranges. For instance, to get results from the past hour, use qdr:h, or for results from the past year, use qdr:y. Here's how you can use the tbs parameter:

from googlesearch import search
search("Google", tbs="qdr:h")  # Results from the past hour
search("Google", tbs="qdr:m")  # Results from the past month
search("Google", tbs="qdr:y")  # Results from the past year

zhuangAnjun avatar Apr 03 '24 03:04 zhuangAnjun