An Elm 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 Elm library. Http.request ships in elm/http. Json.Decode ships in elm/json. The first decode reads the envelope, then a second decode reads the body string. Pulled on 2026-11-09, Google Search for elm programming scored 6.0 for the week of 2026-11-07, up 20.0% from 5.0. elm language scored 6.0, also up 20.0% from 5.0. Those two tokens closed at the same 7D value. 14D disagreed: programming printed versus 0.0, language printed 6.0 versus 8.0 (-25.0%). YouTube for elm programming scored 0.0 versus 0.0. Do not copy bare elm Search 31.0 onto a language-adoption alert that only watches the phrase token at 6.0. The same helper that stores those rows also pulls a live Google Trends board. A rank-11 name whose weekly Search still printed 13.0 while daily Search printed 100 is documented in Xavier Becerra live rank versus weekly Search.

How does an Elm 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":"elm programming","percent_growth":["7D","30D","3M","12M"]}
module Trends exposing (request)

import Http
import Json.Decode as Decode exposing (Decoder)
import Json.Encode as Encode

type alias Envelope =
    { statusCode : Int
    , body : String
    }

type Msg
    = GotEnvelope (Result Http.Error Envelope)

envelopeDecoder : Decoder Envelope
envelopeDecoder =
    Decode.map2 Envelope
        (Decode.field "statusCode" Decode.int)
        (Decode.field "body" Decode.string)

request : String -> Cmd Msg
request key =
    Http.request
        { method = "POST"
        , headers = [ Http.header "Authorization" ("Bearer " ++ key) ]
        , url = "https://api.trendsapi.ai/api"
        , body =
            Http.jsonBody
                (Encode.object
                    [ ( "mode", Encode.string "get_growth" )
                    , ( "source", Encode.string "google search" )
                    , ( "keyword", Encode.string "elm programming" )
                    , ( "percent_growth"
                      , Encode.list Encode.string [ "7D", "30D", "3M", "12M" ]
                      )
                    ]
                )
        , expect = Http.expectJson GotEnvelope envelopeDecoder
        , timeout = Nothing
        , tracker = Nothing
        }

Http.request owns the HTTP client. Http.header sets the Bearer key. Http.jsonBody holds the JSON object. Http.expectJson decodes the transport object into statusCode and body. A second Decode.decodeString on envelope.body is required before reading recent_value. Add the packages with:

elm install elm/http
elm install elm/json
https://package.elm-lang.org/packages/elm/http/latest/Http
https://package.elm-lang.org/packages/elm/json/latest/Json-Decode
https://guide.elm-lang.org/effects/http
https://elm-lang.org

Http.request and Json.Decode are client libraries. They are not Trends API sources. There is no Elm package-registry source on this API. elm install talks to package.elm-lang.org. That registry is not a Trends source.

The response envelope is {"statusCode": int, "body": string}. body is a JSON string and must be parsed a second time before reading recent_value. A Vala client that does the same double parse with Soup.Session is on Vala Trends API. A Haxe client is on Haxe Trends API.

What did get_growth return for Elm language tokens?

get_growth for elm programming on google search tips on 2026-11-07. Store the exact strings. elm language is a different series. The two phrases closed at the same 7D score and the same +20.0% growth. 14D split them.

Keyword Period Recent date Recent Baseline date Baseline Growth
elm programming 7D 2026-11-07 6.0 2026-10-31 5.0 +20.0%
elm programming 14D 2026-11-07 6.0 2026-10-24 0.0 vs 0.0
elm programming 30D 2026-11-07 6.0 2026-10-10 0.0 vs 0.0
elm programming 3M 2026-11-07 6.0 2026-08-08 31.0 -80.65%
elm programming 12M 2026-11-07 6.0 2025-11-08 27.0 -77.78%
elm programming YTD 2026-11-07 6.0 2026-01-03 0.0 vs 0.0
elm language 7D 2026-11-07 6.0 2026-10-31 5.0 +20.0%
elm language 14D 2026-11-07 6.0 2026-10-24 8.0 -25.0%
elm language 30D 2026-11-07 6.0 2026-10-10 10.0 -40.0%
elm language 3M 2026-11-07 6.0 2026-08-08 29.0 -79.31%
elm language 12M 2026-11-07 6.0 2025-11-08 31.0 -80.65%
elm language YTD 2026-11-07 6.0 2026-01-03 16.0 -62.5%
elm compiler 7D 2026-11-07 0.0 2026-10-31 0.0 0.0%
elm-lang 7D 2026-11-07 0.0 2026-10-31 0.0 0.0%
elm 7D 2026-11-07 31.0 2026-10-31 35.0 -11.43%
elm 12M 2026-11-07 31.0 2025-11-08 34.0 -8.82%
elm YTD 2026-11-07 31.0 2026-01-03 31.0 0.0%

get_time_series for elm programming on Google Search closed at 6.0 on 2026-11-07, matching get_growth 6.0. Adjacent weeks: 5.0 on 2026-10-31, 0.0 on 2026-10-24, 0.0 on 2026-10-17, 0.0 on 2026-10-10. Peak in this pull is 100.0 on 2026-05-09. Next highest points are 94.0 on 2026-04-11, 86.0 on 2026-05-16, and 80.0 on 2026-05-23. Tip 6.0 is not that May 2026 high. 3M printed 6.0 versus 31.0 (-80.65%), the drop after that spring peak. The payload printed growth 999999 on 14D, 30D, and YTD because those baselines were 0.0. Report 6.0 versus 0.0.

elm language closed at 6.0, up 20.0% from 5.0. Same 7D close and same 7D sign as elm programming. 14D was 6.0 versus 8.0 (-25.0%) while programming 14D printed versus 0.0. Matching 7D closes are not matching series. Do not copy programming 6.0 onto language 14D -25.0%.

elm compiler printed 0.0 versus 0.0 on every window, with data_quality low. elm-lang printed the same zeros, also data_quality low. Those tokens are not package-download volume. There is no Elm package-registry source on this API.

Bare elm closed at 31.0, down 11.43% from 35.0, with estimated volume 202,000 versus 228,000. 14D, 30D, 3M, and 12M were 31.0 versus 34.0 (-8.82%). YTD was 31.0 versus 31.0 (0.0%) at volume 202,000. That three-character string mixes the tree and other uses of the word. Do not treat Search 31.0 as Elm language adoption.

Neighbor languages on the same pull, same source, same 7D window, same 2026-11-07 tip:

Keyword 7D recent 7D baseline 7D growth 12M recent 12M baseline 12M growth
elm programming 6.0 5.0 +20.0% 6.0 27.0 -77.78%
elm language 6.0 5.0 +20.0% 6.0 31.0 -80.65%
haskell programming 30.0 25.0 +20.0% 30.0 64.0 -53.12%
ocaml programming 27.0 21.0 +28.57% 27.0 68.0 -60.29%
rescript 18.0 18.0 0.0% 18.0 36.0 -50.0%
gleam programming 11.0 9.0 +22.22% 11.0 0.0 vs 0.0
reasonml 9.0 6.0 +50.0% 9.0 47.0 -80.85%
typescript programming 8.0 8.0 0.0% 8.0 24.0 -66.67%
purescript programming 0.0 0.0 0.0% 0.0 0.0 0.0%
fsharp programming 0.0 0.0 0.0% 0.0 0.0 0.0%

elm programming 6.0 sat 24 points below haskell programming 30.0 and 21 points below ocaml programming 27.0. It sat 5 points below gleam programming 11.0. 7D growth for elm programming and haskell programming both printed +20.0% at different closes. Do not copy haskell 30.0 onto elm programming 6.0. Do not copy matching 7D growth rates onto matching levels. purescript programming and fsharp programming printed zeros with data_quality low. Store the zeros. High-volume php in this session tipped on 2026-11-07 at 25.0 versus 38.0 with estimated volume 556,000. That is the same Saturday tip as the language keywords, not the older 2026-10-24 tip that still held php at 100.0 in the prior session. Store the session pull and the exact recent_date per keyword. A Haskell Trends API helper stores the functional-language neighbor on the same 7D window. A Gleam Trends API helper stores gleam programming.

What did YouTube, News, and Wikipedia return?

YouTube for elm programming printed zeros on every growth window. Keyword Google News for both Elm phrases printed zeros. Wikipedia titles resolve on their own. Compare Wikipedia on volume.

YouTube for elm programming tipped 0.0 on 2026-11-07 versus 0.0, matching get_time_series 0.0, while Search sat at 6.0. The payload marked data_quality low. Store the zeros. YouTube 0.0 is not Search 6.0. Peak in the YouTube series is 100.0 on 2024-02-24, a week when Search printed 0.0. On 2026-05-09 Search printed 100.0 while YouTube printed 0.0. Do not treat the YouTube floor as language adoption while Search sits at 6.0 after a 100.0 close in May 2026.

YouTube for elm language closed at 5.0 versus 0.0 on every window, also data_quality low. Report 5.0 versus 0.0. Language YouTube 5.0 is not programming YouTube 0.0. Do not copy language YouTube 5.0 onto programming Search 6.0.

Bare elm YouTube closed at 72.0, down 28.0% from 100.0. 14D was 72.0 versus 79.0 (-8.86%). 30D was 72.0 versus 82.0 (-12.2%). 3M was 72.0 versus 54.0 (+33.33%). 12M was 72.0 versus 75.0 (-4.0%). YTD was 72.0 versus 48.0 (+50.0%). That is not the phrase series. Do not copy bare YouTube 72.0 onto programming YouTube 0.0.

Keyword Google News for elm programming returned 502 source_unavailable on the first two calls, then printed 0.0 versus 0.0 on every window, also data_quality low. Store the 502 and the zeros. Keyword Google News for elm language printed 0.0 versus 0.0 on every window, also data_quality low. Do not fill News from Search 6.0. Keyword News and the Google News Top News board are different feeds. Mode docs sit at https://trendsapi.ai/docs.

Wikipedia for parenthetical title Elm (programming language) resolved. October 2026 scored 12.2 with 2,498 pageviews versus September 0.0 with 2,071 (volume +20.62%). 30D score printed versus 0.0 (growth 999999) while volume was 2,498 versus 2,071. Report the volume. 3M was 12.2 / 2,498 versus July 17.3 / 2,674 (volume -6.58%). 12M was 12.2 / 2,498 versus October 2025 23.2 / 2,880 (volume -13.26%). YTD was 12.2 / 2,498 versus December 2025 21.8 / 2,832 (volume -11.79%). 7D and 14D collapsed (collapsed_range: recent and baseline resolved to the same monthly point). Peak in this pull is 100.0 / 5,559 in October 2023, then 98.9 / 5,520 in February 2023. Short title Elm resolved to a different page. October scored 39.4 with 16,990 pageviews versus September 43.4 with 17,883 (volume -4.99%). That short-title page is about 6.8 times the language-title volume. Do not join 16,990 views onto Search 6.0. Do not treat short-title Elm at 16,990 views as the language page. The language title is the finding. That is the opposite of Haxe, where the short title was the high-volume language page, and the same direction as Vala, where the language title was the page to store. Wikipedia source docs sit at https://trendsapi.ai/trends/wikipedia-trends.

There is no Elm package-registry source on this API. npm covers npmjs. python covers PyPI. An Elm watchlist that wants package downloads has no third source to join onto Search 6.0.

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

get_top_trends has no keyword. Pair the live Google Trends board with get_growth on the exact board string. Live rank, 1-day rank_change, and 7-day rank_change are three feeds. The rank snapshot can stamp at the same second as the mover snapshot, or days earlier than Wikipedia Trending.

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

{"mode":"get_top_trends","type":"Google Trends","limit":25}

On 2026-11-04T07:01:36Z the live Google Trends board ranked xavier becerra at 11, up 165 places from 176 on the 1-day mover list. Wikipedia Trending, YouTube Trending, and Google News Top News stamped 2026-11-09T09:01:35Z, five days later. Weekly Search for xavier becerra scored 13.0 versus 8.0 on the 2026-10-31 tip. Daily Search printed 100 on 2026-11-04. YouTube scored 100.0 versus 13.0 on the 2026-11-07 tip. The helper that stores those rows is the blog in this batch: Xavier Becerra live rank versus weekly Search. Do not copy that daily 100 onto elm programming 6.0. Board-shape notes for Google Trends live feeds sit at https://trendsapi.ai/trends/google-trends.

Free tier is 100 successful 200s per month. Only 200 responses count against quota. Five language tokens plus one live board is 6 calls. A Monday run that also pulls YouTube and Wikipedia for the programming phrase is 8 calls. Four weeks is 32 calls and still fits the free cap. Starter is 5,000, Pro 25,000, Business 100,000.

Envelope checklist

  1. POST https://api.trendsapi.ai/api with Authorization: Bearer <api_key>.
  2. Parse the transport JSON, then parse the body string a second time.
  3. Store elm, elm programming, elm language, elm compiler, and elm-lang as separate series.
  4. Compare Wikipedia Elm (programming language) on volume at 2,498 October views, not short-title Elm at 16,990.
  5. Pair get_top_trends rank with both rank_change windows and get_growth on the exact board string. Store each keyword's recent_date.