logo

Google Trends API

Extract search interest, trending topics, and related queries from Google Trends

Google Trends API

The Google Trends API extracts data from Google Trends as structured JSON: interest over time, interest by region, related queries, related topics, and real-time trending searches. Instead of dealing with Google's internal APIs and session management, you get clean, parsed JSON ready to use in your applications.

Credit Usage: Each successful Google Trends API request costs 10 credits. For bulk processing, use the Async API with plugins.


Endpoints

EndpointMethodDescriptionDetails
/plugin/google/trendsGETSearch interest over time, by region, related queries, and related topicsmore
/plugin/google/trendingGETReal-time trending searches from Google Trendsmore

Authentication

All requests require your Scrape.do API token via the token query parameter:

curl "https://api.scrape.do/plugin/google/trends?token=YOUR_TOKEN&q=bitcoin&geo=US"

Using with the Async API

Both endpoints are available as async plugins for bulk processing. The /plugin/google/trends endpoint maps to the google/trends plugin key:

curl -X POST "https://q.scrape.do/api/v1/jobs" \
  --header "X-Token: YOUR_TOKEN" \
  --header "Content-Type: application/json" \
  --data '{
    "Plugin": {
      "Key": "google/trends",
      "Params": [
        { "q": "bitcoin", "geo": "US" },
        { "q": "ethereum", "geo": "US", "data_type": "RELATED_QUERIES" }
      ]
    }
  }'

The google/trending (real-time trending) endpoint is not available as an async plugin. Use it directly via the gateway.


Error Handling

All endpoints return errors in a consistent JSON format:

{
  "error": "error_code",
  "message": "Human readable error message"
}
Status CodeDescription
400Missing required parameter (token, q, or geo)
401Invalid or missing token
502Upstream Google Trends request failed. Retry the request

On this page