Google Trends Autocomplete API

Google Trends Autocomplete API uses/api/v1/search?engine=google_trends_autocomplete API endpoint to scrape real-time results.

API Parameters

Search Query

  • Name
    q
    Required
    Required
    Description

    Parameter defines the query you want to search. You must type at least 3 characters to get the results.

Localization

  • Name
    hl
    Required
    Optional
    Description

    The default parameter en defines the language of the store. Check the full list of supported Google hl languages.

Engine

  • Name
    engine
    Required
    Required
    Description

    Parameter defines an engine that will be used to retrieve real-time data. It must be set to google_play_product.

Api Key

  • Name
    api_key
    Required
    Required
    Description

    The api_key authenticates your requests. Use it as a query parameter (https://www.searchapi.io/api/v1/search?api_key=YOUR_API_KEY) or in the Authorization header (Bearer YOUR_API_KEY).

API Examples

Programming language query predictions

Programming language query predictions
GET
https://www.searchapi.io/api/v1/search?engine=google_trends_autocomplete&q=Programming+language
Request
import requests

url = "https://www.searchapi.io/api/v1/search"
params = {
  "engine": "google_trends_autocomplete",
  "q": "Programming language"
}

response = requests.get(url, params = params)
print(response.text)
Response
{
  "suggestions": [
    {
      "id": "/m/01t6b",
      "title": "C",
      "type": "Programming language",
      "link": "https://trends.google.com/trends/explore?q=/m/01t6b",
      "thumbnail": "https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcT2oSmZNi5-GY7XES_71nsMGIDT3vGnKce3B9hzryxuCPCBIzWp"
    },
    {
      "id": "/m/05r20",
      "title": "Programming language",
      "type": "Kind of software",
      "link": "https://trends.google.com/trends/explore?q=/m/05r20",
      "thumbnail": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTGin4VoPnHtRbB0j_vCxL1Zb4cqhwUqRoHa1hF8Tmn-FNZkyLP"
    },
    {
      "id": "/m/07657k",
      "title": "C#",
      "type": "High-level programming language",
      "link": "https://trends.google.com/trends/explore?q=/m/07657k",
      "thumbnail": "https://encrypted-tbn3.gstatic.com/images?q=tbn:ANd9GcQ4_mhICEi0dRqputIfnVdBN7ZrnU9NOSWaFMvhg6m1sy7PpD9v"
    },
    {
      "id": "/m/05prj",
      "title": "Object-oriented programming",
      "type": "Programming paradigm",
      "link": "https://trends.google.com/trends/explore?q=/m/05prj",
      "thumbnail": "https://encrypted-tbn3.gstatic.com/images?q=tbn:ANd9GcRPG5IL7fSlJYHYpqXJbF-VB4v8nyCIOIyrTm6KcPY_7GsVbw5R"
    },
    {
      "id": "/m/06ff5",
      "title": "Ruby",
      "type": "Programming language",
      "link": "https://trends.google.com/trends/explore?q=/m/06ff5",
      "thumbnail": "https://encrypted-tbn3.gstatic.com/images?q=tbn:ANd9GcTPa46zmqQ91sCBmqbVEcsGKmArUKAVAawUur5_KR0ng7GYQtty"
    }
  ]
}