Scrapingdog

Google Trends API

The Google Trends API lets you retrieve search trend data including interest over time, regional breakdowns, and comparative analyses across up to 5 queries. Each request costs 5 API credits.

Endpoint: https://api.scrapingdog.com/google_trends

API Parameters

πŸ”‘

Authentication

  • api_key Required
    Your personal API key. Available on your dashboard

    Type: String
πŸ”—

Request Parameters

  • query Optional
    The parameter specifies the query or queries you want to search. You can use any term or topic as you would in a standard Google Trends search.

    • A maximum of 5 queries can be used per search, but this limit applies only to the "Interest over time" and "Compared breakdown by region" data types. Other data types support only 1 query per search.
    • To pass multiple queries, separate them with a comma (,) (e.g., coffee,pizza,dark chocolate,/m/027lnzs,bread).
    • Queries can be either "Search terms" (e.g., Tesla, BYD, Volkswagen) or "Topics" (e.g., /m/0663v, /m/027lnzs, /g/11mw8j71m4).
    • Each query can be up to 100 characters long.
    Type: String
  • data_type Optional
    The parameter specifies the type of search to perform.

    • TIMESERIES β€” Interest over time (default). Supports single or multiple queries.
    • GEO_MAP β€” Compared breakdown by region. Multiple queries only.
    • GEO_MAP_0 β€” Interest by region. Single query only.
    Type: String
  • geo Optional
    The parameter specifies the location from which the search originates. By default, it is set to Worldwide if the geo parameter is not provided or left empty. For a complete list of supported locations, refer to Google Trends Locations

    Type: String
  • region Optional
    The region parameter allows you to obtain more specific results for the "Compared Breakdown by Region" and "Interest by Region" data types only.

    • COUNTRY β€” Country level
    • REGION β€” Subregion level
    • DMA β€” Metro level
    • CITY β€” City level
    Note: Not all options yield results for every location

    Type: String
  • language Optional
    Language of the results. Possible values: en, es, fr, de, etc. Default: en

    Type: String
  • date Optional
    This parameter specifies the date range for the search.

    Predefined options: now 1-H, now 4-H, now 1-d, now 7-d, today 1-m, today 3-m, today 12-m, today 5-y, all

    Custom range: yyyy-mm-dd yyyy-mm-dd or yyyy-mm-ddThh yyyy-mm-ddThh for hourly precision (within a one-week window)

    Type: String
  • cat Optional
    This parameter specifies the search category. Default: 0 (All categories)

    Type: String
  • gprop Optional
    This parameter determines how results are sorted based on the selected property. Default: Web Search.

    • images β€” Image Search
    • news β€” News Search
    • froogle β€” Google Shopping
    • youtube β€” YouTube Search
    Type: String
  • tz Optional
    This parameter specifies the time zone offset. The default value is 420 minutes (PDT: -07:00). Ranges from -1439 to 1439.

    Examples: 420 (PDT), 600 (Pacific/Tahiti), -540 (Asia/Tokyo), -480 (Canada/Pacific)

    Type: String

API Examples

Code to Integrate
curl "https://api.scrapingdog.com/google_trends?api_key=APIKEY&query=pizza,burger&data_type=TIMESERIES"
API Response
{
  "interest_over_time": {
    "timeline_data": [
      {
        "date": "Dec 17 – 23, 2023",
        "timestamp": "1702771200",
        "values": [
          {"query": "pizza", "value": 88, "extracted_value": "88"},
          {"query": "burger", "value": 25, "extracted_value": "25"}
        ]
      },
      {
        "date": "Dec 24 – 30, 2023",
        "timestamp": "1703376000",
        "values": [
          {"query": "pizza", "value": 100, "extracted_value": "100"},
          {"query": "burger", "value": 28, "extracted_value": "28"}
        ]
      }
    ]
  }
}