An Elixir job talks to Trends API with one POST to https://api.trendsapi.ai/api, a Bearer key, and a JSON body that names a mode. There is no official Elixir library. Req sends the request. Jason parses the envelope, then parses the body string a second time. Pulled on 2026-09-15, Google Search for elixir programming scored 28.0 for the week of 2026-09-12, up 27.27% from 22.0. elixir language scored 27.0, up 42.11% from 19.0. phoenix framework scored 10.0, down 28.57% from 14.0. Do not treat the Phoenix 7D drop as language adoption. The same helper that stores those rows also pulls a live Google Trends board; a rank-4 token that weekly Search printed at 30.0 with a 1-day mover of 63 is documented in iOS 27 release date live rank versus weekly Search.
How does an Elixir client call Trends API?
POST https://api.trendsapi.ai/api
Authorization: Bearer <api_key>
Content-Type: application/json
{"mode":"get_growth","source":"google search","keyword":"elixir programming","percent_growth":["7D","30D","3M","12M"]}
Mix.install([{:req, "~> 0.5"}])
defmodule Trends do
def post(payload) do
key = System.get_env("TRENDSAPI_API_KEY") || raise "TRENDSAPI_API_KEY is unset"
resp =
Req.post!("https://api.trendsapi.ai/api",
json: payload,
auth: {:bearer, key}
)
if resp.status != 200 do
raise "HTTP #{resp.status}"
end
envelope = resp.body
# body is a JSON string; parse it a second time
Jason.decode!(envelope["body"])
end
end
inner =
Trends.post(%{
"mode" => "get_growth",
"source" => "google search",
"keyword" => "elixir programming",
"percent_growth" => ["7D", "30D", "3M", "12M"]
})
IO.inspect(inner)
The first mistake most clients make is treating the body field as an object after one parse. It is still a JSON string. Req decodes the envelope. Jason then parses body a second time. Library docs:
https://hexdocs.pm/req/Req.html
https://hexdocs.pm/jason/Jason.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. There is no Elixir-specific source on this API. npm covers npmjs package names. python covers PyPI project names. There is no Hex.pm source. An Elixir watchlist that needs Hex download counts has to pull those from somewhere else.
What did get_growth return for Elixir language tokens?
Pulled on 2026-09-15 with source set to google search. get_growth tips on 2026-09-12. The prior Saturday 2026-09-05 is the last full week in the same series. Bare elixir is a polluted token (the drink, the language, other homonyms). Store the phrase tokens.
| Keyword | Period | Recent | Baseline date | Baseline | Growth |
|---|---|---|---|---|---|
| elixir programming | 7D | 28.0 | 2026-09-05 | 22.0 | +27.27% |
| elixir programming | 14D | 28.0 | 2026-08-29 | 35.0 | -20.0% |
| elixir programming | 30D | 28.0 | 2026-08-15 | 40.0 | -30.0% |
| elixir programming | 3M | 28.0 | 2026-06-13 | 69.0 | -59.42% |
| elixir programming | 12M | 28.0 | 2025-09-13 | 68.0 | -58.82% |
| elixir programming | YTD | 28.0 | 2026-01-03 | 48.0 | -41.67% |
| elixir language | 7D | 27.0 | 2026-09-05 | 19.0 | +42.11% |
| elixir phoenix | 7D | 23.0 | 2026-09-05 | 26.0 | -11.54% |
| phoenix framework | 7D | 10.0 | 2026-09-05 | 14.0 | -28.57% |
| phoenix liveview | 7D | 7.0 | 2026-09-05 | 6.0 | +16.67% |
| erlang | 7D | 22.0 | 2026-09-05 | 24.0 | -8.33% |
| elixir | 7D | 69.0 | 2026-09-05 | 74.0 | -6.76% |
| hex.pm | 7D | 3.0 | 2026-09-05 | 2.0 | +50.0% |
| dart programming | 7D | 26.0 | 2026-09-05 | 20.0 | +30.0% |
| rust programming | 7D | 15.0 | 2026-09-05 | 16.0 | -6.25% |
| scala programming | 7D | 23.0 | 2026-09-05 | 29.0 | -20.69% |
elixir programming and phoenix framework closed at opposite 7D directions. The phrase token rose 27.27%. Phoenix fell 28.57% to 10.0. elixir language rose 42.11% to 27.0. elixir phoenix scored 23.0, down 11.54% from 26.0. phoenix liveview scored 7.0, up 16.67% from 6.0. erlang scored 22.0, down 8.33% from 24.0. Bare elixir scored 69.0 with estimated volume 428,000 versus 459,000. That is not the language series. A job that alerts "Elixir is down" off Phoenix 7D is reading the web framework series. Store each string.
3M is a summer drop on Phoenix and LiveView, milder on the 7D bounce of the phrase token. elixir programming is 28.0 versus 69.0 on 2026-06-13 (-59.42%). elixir language is 27.0 versus 86.0 (-68.6%). elixir phoenix is 23.0 versus 81.0 (-71.6%). phoenix framework is 10.0 versus 54.0 (-81.48%). phoenix liveview is 7.0 versus 66.0 (-89.39%). erlang is 22.0 versus 52.0 (-57.69%). hex.pm is 3.0 versus 41.0 (-92.68%). dart programming is 26.0 versus 58.0 (-55.17%). rust programming is 15.0 versus 41.0 (-63.41%). scala programming is 23.0 versus 35.0 (-34.29%). Do not alert language adoption off a Phoenix or LiveView 3M crash. YouTube for the same tokens is a different shape (next section).
get_time_series for elixir programming on Google Search closed at 28 on 2026-09-12, matching get_growth 28.0. Adjacent weeks: 22 on 2026-09-05, 35 on 2026-08-29, 34 on 2026-08-22, 40 on 2026-08-15, 28 on 2026-08-08. The series hit 100 on 2026-04-04, with 97 on 2026-06-06 and 95 on 2026-03-07. The 2026-01-03 close was 48. The 2025-09-13 close was 68. The 7D bounce from 22 to 28 sits after that April peak, not at a new high.
get_time_series for phoenix framework closed at 10 on 2026-09-12, matching get_growth 10.0. Adjacent weeks: 14 on 2026-09-05, 22 on 2026-08-29, 14 on 2026-08-22, 19 on 2026-08-15, 19 on 2026-08-08. Peak 100 on 2026-05-09, with 85 on 2026-05-16 and 75 on 2026-05-02. 12M was 10.0 versus 31.0 on 2025-09-13 (-67.74%). Tip 10 is the floor after that May peak. Phoenix 7D -28.57% is one more week on that floor, not language adoption.
Bare elixir YTD was 69.0 versus 91.0 on 2026-01-03 (-24.18%). Phrase token YTD was 28.0 versus 48.0 (-41.67%). Do not copy 69.0 onto elixir programming. hex.pm 7D +50.0% is 3.0 versus 2.0. That is a sparse registry token, not Hex download volume. There is no Hex source.
The Dart sibling of this helper is Dart Trends API. The Scala sibling is Scala Trends API.
What did YouTube, News, and Wikipedia return?
YouTube for elixir programming tipped 20.0 on 2026-09-12, down 16.67% from 24.0 on 2026-09-05, the opposite 7D direction from Search +27.27%. 14D, 30D, 3M, 12M, and YTD all baselined at 0.0 and printed growth 999999. Report 20.0 versus 0.0. Do not store 999999. get_time_series closed at 20 on 2026-09-12, matching get_growth. Adjacent weeks: 24 on 2026-09-05, then 0 on 2026-08-29 through 2026-08-08, then 91 on 2026-08-01. Peak in this pull is 100 on 2023-07-08. The week of 2026-08-08 printed YouTube 0 while Search that week was 28. Tip 20 is not that 2023 peak. Do not copy YouTube zeros onto Search 28.0.
YouTube for phoenix framework moved opposite Search on 7D. It tipped 17.0, up 54.55% from 11.0, while Search fell 28.57%. 14D, 3M, 12M, and YTD baselined at 0.0 and printed growth 999999. The payload marked data_quality low with a warning that the underlying signal is over 90% zeros. Report 17.0 versus 0.0. Phoenix YouTube 17.0 is not Phoenix Search 10.0. A Search summer crash is not a YouTube bounce of the same size.
Keyword Google News for elixir programming tipped 0.0 on 2026-09-12 versus 0.0 on every listed baseline. The payload marked data_quality low with a warning that the underlying signal is over 90% zeros. Report 0.0. Keyword News and the Google News Top News board are different feeds. Store the low-quality flag on the phrase token. Do not fill News from Search 28.0.
Wikipedia resolved two titles. Keyword Elixir (programming language) resolved with August score 1.1 and 6,976 views versus May 1.2 / 7,032 (score -8.33%, volume -0.8%). 12M volume was 6,976 versus 9,635 on 2025-08-01 (-27.6%) while the score went 1.1 versus 4.2 (-73.81%). YTD volume was 6,976 versus 7,006 (-0.43%) with score 1.1 versus 1.1 (flat). 7D and 14D collapsed to the same monthly point. get_time_series also printed July 0.0 / 6,028 views and a March spike of 15.9 / 19,888. Report both score and volume.
Keyword Elixir is a different page. August score 21.7 with 4,208 views versus May 7.5 / 3,394 (score +189.33%, volume +23.98%). 12M volume was 4,208 versus 3,876 (+8.57%). YTD volume was 4,208 versus 3,777 (+11.41%). The language page has more August views than the short title (6,976 versus 4,208). Keyword Phoenix (web framework) resolved with August score 4.4 and 733 views versus May 0.0 / 606, which printed score growth 999999 while volume rose 20.96%. Report 4.4 versus 0.0 and 733 versus 606. 12M volume was 733 versus 921 (-20.41%). Compare Wikipedia on volume. Do not join either page onto Search 28.0. Notes for the Wikipedia source sit on Wikipedia Trends.
How does a watchlist store live boards next to weekly scores?
get_top_trends has no keyword. It returns a ranked board. Pair it with get_growth for the tokens that appear, using the exact board string.
{"mode":"get_top_trends","type":"Google Trends","limit":25}
{"mode":"get_top_trends","type":"Google Trends","sort":"rank_change","window":"1d","limit":25}
The Google Trends board at 2026-09-15T10:01:37Z ranked iphone duo 1, iphone 18 pro max 2, and ios 27 release date 4. The 1-day rank_change sort (16 rows, baseline 2026-09-14T00:01:29Z) listed ios 27 release date with rank_change 63 from prev_rank 67. The 7-day sort returned 6 rows and omitted that token. Weekly Search for the same phrase was 30.0, up 328.57% from 7.0. Live rank and the 1-day mover list can catch a token that the 7-day list still misses, while weekly Search sits at 30.0 rather than 100. The walk-through is iOS 27 release date live rank versus weekly Search.
An Elixir watchlist that stores six Search tokens (elixir programming, elixir language, phoenix framework, phoenix liveview, erlang, dart programming) plus one Google Trends board uses 7 successful 200s. Four runs per 30-day month is 28 calls and fits the free cap of 100. Daily polling of that set is about 210 calls and needs Starter (5,000). Modes and sources 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.
The Rust sibling of this helper is Rust Trends API. The Python sibling is Python Trends API.
Envelope checklist
POST https://api.trendsapi.ai/apiwithAuthorization: Bearer <api_key>.- Modes are
get_time_series,get_growth, andget_top_trendsonly. - Parse
bodytwice before readingresultsor dated points. - Google Search uses the exact token typed.
elixir,elixir programming,elixir language,elixir phoenix,phoenix framework, andphoenix livevieware six series. Wikipedia titles are resolved names; confirm the title and compare on volume before joining. - Quota counts successful 200 responses: free 100/month, then 5,000 / 25,000 / 100,000 on paid tiers.
No Elixir library is required. A 40-line Req helper covers growth, series, and board pulls for jobs that already run under systemd or a cron timer.