An R Trends API client is a Bearer-authenticated POST to https://api.trendsapi.ai/api, then a second jsonlite::fromJSON of the body string. On 2026-09-09, Google Search for r programming scored 41.0 for the Saturday-dated week of 2026-09-05, up 7.89% from 38.0 on 2026-08-29. The IDE token rstudio scored 48.0, up 14.29% from 42.0. The package token tidyverse scored 30.0. The plotting package ggplot2 scored 12.0, down 88.0% from 100.0 on 2026-06-06. Bare r scored 84.0 and is not a language series. YouTube for r programming sat at 58.0. Google News for r programming sat at 3.0 with a low-quality warning. Wikipedia title R (programming language) had 40,040 August views. Those strings are separate rows.

How does an R client call Trends API?

The HTTP shape is one POST. Mode, source, and keyword sit in the JSON body. Auth is Authorization: Bearer. httr2 is enough. resp_body_json decodes the envelope. The first parse yields statusCode and a body string. The second parse yields results. percent_growth must be an R list so it encodes as a JSON array.

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

{"mode":"get_growth","source":"google search","keyword":"r programming","percent_growth":["7D","30D","3M","12M"]}
library(httr2)
library(jsonlite)

trends_post <- function(payload) {
  key <- Sys.getenv("TRENDSAPI_API_KEY")
  if (!nzchar(key)) stop("TRENDSAPI_API_KEY missing")
  resp <- request("https://api.trendsapi.ai/api") |>
    req_method("POST") |>
    req_headers(
      Authorization = paste("Bearer", key),
      `Content-Type` = "application/json"
    ) |>
    req_body_json(payload) |>
    req_perform()
  if (resp_status(resp) != 200L) {
    stop(sprintf("HTTP %s", resp_status(resp)))
  }
  envelope <- resp_body_json(resp)
  # body is a JSON string; parse it a second time
  fromJSON(envelope$body, simplifyVector = FALSE)
}

inner <- trends_post(list(
  mode = "get_growth",
  source = "google search",
  keyword = "r programming",
  percent_growth = list("7D", "30D", "3M", "12M")
))

The first mistake most clients make is treating envelope$body as a list after one parse. It is still a JSON string. Parse the envelope, then parse body a second time. Package docs:

https://httr2.r-lib.org/
https://jeroen.r-universe.dev/jsonlite

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. gtrendsR is a scrape client for Google Explore pages and is not this pipe. The replacement notes live on gtrendsR alternative.

What did get_growth return for R language tokens?

Pulled on 2026-09-09 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
r programming 7D 41.0 2026-08-29 38.0 +7.89%
r programming 14D 41.0 2026-08-22 45.0 -8.89%
r programming 30D 41.0 2026-08-08 52.0 -21.15%
r programming 3M 41.0 2026-06-06 100.0 -59.0%
r programming 12M 41.0 2025-09-06 75.0 -45.33%
r programming YTD 41.0 2026-01-03 45.0 -8.89%
rstudio 7D 48.0 2026-08-29 42.0 +14.29%
rstudio 14D 48.0 2026-08-22 38.0 +26.32%
rstudio 30D 48.0 2026-08-08 37.0 +29.73%
rstudio 3M 48.0 2026-06-06 54.0 -11.11%
rstudio 12M 48.0 2025-09-06 66.0 -27.27%
rstudio YTD 48.0 2026-01-03 25.0 +92.0%
tidyverse 7D 30.0 2026-08-29 26.0 +15.38%
tidyverse 14D 30.0 2026-08-22 28.0 +7.14%
tidyverse 30D 30.0 2026-08-08 31.0 -3.23%
tidyverse 3M 30.0 2026-06-06 48.0 -37.5%
tidyverse 12M 30.0 2025-09-06 50.0 -40.0%
tidyverse YTD 30.0 2026-01-03 22.0 +36.36%
ggplot2 7D 12.0 2026-08-29 14.0 -14.29%
ggplot2 14D 12.0 2026-08-22 18.0 -33.33%
ggplot2 30D 12.0 2026-08-08 29.0 -58.62%
ggplot2 3M 12.0 2026-06-06 100.0 -88.0%
ggplot2 12M 12.0 2025-09-06 29.0 -58.62%
ggplot2 YTD 12.0 2026-01-03 17.0 -29.41%
r language 7D 35.0 2026-08-29 31.0 +12.9%
r language 3M 35.0 2026-06-06 100.0 -65.0%
r language 12M 35.0 2025-09-06 46.0 -23.91%
r 7D 84.0 2026-08-29 82.0 +2.44%
r 3M 84.0 2026-06-06 95.0 -11.58%
r 12M 84.0 2025-09-06 79.0 +6.33%
python 7D 45.0 2026-08-29 39.0 +15.38%
python 3M 45.0 2026-06-06 100.0 -55.0%
python 12M 45.0 2025-09-06 69.0 -34.78%
shiny 7D 48.0 2026-08-29 45.0 +6.67%
shiny 3M 48.0 2026-06-06 49.0 -2.04%

r programming, rstudio, tidyverse, ggplot2, r language, r, python, and shiny growth rows in this pull did not include a volume field. Do not treat 84.0 on bare r as language demand. The letter token is mixed the same way bare go and bare ruby are mixed. shiny is an English adjective; the 48.0 score is not a dashboard-package series. ggplot2 is the cleaner package token.

Do not alert language adoption off a package 3M crash. r programming is 41.0 versus 100.0 on 2026-06-06 (-59.0%). r language is 35.0 versus 100.0 (-65.0%). ggplot2 is 12.0 versus 100.0 (-88.0%). rstudio over the same 3M window is 48.0 versus 54.0 (-11.11%). python Search in the same pull is 45.0 versus 100.0 (-55.0%). Scores are 0-100 per keyword. Do not rank r programming 41.0 against python 45.0 as a share-of-search.

get_time_series for r programming on Google Search peaked at 100 on 2026-05-16 and again on 2026-06-06. Adjacent weeks: 93.0 on 2026-05-09, 93.0 on 2026-05-30, 99.0 on 2026-06-13. The 2025 high in this pull was 85 on 2025-12-06. The 2026-09-05 tip at 41.0 is the first Saturday after that summer drop, not a new peak.

What did YouTube, News, Wikipedia, and PyPI return?

YouTube get_growth for r programming tipped 58.0 on 2026-09-05, up 7.41% from 54.0 on 2026-08-29. 14D was 58.0 versus 61.0 (-4.92%). 30D was 58.0 versus 57.0 (+1.75%). 3M was 58.0 versus 59.0 (-1.69%). 12M was 58.0 versus 65.0 (-10.77%). YTD was 58.0 versus 50.0 (+16.0%). YouTube did not crash with Search. A 3M Search drop of 59.0% next to a YouTube 3M drop of 1.69% is two series, not one adoption number.

Google News for r programming tipped 3.0 on 2026-09-05, flat versus 3.0 on 2026-08-29. Every longer window in this pull baselined at 0.0 (14D, 30D, 3M, 12M, YTD) and printed growth 999999. The payload included data_quality low and a warning that the underlying signal is over 90% zero values. Report the raw scores. Do not store 999999 as news growth.

Wikipedia is a monthly source. Compare on recent_volume, not on the 0-100 score. Title R (programming language) for August 2026 scored 1.4 with 40,040 views, down 3.29% in views from 41,400 in July (score 2.2, growth -36.36%). 3M views were 40,040 versus 42,288 in May (-5.32%). 12M views were 40,040 versus 89,613 in August 2025 (score 1.4 versus 30.8, volume -55.32%). Bare title R resolved to a different page: August score 21.8 with 15,178 views versus July 19.0 / 14,618 (volume +3.83%). Do not join 40,040 or 15,178 onto Search 41.0. See the Wikipedia source notes.

Keyword Rstudio on Wikipedia resolved to title Rstudio with 68 August views (score 17.0) versus 63 in July. That is a stub, not the IDE article. Confirm the resolved title before joining pageviews onto rstudio Search 48.0.

PyPI source python for package rpy2 tips on 2026-08-31, a week behind Google weekly sources. Compare packages on recent_volume. rpy2 scored 16.9 with 77,024 downloads versus 77,314 on 2026-08-24 (-0.38% volume). 1M was 77,024 versus 89,232 on 2026-08-03 (-13.68%). 3M was 77,024 versus 132,024 on 2026-06-01 (-41.66%). Gate volume alerts until the next python tip arrives. Do not mix 77,024 with Search 41.0.

How does a watchlist store live boards next to weekly scores?

A live board poll uses get_top_trends with no keyword. The same trends_post helper works. On 2026-09-09 the Google Trends board dated 2026-09-09T08:01:30Z put nintendo direct at rank 14. Weekly Search for that token was 18.0 for week 2026-09-05. YouTube Trending already ranked the Zelda Direct at position 3 while weekly YouTube for nintendo direct sat at 5.0. That split is the subject of Nintendo Direct live rank versus weekly Search.

board <- trends_post(list(
  mode = "get_top_trends",
  type = "Google Trends",
  limit = 25L
))

Docs for the modes live at https://trendsapi.ai/docs. Google Search board strings are not always valid get_growth keywords. Pair get_top_trends rank, rank_change, and get_growth before writing an alert. Source notes for Search sit on Google Trends.

A weekly R job that stores five Search tokens plus one board uses 6 successful 200s. At 24 calls per 30-day month the free cap of 100 still has headroom. Daily polling of the same set is about 180 calls and needs Starter (5,000). The Python sibling of this helper is Python Trends API. The Ruby sibling is Ruby Trends API.

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. r, r programming, rstudio, and ggplot2 are four 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.

No CRAN SDK is required. A 40-line httr2 helper covers growth, series, and board pulls for jobs that already run under Rscript or cron.