A Ruby Trends API client is a Bearer-authenticated POST to https://api.trendsapi.ai/api, then a second JSON.parse of the body string. On 2026-09-08, Google Search for ruby scored 54.0 for the Saturday-dated week of 2026-09-05, up 1.89% from 53.0 on 2026-08-29. That series returned no volume field. The framework token ruby on rails scored 44.0, up 7.32% from 41.0. The short token rails scored 40.0 with estimated volume 170,000. The disambiguated token ruby programming scored 3.0. YouTube for ruby sat at 62.0. Google News for ruby sat at 31.0 after 87.0 on 2026-08-22. Wikipedia resolved ruby as title Ruby with 20,859 August views, while Ruby (programming language) had 12,782 views. Those strings are not one language series. Store them as separate rows.

How does a Ruby client call Trends API?

The HTTP shape is one POST. Mode, source, and keyword sit in the JSON body. Auth is Authorization: Bearer. Stdlib Net::HTTP is enough. JSON.parse decodes the envelope. The first parse yields statusCode and a body string. The second parse yields results.

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

{"mode":"get_growth","source":"google search","keyword":"ruby","percent_growth":["7D","30D","3M","12M"]}
require "json"
require "net/http"
require "uri"

def trends_post(payload)
  key = ENV.fetch("TRENDSAPI_API_KEY")
  uri = URI("https://api.trendsapi.ai/api")
  req = Net::HTTP::Post.new(uri)
  req["Authorization"] = "Bearer #{key}"
  req["Content-Type"] = "application/json"
  req.body = JSON.dump(payload)
  res = Net::HTTP.start(
    uri.hostname,
    uri.port,
    use_ssl: true,
    open_timeout: 10,
    read_timeout: 60
  ) { |http| http.request(req) }
  raise "HTTP #{res.code}" unless res.code == "200"
  envelope = JSON.parse(res.body)
  # body is a JSON string; parse it a second time
  JSON.parse(envelope.fetch("body"))
end

The first mistake most clients make is treating envelope["body"] as a Hash after one parse. It is still a JSON string. Parse the envelope, then parse body a second time. Stdlib pages:

https://docs.ruby-lang.org/en/master/Net/HTTP.html
https://docs.ruby-lang.org/en/master/JSON.html

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 Ruby language tokens?

Pulled on 2026-09-08 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
ruby 7D 54.0 2026-08-29 53.0 +1.89%
ruby 14D 54.0 2026-08-22 65.0 -16.92%
ruby 30D 54.0 2026-08-08 55.0 -1.82%
ruby 3M 54.0 2026-06-06 66.0 -18.18%
ruby 12M 54.0 2025-09-06 59.0 -8.47%
ruby YTD 54.0 2026-01-03 64.0 -15.62%
ruby on rails 7D 44.0 2026-08-29 41.0 +7.32%
ruby on rails 14D 44.0 2026-08-22 44.0 0.0%
ruby on rails 30D 44.0 2026-08-08 57.0 -22.81%
ruby on rails 3M 44.0 2026-06-06 71.0 -38.03%
ruby on rails 12M 44.0 2025-09-06 73.0 -39.73%
ruby on rails YTD 44.0 2026-01-03 40.0 +10.0%
rails 7D 40.0 2026-08-29 42.0 -4.76%
rails 14D 40.0 2026-08-22 47.0 -14.89%
rails 30D 40.0 2026-08-08 48.0 -16.67%
rails 3M 40.0 2026-06-06 60.0 -33.33%
rails 12M 40.0 2025-09-06 49.0 -18.37%
rails YTD 40.0 2026-01-03 40.0 0.0%
ruby programming 7D 3.0 2026-08-29 3.0 0.0%
ruby programming 14D 3.0 2026-08-22 3.0 0.0%
ruby programming 30D 3.0 2026-08-08 4.0 -25.0%
ruby programming 3M 3.0 2026-06-06 9.0 -66.67%
ruby programming 12M 3.0 2025-09-06 5.0 -40.0%
ruby programming YTD 3.0 2026-01-03 3.0 0.0%
python 7D 42.0 2026-08-29 37.0 +13.51%
python 3M 42.0 2026-06-06 97.0 -56.7%
javascript 7D 29.0 2026-08-29 20.0 +45.0%
javascript 3M 29.0 2026-06-06 68.0 -57.35%
php 7D 36.0 2026-08-29 35.0 +2.86%
php 3M 36.0 2026-06-06 51.0 -29.41%
golang 7D 25.0 2026-08-29 22.0 +13.64%
golang 3M 25.0 2026-06-06 45.0 -44.44%

rails Search estimated volume on the 2026-09-05 tip is 170,000 versus 179,000 on 2026-08-29. ruby, ruby on rails, ruby programming, python, javascript, and golang growth rows in this pull did not include a volume field. php did: 460,000 versus 448,000 on 2026-08-29. Do not join 170,000 onto a ruby score of 54.0.

Bare ruby is a mixed token, same class of problem as bare go or bare rust. A 3M alert on ruby fires at -18.18% versus 66.0. The same window on ruby on rails fires at -38.03% versus 71.0, and on ruby programming at -66.67% versus 9.0. rails 7D is down 4.76% from 42.0 while ruby on rails 7D is up 7.32% from 41.0. Those four Search series are not aliases. Keep the keywords split. Do not alert language adoption off a framework 3M crash, and do not treat score 54.0 on ruby as language demand.

get_time_series for ruby on Google Search printed 54 on 2026-09-05 with no volume, matching the get_growth recent_value. Series peak in the pull is 100 on 2026-04-18. 2025 high is 98 on 2025-03-08. ruby on rails series peak in the pull is 100 on 2022-04-23 and again on 2022-06-25. 2026 high for that token is 98 on 2026-05-09, then 94 on 2026-05-16 and 2026-06-27, then 44 on 2026-09-05. Store the dated series close next to the growth row. Do not collapse a 2022 peak onto a 2026 tip.

A helper that walks several tokens:

TOKENS = ["ruby", "ruby on rails", "rails", "ruby programming"]

rows = TOKENS.map do |keyword|
  payload = {
    "mode" => "get_growth",
    "source" => "google search",
    "keyword" => keyword,
    "percent_growth" => ["7D", "30D", "3M", "12M"]
  }
  body = trends_post(payload)
  [keyword, body]
end

Call sources one at a time. A comma-separated source list can gateway-timeout. The same helper works for the PHP cURL client and the Go net/http client. Swap the HTTP library. Keep the second parse.

How do YouTube, News, and Wikipedia disagree with Search?

YouTube get_growth for ruby on 2026-09-08:

Period Recent Baseline date Baseline Growth
7D 62.0 2026-08-29 62.0 0.0%
14D 62.0 2026-08-22 63.0 -1.59%
30D 62.0 2026-08-08 66.0 -6.06%
3M 62.0 2026-06-06 64.0 -3.12%
12M 62.0 2025-09-06 66.0 -6.06%
YTD 62.0 2026-01-03 70.0 -11.43%

YouTube ruby is almost flat on 3M at -3.12% while Search ruby is -18.18% and Search ruby on rails is -38.03% on the same window. A video-watch series is not a language-adoption series. Store the YouTube source next to Search, not as a substitute.

Google News get_growth for ruby:

Period Recent Baseline date Baseline Growth
7D 31.0 2026-08-29 34.0 -8.82%
14D 31.0 2026-08-22 87.0 -64.37%
30D 31.0 2026-08-08 20.0 +55.0%
3M 31.0 2026-06-06 8.0 +287.5%
12M 31.0 2025-09-06 20.0 +55.0%
YTD 31.0 2026-01-03 21.0 +47.62%

The News time series printed 73 on 2026-08-15, 87 on 2026-08-22, 34 on 2026-08-29, then 31 on 2026-09-05. Search on those four Saturdays printed 59, 65, 53, then 54. News spiked while Search did not reprint its own peak. Series peak for News in the pull is 100 on 2025-03-08. The next local high is 99 on 2026-04-18, the same week Search printed 100. The August 87 print is a later coverage burst, not the April peak. Do not join a News 87 onto Search 65.

Wikipedia get_growth is monthly. 7D collapsed. Pulled titles and August 2026-08-01 closes:

Title August score August views July views 1M volume 3M volume 12M volume
Ruby 0.7 20,859 20,241 +3.05% -25.86% -20.09%
Ruby (programming language) 1.7 12,782 11,953 +6.94% -3.01% -13.83%

July score on title Ruby was 0.0 versus 0.7 in August, so 1M growth printed 999999. Volume moved 20,241 to 20,859. Compare Wikipedia on views, not on the 0-100 score. Language-page 1M score growth is +325.0% (0.4 to 1.7) while views only moved 11,953 to 12,782. Do not join 20,859 or 12,782 onto Search 54.0. See the Wikipedia source notes.

A live board poll uses get_top_trends with no keyword. The same trends_post helper works. On 2026-09-08 the Google Trends board dated 2026-09-08T08:01:41Z put elizabeth holmes at rank 4 with a 1-day climb of 136 from rank 140. Weekly Search for that name was still 1.0. That split is the subject of Elizabeth Holmes live rank versus weekly Search.

board = trends_post({
  "mode" => "get_top_trends",
  "type" => "Google Trends",
  "limit" => 25
})

Docs for the modes live at https://trendsapi.ai/docs.