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

# Trends Topic Autocomplete

> Resolve a query prefix into categorized Knowledge Graph topic entities.



## OpenAPI

````yaml GET /v1/google/trends/autocomplete
openapi: 3.1.0
info:
  title: ScrapeBadger Google Scraper
  description: >-
    Dedicated API for scraping Google products (SERP, Maps, News, Hotels,
    Trends, Jobs, Shopping, Patents, Scholar, Autocomplete, Images, Videos,
    Finance, AI Mode, Lens, Products).
  version: 1.0.0
servers:
  - url: https://scrapebadger.com
    description: Production
security:
  - apiKeyAuth: []
paths:
  /v1/google/trends/autocomplete:
    get:
      tags:
        - Google Trends
      summary: Trends topic autocomplete
      description: >-
        Return categorized topic entities from the Google Trends autocomplete
        API.


        Unlike Google Search autocomplete (which returns flat keyword
        suggestions),

        this endpoint returns Knowledge Graph entities each tagged with a `type`

        and a machine identifier (`mid`) — the same data that powers the Trends

        UI's "Search topic" picker. Each entry includes a direct link into the

        Trends explore view for that topic.
      operationId: trends_autocomplete_api_v1_trends_autocomplete_get
      parameters:
        - name: q
          in: query
          required: true
          schema:
            type: string
            description: Query prefix to resolve into Trends topics
            title: Q
          description: Query prefix to resolve into Trends topics
        - name: hl
          in: query
          required: false
          schema:
            type: string
            description: Language code
            default: en-US
            title: Hl
          description: Language code
        - name: tz
          in: query
          required: false
          schema:
            type: string
            description: Timezone offset in minutes (Google format)
            default: '0'
            title: Tz
          description: Timezone offset in minutes (Google format)
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrendsAutocompleteResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    TrendsAutocompleteResponse:
      properties:
        query:
          type: string
          title: Query
        results:
          items:
            $ref: '#/components/schemas/TrendsAutocompleteItem'
          type: array
          title: Results
      type: object
      required:
        - query
      title: TrendsAutocompleteResponse
      description: Response for GET /api/v1/trends/autocomplete.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    TrendsAutocompleteItem:
      properties:
        title:
          type: string
          title: Title
        type:
          anyOf:
            - type: string
            - type: 'null'
          title: Type
        mid:
          anyOf:
            - type: string
            - type: 'null'
          title: Mid
          description: Knowledge Graph machine ID (e.g. '/m/02vx4')
        link:
          anyOf:
            - type: string
            - type: 'null'
          title: Link
      type: object
      required:
        - title
      title: TrendsAutocompleteItem
      description: |-
        A categorized topic suggestion returned by the Trends autocomplete API.

        Distinct from Google Search autocomplete in that each entry is a
        categorized entity with a Knowledge Graph `mid` identifier and a
        semantic `type` ("Topic", "Sports", "Career", etc.) plus a direct
        link into Google Trends.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````