> ## Documentation Index
> Fetch the complete documentation index at: https://docs.scrapeunblocker.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Scrape Google Trends (interest over time, by region, related queries)

> Compares 1-5 `keywords` on Google Trends and returns the data behind the explore page as JSON: `interestOverTime` (one point per time bucket with a 0-100 value per keyword, ISO `date`, `timestamp`, `isPartial`), `averages`, `interestByRegion` (`geoCode`, `geoName`, values per keyword), and per keyword `relatedQueries` and `relatedTopics` (opt-in via `sections`), each with `top` and `rising` lists. Filter with `geo` (worldwide, country, region or US metro), `timeframe` (presets such as 'today 12-m' or a custom date range), `category` and `property` (web, images, news, youtube, shopping). Use `sections` to fetch only what you need. Billed as one request per keyword compared.



## OpenAPI

````yaml /api-reference/openapi.json post /trends/google-trends
openapi: 3.1.0
info:
  title: ScrapeUnblocker API
  description: >-
    Public API for the ScrapeUnblocker proxy/anti-bot service. Authenticate
    every request with the `x-scrapeunblocker-key` header. Documented here:
    page-source extraction, Google SERP scraping, image fetch, and the dedicated
    plugin endpoints (search engines, marketplaces, reviews, travel, social and
    more). All other paths exist for internal operations and are intentionally
    hidden from this spec.
  version: 3.0.0
servers:
  - url: https://api.scrapeunblocker.com
    description: Production
security: []
paths:
  /trends/google-trends:
    post:
      tags:
        - Plugins
      summary: Scrape Google Trends (interest over time, by region, related queries)
      description: >-
        Compares 1-5 `keywords` on Google Trends and returns the data behind the
        explore page as JSON: `interestOverTime` (one point per time bucket with
        a 0-100 value per keyword, ISO `date`, `timestamp`, `isPartial`),
        `averages`, `interestByRegion` (`geoCode`, `geoName`, values per
        keyword), and per keyword `relatedQueries` and `relatedTopics` (opt-in
        via `sections`), each with `top` and `rising` lists. Filter with `geo`
        (worldwide, country, region or US metro), `timeframe` (presets such as
        'today 12-m' or a custom date range), `category` and `property` (web,
        images, news, youtube, shopping). Use `sections` to fetch only what you
        need. Billed as one request per keyword compared.
      operationId: google_trends_trends_google_trends_post
      parameters:
        - name: keywords
          in: query
          required: true
          schema:
            type: string
            description: >-
              1-5 search terms to compare, comma-separated, e.g. 'coffee,tea'. A
              Knowledge Graph topic id such as '/m/0dl567' also works.
            title: Keywords
          description: >-
            1-5 search terms to compare, comma-separated, e.g. 'coffee,tea'. A
            Knowledge Graph topic id such as '/m/0dl567' also works.
        - name: geo
          in: query
          required: false
          schema:
            type: string
            description: >-
              Where: empty = worldwide, an ISO-2 country ('US'), a region
              ('US-CA') or a US metro ('US-CA-807').
            default: ''
            title: Geo
          description: >-
            Where: empty = worldwide, an ISO-2 country ('US'), a region
            ('US-CA') or a US metro ('US-CA-807').
        - name: timeframe
          in: query
          required: false
          schema:
            type: string
            description: >-
              Time range: 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, or a custom 'YYYY-MM-DD
              YYYY-MM-DD' (hourly for the last 7 days: 'YYYY-MM-DDTHH
              YYYY-MM-DDTHH').
            default: today 12-m
            title: Timeframe
          description: >-
            Time range: 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, or a custom 'YYYY-MM-DD YYYY-MM-DD'
            (hourly for the last 7 days: 'YYYY-MM-DDTHH YYYY-MM-DDTHH').
        - name: category
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            description: >-
              Google Trends category id (0 = all categories, e.g. 71 = Food &
              Drink, 5 = Computers & Electronics).
            default: 0
            title: Category
          description: >-
            Google Trends category id (0 = all categories, e.g. 71 = Food &
            Drink, 5 = Computers & Electronics).
        - name: property
          in: query
          required: false
          schema:
            type: string
            description: >-
              Which Google search to measure: web, images, news, youtube,
              shopping.
            default: web
            title: Property
          description: >-
            Which Google search to measure: web, images, news, youtube,
            shopping.
        - name: hl
          in: query
          required: false
          schema:
            type: string
            description: >-
              Language of labels (region names, topic titles), e.g. 'en-US',
              'de', 'fr'.
            default: en-US
            title: Hl
          description: >-
            Language of labels (region names, topic titles), e.g. 'en-US', 'de',
            'fr'.
        - name: tz
          in: query
          required: false
          schema:
            type: integer
            maximum: 840
            minimum: -840
            description: >-
              Timezone offset in minutes that day/hour buckets align to (Trends'
              convention: 300 = UTC-5, -60 = UTC+1). Default 0 = UTC.
            default: 0
            title: Tz
          description: >-
            Timezone offset in minutes that day/hour buckets align to (Trends'
            convention: 300 = UTC-5, -60 = UTC+1). Default 0 = UTC.
        - name: region_resolution
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Level of the interest-by-region map: country, region, city, dma.
              Default = Trends' own choice (countries worldwide, regions in a
              country).
            title: Region Resolution
          description: >-
            Level of the interest-by-region map: country, region, city, dma.
            Default = Trends' own choice (countries worldwide, regions in a
            country).
        - name: include_low_volume
          in: query
          required: false
          schema:
            type: boolean
            description: Include regions with low search volume in the region map.
            default: false
            title: Include Low Volume
          description: Include regions with low search volume in the region map.
        - name: sections
          in: query
          required: false
          schema:
            type: string
            description: >-
              What to fetch: a comma list of interest_over_time,
              interest_by_region, related_queries, related_topics, or 'all'.
              Fewer sections = faster. related_topics is opt-in (Google often
              returns it empty).
            default: interest_over_time,interest_by_region,related_queries
            title: Sections
          description: >-
            What to fetch: a comma list of interest_over_time,
            interest_by_region, related_queries, related_topics, or 'all'. Fewer
            sections = faster. related_topics is opt-in (Google often returns it
            empty).
        - name: proxy_country
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Exit-IP country (ISO-2). Optional - by default an ISP exit outside
              the US and Europe is used; results follow `geo`, not the exit IP.
            title: Proxy Country
          description: >-
            Exit-IP country (ISO-2). Optional - by default an ISP exit outside
            the US and Europe is used; results follow `geo`, not the exit IP.
      responses:
        '200':
          description: >-
            JSON with interestOverTime, interestByRegion, relatedQueries and
            relatedTopics.
          content:
            application/json:
              schema: {}
        '400':
          description: Invalid parameters.
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '502':
          description: Google Trends refused or returned no data.
        '504':
          description: Fetch timed out.
      security:
        - ScrapeUnblockerKey: []
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    ScrapeUnblockerKey:
      type: apiKey
      in: header
      name: x-scrapeunblocker-key
      description: Your ScrapeUnblocker API key. Apply on every request.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.