An Erlang 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 Erlang library. inets httpc sends the request. jsone parses the envelope, then parses the body string a second time. Pulled on 2026-10-13, Google Search for erlang scored 18.0 for the week of 2026-10-10, down 21.74% from 23.0. erlang programming scored 18.0, up 20.0% from 15.0. Those two tokens closed at the same 18.0 and moved in opposite 7D directions. YouTube for erlang scored 11.0, down 8.33% from 12.0. Do not copy programming +20.0% onto a language-adoption alert that only watches the 7D drop. The same helper that stores those rows also pulls a live Google Trends board; a rank-2 token that weekly Search still printed at 0.0 versus 0.0 is documented in RJ Mitte live rank versus weekly Search.

How does an Erlang 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":"erlang","percent_growth":["7D","30D","3M","12M"]}
-module(trends_growth).
-export([post/1]).

post(Payload) ->
    application:ensure_all_started(inets),
    application:ensure_all_started(ssl),
    Key = os:getenv("TRENDSAPI_API_KEY"),
    Body = jsone:encode(Payload),
    Headers = [
        {"Authorization", "Bearer " ++ Key},
        {"Content-Type", "application/json"}
    ],
    {ok, {{_, 200, _}, _, Resp}} =
        httpc:request(
            post,
            {"https://api.trendsapi.ai/api", Headers, "application/json", Body},
            [],
            []
        ),
    Envelope = jsone:decode(iolist_to_binary(Resp)),
    % body is a JSON string; parse it a second time
    InnerBin = maps:get(<<"body">>, Envelope),
    jsone:decode(InnerBin).
Inner = trends_growth:post(#{
    <<"mode">> => <<"get_growth">>,
    <<"source">> => <<"google search">>,
    <<"keyword">> => <<"erlang">>,
    <<"percent_growth">> => [<<"7D">>, <<"30D">>, <<"3M">>, <<"12M">>]
}),
io:format("~p~n", [Inner]).

The first mistake most clients make is treating the body field as an object after one parse. It is still a JSON string. httpc returns the envelope bytes. jsone then parses body a second time. Library docs:

https://www.erlang.org/doc/apps/inets/httpc.html
https://hexdocs.pm/jsone/jsone.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 Erlang-specific source on this API. npm covers npmjs package names. python covers PyPI project names. There is no Hex.pm source. A watchlist that needs Hex download counts has to pull those from somewhere else. An Elixir sibling of this helper is on Elixir Trends API. A Fortran sibling is on Fortran Trends API.

What did get_growth return for Erlang language tokens?

get_growth for erlang on google search tips on 2026-10-10. Store the exact strings. The language token, the programming phrase, and the otp erlang runtime phrase are different series. Bare cowboy and bare hackney are not the HTTP libraries.

Keyword Period Recent date Recent Baseline date Baseline Growth
erlang 7D 2026-10-10 18.0 2026-10-03 23.0 -21.74%
erlang 14D 2026-10-10 18.0 2026-09-26 36.0 -50.0%
erlang 30D 2026-10-10 18.0 2026-09-12 30.0 -40.0%
erlang 3M 2026-10-10 18.0 2026-07-11 46.0 -60.87%
erlang 12M 2026-10-10 18.0 2025-10-11 31.0 -41.94%
erlang YTD 2026-10-10 18.0 2026-01-03 20.0 -10.0%
erlang programming 7D 2026-10-10 18.0 2026-10-03 15.0 +20.0%
erlang programming 14D 2026-10-10 18.0 2026-09-26 0.0 18.0 vs 0.0
erlang programming 30D 2026-10-10 18.0 2026-09-12 0.0 18.0 vs 0.0
erlang programming 3M 2026-10-10 18.0 2026-07-11 44.0 -59.09%
erlang programming 12M 2026-10-10 18.0 2025-10-11 0.0 18.0 vs 0.0
erlang programming YTD 2026-10-10 18.0 2026-01-03 41.0 -56.1%
otp erlang 7D 2026-10-10 9.0 2026-10-03 11.0 -18.18%
otp erlang 12M 2026-10-10 9.0 2025-10-11 36.0 -75.0%
otp erlang YTD 2026-10-10 9.0 2026-01-03 0.0 9.0 vs 0.0
elixir programming 7D 2026-10-10 24.0 2026-10-03 18.0 +33.33%
elixir programming 12M 2026-10-10 24.0 2025-10-11 55.0 -56.36%
elixir programming YTD 2026-10-10 24.0 2026-01-03 55.0 -56.36%
elixir language 7D 2026-10-10 20.0 2026-10-03 26.0 -23.08%
elixir language 12M 2026-10-10 20.0 2025-10-11 69.0 -71.01%
elixir 7D 2026-10-10 70.0 2026-10-03 75.0 -6.67%
phoenix framework 7D 2026-10-10 5.0 2026-10-03 19.0 -73.68%
cowboy 7D 2026-10-10 47.0 2026-10-03 49.0 -4.08%
cowboy erlang 7D 2026-10-10 0.0 2026-10-03 0.0 0.0%
hackney 7D 2026-10-10 40.0 2026-10-03 44.0 -9.09%
hackney erlang 7D 2026-10-10 0.0 2026-10-03 0.0 0.0%
hex.pm 7D 2026-10-10 1.0 2026-10-03 1.0 0.0%
rust programming 7D 2026-10-10 25.0 2026-10-03 16.0 +56.25%
go programming 7D 2026-10-10 16.0 2026-10-03 27.0 -40.74%

erlang and erlang programming closed at 18.0 with opposite 7D signs. The language token fell 21.74% from 23.0. The phrase token rose 20.0% from 15.0. 14D, 30D, and 12M on the phrase token baselined at 0.0 and printed growth 999999. Report 18.0 versus 0.0. Do not store 999999. otp erlang scored 9.0, down 18.18% from 11.0. 12M was 9.0 versus 36.0 (-75.0%). YTD printed 9.0 versus 0.0. Do not alert language adoption off an OTP 12M drop to 9.0.

Bare elixir scored 70.0 with estimated volume 399,000 versus 427,000. That is not the language series. elixir programming scored 24.0, up 33.33% from 18.0. elixir language scored 20.0, down 23.08% from 26.0. phoenix framework scored 5.0, down 73.68% from 19.0. 12M on Phoenix was 5.0 versus 28.0 (-82.14%). YTD was 5.0 versus 23.0 (-78.26%). A job that alerts "Erlang is down" off Phoenix 7D is reading the Elixir web framework series. Store each string.

Bare cowboy scored 47.0, down 4.08% from 49.0. That is the western and sports series, not the Cowboy HTTP server. cowboy erlang scored 0.0 versus 0.0, data_quality low. Bare hackney scored 40.0, down 9.09% from 44.0. That is the London-borough series, not the HTTP client. hackney erlang scored 0.0 versus 0.0, data_quality low. hex.pm scored 1.0 versus 1.0 on 7D. 12M printed 1.0 versus 0.0. YTD was 1.0 versus 11.0 (-90.91%). That is a sparse registry token, not Hex download volume. There is no Hex source.

rust programming scored 25.0, up 56.25% from 16.0, while erlang fell 21.74%. 12M on Rust was 25.0 versus 31.0 (-19.35%). YTD was 25.0 versus 28.0 (-10.71%). Yesterday the same Saturday tip reprinted Rust at 27.0 versus 17.0. Store the session pull. go programming scored 16.0, down 40.74% from 27.0. 12M was 16.0 versus 48.0 (-66.67%). YTD was 16.0 versus 34.0 (-52.94%). Yesterday Go reprinted 16.0 versus 23.0. Do not copy 25.0 or 16.0 onto erlang 18.0.

get_time_series for erlang on Google Search closed at 18 on 2026-10-10, matching get_growth 18.0. Adjacent weeks: 23 on 2026-10-03, 36 on 2026-09-26, 29 on 2026-09-19, 30 on 2026-09-12, 32 on 2026-09-05. The series has 261 weekly points from 2021-10-16 through 2026-10-10. Peak in this pull is 100 on 2024-08-31, with 98 on 2024-09-07 and 88 on 2024-09-14. The 2026 local high is 58 on 2026-06-13. Tip 18 is not that August 2024 peak.

get_time_series for erlang programming closed at 18 on 2026-10-10, matching get_growth 18.0. Adjacent weeks: 15 on 2026-10-03, then 0 on 2026-09-26 through 2026-07-25. Peak in this pull is 100 on 2024-08-10. The phrase token sat at 0 for nine consecutive Saturdays, then printed 15 and 18. Same close of 18 as the language token. Opposite 7D sign. A Rust sibling of this helper is on Rust Trends API. A Go sibling is on Go Trends API.

What did YouTube, News, and Wikipedia return?

YouTube get_growth for erlang tipped 11.0 on 2026-10-10, down 8.33% from 12.0, a milder 7D drop than Search -21.74%. 14D was 11.0 versus 13.0 (-15.38%). 30D was 11.0 versus 16.0 (-31.25%). 3M was 11.0 versus 16.0 (-31.25%). 12M was 11.0 versus 17.0 (-35.29%). YTD was 11.0 versus 10.0 (+10.0%). YTD signs disagree: YouTube up 10.0% while Search is down 10.0%. get_time_series closed at 11 on 2026-10-10, matching get_growth. Adjacent weeks: 12 on 2026-10-03, 13 on 2026-09-26, 14 on 2026-09-19, 16 on 2026-09-12. Peak in this pull is 100 on 2024-09-07 and again on 2024-09-14. On 2024-08-31 Search printed 100 while YouTube printed 80. YouTube 11.0 is not Search 18.0. Do not copy the YouTube YTD bounce onto a Search 7D drop.

Keyword Google News for erlang tipped 5.0 on 2026-10-10 versus 0.0 on every listed baseline. Growth printed 999999. Report 5.0 versus 0.0. data_quality was low. get_time_series closed at 5, matching get_growth. Adjacent weeks: 0 on 2026-10-03, 0 on 2026-09-26, 0 on 2026-09-19, 0 on 2026-09-12. Peak in this pull is 100 on 2025-04-19. A later spike printed 41 on 2026-05-09. Tip 5 is not a new News high. Keyword News and the Google News Top News board are different feeds. Do not fill News from Search 18.0.

Wikipedia resolved two titles. Keyword Erlang (programming language) resolved with September score 2.1 and 8,351 views versus June 9.9 / 9,731 (score -78.79%, volume -14.18%). 12M volume was 8,351 versus 11,012 on 2025-09-01 (-24.16%) while the score went 2.1 versus 17.2 (-87.79%). YTD volume was 8,351 versus 9,532 (-12.39%) with score 2.1 versus 8.8 (-76.14%). 7D collapsed to the same monthly point. Report both score and volume.

Keyword Erlang is a different page. September score 0.5 with 413 views versus June 2.4 / 430 (score -79.17%, volume -3.95%). 12M volume was 413 versus 603 (-31.51%). YTD volume was 413 versus 625 (-33.92%). The language page has more September views than the short title (8,351 versus 413). Compare Wikipedia on volume. Do not join either page onto Search 18.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-10-13T10:01:38Z ranked hurricane isaias 1 and rj mitte 2. The 1-day rank_change sort (15 rows, baseline 2026-10-12T02:01:36Z) omitted rj mitte. The 7-day sort returned 0 rows (baseline 2026-10-06T02:01:41Z) with a note that every item held or fell. Weekly Search for rj mitte was 0.0 versus 0.0 on every window, data_quality low. Wikipedia Trending ranked RJ Mitte 1 the same morning, while keyword Wikipedia returned 404. Live rank 2 with weekly Search 0 is not live rank 1 with Search 100. The walk-through is RJ Mitte live rank versus weekly Search.

An Erlang watchlist that stores five Search tokens (erlang, erlang programming, otp erlang, elixir programming, phoenix framework) plus one YouTube series 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.

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. erlang, erlang programming, and otp erlang are three series. cowboy and hackney without erlang are other series. Wikipedia titles are resolved names; confirm the title and compare on volume before joining.
  5. Quota counts successful 200 responses: free 100/month, then 5,000 / 25,000 / 100,000 on paid tiers.

No Erlang library is required. A 30-line httpc helper covers growth, series, and board pulls for jobs that already run under systemd or a cron timer.