Docs / API reference

POST/v1/data/google-trends/autocomplete

Google Trends Autocomplete

Find Google Trends topics and topic IDs for a keyword.

Execution model

Live request

Runtime depends on endpoint, target, pagination, rendering mode, and active plan limits.

Credit weight

Live catalog

Current weights are managed from the Data API Weights admin table and shown on pricing before use.

Find Google Trends topics and topic IDs for a keyword.

Getting Started

Send your API key as a bearer token. Start with the smallest request below.

Send the smallest useful request and read the structured response.

curl -X POST "https://api.datablue.dev/v1/data/google-trends/autocomplete" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "keyword": "lipstick",
  "hl": "en-IN",
  "timezone": -330,
  "num_results": 10
}'
Example response
{
  "success": true,
  "source": "google_trends",
  "operation": "autocomplete",
  "keyword": "lipstick",
  "hl": "en-IN",
  "timezone": -330,
  "total_results": 2,
  "time_taken": 0.52,
  "topics": [
    {
      "position": 1,
      "title": "Lipstick",
      "type": "Topic",
      "mid": "/m/02xry"
    },
    {
      "position": 2,
      "title": "Liquid lipstick",
      "type": "Topic",
      "mid": "/g/11b7x..."
    }
  ]
}

Options

Query and Target

Set the search term, identifier, or source URL that defines the request.

curl -X POST "https://api.datablue.dev/v1/data/google-trends/autocomplete" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "keyword": "web scraping",
  "hl": "en-IN",
  "timezone": -330,
  "num_results": 10
}'
Example response
{
  "success": true,
  "source": "google_trends",
  "operation": "autocomplete",
  "keyword": "lipstick",
  "hl": "en-IN",
  "timezone": -330,
  "total_results": 2,
  "time_taken": 0.52,
  "topics": [
    {
      "position": 1,
      "title": "Lipstick",
      "type": "Topic",
      "mid": "/m/02xry"
    }
  ]
}

Results and Pagination

Control how many records or pages are returned.

curl -X POST "https://api.datablue.dev/v1/data/google-trends/autocomplete" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "keyword": "lipstick",
  "hl": "en-IN",
  "timezone": -330,
  "num_results": 10
}'
Example response
{
  "success": true,
  "source": "google_trends",
  "operation": "autocomplete",
  "keyword": "lipstick",
  "hl": "en-IN",
  "timezone": -330,
  "total_results": 2,
  "time_taken": 0.52,
  "topics": [
    {
      "position": 1,
      "title": "Lipstick",
      "type": "Topic",
      "mid": "/m/02xry"
    }
  ]
}

Location and Language

Localize results with country, language, coordinates, or delivery-location fields.

curl -X POST "https://api.datablue.dev/v1/data/google-trends/autocomplete" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "keyword": "lipstick",
  "hl": "en-US",
  "timezone": -330,
  "num_results": 10
}'
Example response
{
  "success": true,
  "source": "google_trends",
  "operation": "autocomplete",
  "keyword": "lipstick",
  "hl": "en-IN",
  "timezone": -330,
  "total_results": 2,
  "time_taken": 0.52,
  "topics": [
    {
      "position": 1,
      "title": "Lipstick",
      "type": "Topic",
      "mid": "/m/02xry"
    }
  ]
}

Request Controls

Set device, timeout, and request-specific controls.

curl -X POST "https://api.datablue.dev/v1/data/google-trends/autocomplete" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "keyword": "lipstick",
  "hl": "en-IN",
  "timezone": -330,
  "num_results": 10,
  "timeout_ms": 20000
}'
Example response
{
  "success": true,
  "source": "google_trends",
  "operation": "autocomplete",
  "keyword": "lipstick",
  "hl": "en-IN",
  "timezone": -330,
  "total_results": 2,
  "time_taken": 0.52,
  "topics": [
    {
      "position": 1,
      "title": "Lipstick",
      "type": "Topic",
      "mid": "/m/02xry"
    }
  ]
}

Response

Read success first, then consume the endpoint-specific records and pagination fields shown below.

Error Handling

Handle 401 for authentication, 422 for invalid input, 429 for limits, and retry only transient failures.

Parameters

NameTypeRequirementDescription
keywordstringRequiredTrends topic search term.
hlstringOptionalGoogle Trends locale.
timezonenumberOptionalTimezone offset in minutes.
num_resultsnumberOptionalMaximum topics to return (1-50).
timeout_msnumberOptionalProvider timeout in milliseconds (3000-60000).

Response fields

FieldTypeDescription
successbooleanWhether the request completed successfully.
topicsarrayTopic rows with position, title, type, mid, and URL.
time_takennumberAPI response time in seconds.

Request and response

curl -X POST "https://api.datablue.dev/v1/data/google-trends/autocomplete" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "keyword": "lipstick",
  "hl": "en-IN",
  "timezone": -330,
  "num_results": 10
}'
Example response
{
  "success": true,
  "source": "google_trends",
  "operation": "autocomplete",
  "keyword": "lipstick",
  "hl": "en-IN",
  "timezone": -330,
  "total_results": 2,
  "time_taken": 0.52,
  "topics": [
    {
      "position": 1,
      "title": "Lipstick",
      "type": "Topic",
      "mid": "/m/02xry"
    },
    {
      "position": 2,
      "title": "Liquid lipstick",
      "type": "Topic",
      "mid": "/g/11b7x..."
    }
  ]
}