A Go Trends API client is a Bearer-authenticated POST to https://api.trendsapi.ai/api, then a second encoding/json parse of the body string. On 2026-09-06, Google Search for golang scored 25.0 for the Saturday-dated week of 2026-09-05, up 13.64% from 22.0 on 2026-08-29. The English-verb token go scored 96.0 with an estimated 9,330,000 queries. go programming scored 24.0, up 20.0% on 7D and down 76.0% from 100.0 on 2026-06-06. YouTube for golang sat at 49.0. Google News for golang sat at 34.0. Wikipedia resolved Golang to score 100.0 with 3,337 August views, while Go (programming language) scored 11.2 with 46,843 views. Those strings are not one language series. Store them as separate rows.

How does a Go client call Trends API?

The HTTP shape is one POST. Mode, source, and keyword sit in the JSON body. Auth is Authorization: Bearer. net/http is enough. encoding/json decodes the envelope. The first decode yields statusCode and a body string. The second decode yields results.

POST https://api.trendsapi.ai/api
Authorization: Bearer <api_key>
Content-Type: application/json

{"mode":"get_growth","source":"google search","keyword":"golang","percent_growth":["7D","30D","3M","12M"]}
package trends

import (
    "bytes"
    "encoding/json"
    "fmt"
    "io"
    "net/http"
    "os"
)

const api = "https://api.trendsapi.ai/api"

func Post(jsonBody string) (json.RawMessage, error) {
    key := os.Getenv("TRENDSAPI_API_KEY")
    if key == "" {
        return nil, fmt.Errorf("missing TRENDSAPI_API_KEY")
    }
    req, err := http.NewRequest(http.MethodPost, api, bytes.NewBufferString(jsonBody))
    if err != nil {
        return nil, err
    }
    req.Header.Set("Authorization", "Bearer "+key)
    req.Header.Set("Content-Type", "application/json")
    res, err := http.DefaultClient.Do(req)
    if err != nil {
        return nil, err
    }
    defer res.Body.Close()
    if res.StatusCode != 200 {
        return nil, fmt.Errorf("HTTP %d", res.StatusCode)
    }
    raw, err := io.ReadAll(res.Body)
    if err != nil {
        return nil, err
    }
    var envelope struct {
        StatusCode int    `json:"statusCode"`
        Body       string `json:"body"`
    }
    if err := json.Unmarshal(raw, &envelope); err != nil {
        return nil, err
    }
    // body is a JSON string; parse it a second time
    return json.RawMessage(envelope.Body), nil
}

The first mistake most clients make is unmarshaling envelope.Body into a struct field typed as json.RawMessage on the outer envelope. That fails because body is still a JSON string, not an object. Unmarshal the envelope, then unmarshal envelope.Body a second time. Stdlib pages:

https://pkg.go.dev/net/http
https://pkg.go.dev/encoding/json

Free tier allows 100 successful requests per month. Only HTTP 200 responses count against quota. Starter is 5,000, Pro is 25,000, Business is 100,000.

What did get_growth return for Go language tokens?

Pulled on 2026-09-06 with source set to google search. get_growth tips on 2026-09-05. The prior Saturday 2026-08-29 is the last full week in the same series.

Keyword Period Recent Baseline date Baseline Growth
golang 7D 25.0 2026-08-29 22.0 +13.64%
golang 14D 25.0 2026-08-22 24.0 +4.17%
golang 30D 25.0 2026-08-08 28.0 -10.71%
golang 3M 25.0 2026-06-06 47.0 -46.81%
golang 12M 25.0 2025-09-06 53.0 -52.83%
golang YTD 25.0 2026-01-03 27.0 -7.41%
go 7D 96.0 2026-08-29 88.0 +9.09%
go 30D 96.0 2026-08-08 89.0 +7.87%
go 3M 96.0 2026-06-06 92.0 +4.35%
go 12M 96.0 2025-09-06 83.0 +15.66%
go YTD 96.0 2026-01-03 83.0 +15.66%
go programming 7D 24.0 2026-08-29 20.0 +20.0%
go programming 14D 24.0 2026-08-22 29.0 -17.24%
go programming 30D 24.0 2026-08-08 35.0 -31.43%
go programming 3M 24.0 2026-06-06 100.0 -76.0%
go programming 12M 24.0 2025-09-06 42.0 -42.86%
go programming YTD 24.0 2026-01-03 33.0 -27.27%
rust programming 7D 15.0 2026-08-29 14.0 +7.14%
rust programming 30D 15.0 2026-08-08 21.0 -28.57%
rust programming 3M 15.0 2026-06-06 43.0 -65.12%
rust programming 12M 15.0 2025-09-06 28.0 -46.43%
rust programming YTD 15.0 2026-01-03 30.0 -50.0%

go Search is the English verb. Estimated volume on the 2026-09-05 tip is 9,330,000 versus 8,560,000 on 2026-08-29. golang growth rows in this pull did not include a volume field. Do not join 9,330,000 onto a golang score of 25.0. go programming YTD is down 27.27% from 33.0. A 3M alert on golang fires at -46.81%. The same window on go programming fires at -76.0% versus a 100.0 baseline, and on rust programming at -65.12%. go YTD is up 15.66% from 83.0. Those are four Search series, not aliases. Keep the keywords split.

Bare rust scored 72.0 on the same 2026-09-05 tip, up 22.03% from 59.0. That token mixes the metal, the game, and the language. Compare language jobs on rust programming (15.0) against golang (25.0), not against 72.0.

get_time_series for golang on Google Search puts the 25.0 tip in a 261-point weekly pull. The series hits 100 on 2022-04-02. The 2026 high in that pull is 77 on 2026-07-11. Later 2026 weeks: 42 on 2026-07-18, 28 on 2026-08-08, 22 on 2026-08-29, then 25 on 2026-09-05. The 2026-09-05 week is not a new high. It is a late-summer print under a 2022 peak.

Source field notes for Search sit on Google Trends. The C# sibling of this client is C# Trends API.

What did YouTube, News, and Wikipedia return for golang?

Same pull day. YouTube and Google News use weekly tips on 2026-09-05. Wikipedia is monthly. 7D and 14D on Wikipedia collapse to the August point.

Source Keyword resolved Period Score Volume Baseline score Growth
youtube golang 7D 49.0 58.0 -15.52%
youtube golang 14D 49.0 49.0 0.0%
youtube golang 30D 49.0 60.0 -18.33%
youtube golang 3M 49.0 52.0 -5.77%
youtube golang 12M 49.0 60.0 -18.33%
youtube golang YTD 49.0 56.0 -12.5%
google news golang 7D 34.0 37.0 -8.11%
google news golang 14D 34.0 69.0 -50.72%
google news golang 30D 34.0 0.0 999999
wikipedia Golang 30D 100.0 3337 31.1 +221.54%
wikipedia Golang 3M 100.0 3337 55.4 +80.51%
wikipedia Golang 12M 100.0 3337 1.6 +6150.0%
wikipedia Go (programming language) 30D 11.2 46843 1.1 +918.18%
wikipedia Go (programming language) 3M 11.2 46843 1.8 +522.22%
wikipedia Go (programming language) 12M 11.2 46843 16.7 -32.93%
wikipedia Go (programming language) YTD 11.2 46843 19.7 -43.15%

YouTube for golang is 49.0, down 5.77% over 3M, while Search is down 46.81% over the same window. Do not alert language adoption off the Search 3M print while YouTube is barely off 52.0. Google News for golang is 34.0 on 2026-09-05 versus 69.0 on 2026-08-22. The 30D, 3M, 12M, and YTD News windows baselined at 0.0, returned growth 999999, and carried a low-quality warning (over 90% zeros). Print 34.0 vs 0.0. Do not store 999999. The News series in this pull is mostly zeros. Non-zero 2026 weeks: 68 on 2026-02-21, 51 on 2026-08-15, 69 on 2026-08-22, 37 on 2026-08-29, 34 on 2026-09-05. Series peak is 100 on 2023-12-23. Prior spikes: 97 on 2023-02-11, 86 on 2024-12-14, 75 on 2022-10-29.

Wikipedia keyword golang resolved as title Golang with 3,337 views and score 100.0 for 2026-08-01 versus 1,374 views and 31.1 in July. Keyword Go (programming language) resolved as Go (programming language) with 46,843 views and score 11.2 versus 33,705 views and 1.1 in July. Volume on the language title is up 38.98% month over month while the 0-100 score jumped 918.18%. Compare Wikipedia rows on recent_volume, not on the 0-100 score. Do not join 3,337 or 46,843 pageviews onto a Search score of 25.0. Wikipedia pageview fields are on Wikipedia Trends.

How should a Go job poll a live board?

get_top_trends takes a feed type, not a keyword. Pair the board with get_growth on the tokens that matter. On 2026-09-06T10:01:36Z, Google Trends rank 1 was what does a mistrial mean. Rank 8 was chatgpt. Rank 14 was dyson toothbrush. None of golang, go, or go programming appear in that top 25. The walkthrough that stores a live-board product token against last week's Search and Shopping closes is Dyson toothbrush Search vs Shopping.

board, err := Post(`{"mode":"get_top_trends","type":"Google Trends","limit":25}`)
if err != nil {
    log.Fatal(err)
}
growth, err := Post(`{"mode":"get_growth","source":"google search","keyword":"golang","percent_growth":["7D","30D","12M"]}`)
if err != nil {
    log.Fatal(err)
}
var parsed struct {
    Results []struct {
        RecentValue float64 `json:"recent_value"`
    } `json:"results"`
}
if err := json.Unmarshal(growth, &parsed); err != nil {
    log.Fatal(err)
}
score := parsed.Results[0].RecentValue

Dense rank lists in this pull start at rank 1 in data[0]. Read the rank field when sort is rank_change. Do not assume array offset equals rank after a mover sort. The 1d mover sort on 2026-09-06T10:01:36Z, baseline 2026-09-05T02:01:41Z, put dyson toothbrush at rank 14 versus previous rank 27, rank_change +13. The 7d mover sort returned only 3 rows against baseline 2026-08-30T02:01:37Z. dyson toothbrush was not in that 7d list.

A weekly Go job of five Search keywords plus one board is 6 calls. Twenty-four calls per 30-day month fits the 100-request free tier. Daily polling of that set is about 180 calls and needs Starter.

Response envelope checklist

  1. POST https://api.trendsapi.ai/api with Authorization: Bearer <api_key>.
  2. Modes are get_time_series, get_growth, and get_top_trends only.
  3. Parse body twice before reading results or dated points.
  4. Google Search uses the exact token typed. golang, go, and go programming are three series. Wikipedia titles are resolved names; confirm the title before joining volumes.
  5. Quota counts successful 200 responses: free 100/month, then 5,000 / 25,000 / 100,000 on paid tiers.

The Python sibling of this helper is Python Trends API. The Java sibling is Java Trends API. No SDK is required. A 50-line net/http helper covers growth, series, and board pulls for jobs that already run on cron.