Query with Time Filtering

This documentation explains how to use the tbs parameter with the SERP API to filter Google search results based on a desired timeframe.

The tbs parameter enables you to narrow search results to recent content (e.g., the past hour, day, week, month, or year) or define a custom date range. This is useful for users looking for fresh or time-specific search results.


Parameters for Time Filtering

The SERP API supports the tbs parameter with the following values:

Time Filter

Raw tbs Value

Past hour

qdr:h

Past 24 hours

qdr:d

Past week

qdr:w

Past month

qdr:m

Past year

qdr:y

Custom range (e.g., Jul 1–15, 2025)

cdr:1,cd_min:7/1/2025,cd_max:7/15/2025

You can append a number after qdr:{letter} to specify the quantity of the selected time unit. For example, qdr:d2 retrieves results from the past 2 days, and qdr:w3 retrieves results from the past 3 weeks.


Using the tbs Parameter

To customize your SERP API request with a time filter, include the tbs parameter in your GET request. For example:

curl --location 'https://serp-api.netnut.io/search?q=netnut&tbs=qdr:d' \
--header 'Authorization: Basic base64(username:password)'

API Response

When the tbs parameter is used, the API response will return search results filtered by the specified timeframe.

In addition, each result will include a timeSince field. This shows when the page was last published or updated, expressed as “time since” (e.g., 2 hours ago, 3 days ago).

Example Response:

{
    "url": "https://www.google.com/search?q=netnut&tbs=qdr%3Ad",
    "general": {
        "searchEngine": "google",
        "resultsCount": 36,
        "searchTime": 0.23,
        "language": "en",
        "device": "desktop",
        "searchType": "text",
        "pageTitle": "netnut - Google Search",
        "timestamp": "2025-08-10T12:59:22.295Z",
        "render": false
    },
    "input": {
        "originalUrl": "https://www.google.com/search?q=netnut&hl=en&tbs=qdr%3Ad&gl=US",
        "jobId": "18040d61-3fc5-42b7-867b-cda1164f5ffe"
    },
    "organic": [
        {
            "title": "Compare Proxy IPv4 vs. Shadowrocket in 2025",
            "description": "7 hours ago — NetNut is a leading proxy service provider offering a comprehensive suite of solutions, including residential, static residential, mobile, and datacenter ...See more",
            "link": "https://slashdot.org/software/comparison/Proxy-IPv4-vs-Shadowrocket/",
            "displayLink": "https://slashdot.org › Software › Proxy Servers",
            "timeSince": "7 hours ago",
            "rank": 1
        },
        {
            "title": "Compare ExtractAny vs. NoowAI in 2025",
            "description": "7 hours ago — NetNut is a leading proxy service provider offering a comprehensive suite of solutions, including residential, static residential, mobile, and datacenter ...See more",
            "link": "https://slashdot.org/software/comparison/ExtractAny-vs-NoowAI/",
            "displayLink": "https://slashdot.org › Software › Data Extraction Software",
            "timeSince": "7 hours ago",
            "rank": 2
        },
        {
            "title": "Alarum to Participate at the Canaccord Genuity 45th ...",
            "description": "19 hours ago — About Alarum Technologies Ltd. Alarum Technologies Ltd. (Nasdaq, TASE: ALAR) is a global provider of web data collection solutions. The solutions by NetNut ...See more",
            "link": "https://www.fourstateshomepage.com/business/press-releases/globenewswire/9507948/alarum-to-participate-at-the-canaccord-genuity-45th-annual-growth-conference-on-august-13-2025",
            "displayLink": "https://www.fourstateshomepage.com › globenewswire",
            "timeSince": "19 hours ago",
            "rank": 3
        }...

Notes

  • The tbs parameter is optional.

  • If omitted, search results will not be time-filtered.

Last updated