A PureScript 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 PureScript library. Affjax sends the request. Argonaut reads JSON. The first decode reads the envelope, then a second decode reads the body string. Pulled on 2026-11-17, Google Search for purescript scored 4.0 for the week of 2026-11-14, versus 3.0, up 33.33%. purescript programming scored 0.0 versus 0.0 on a 2026-11-07 tip. purescript language scored 0.0 versus 0.0. YouTube for purescript scored 0.0 versus 0.0. Do not copy purescript 4.0 onto a PureScript adoption alert that only watches the phrase token at 0.0. Neighbors in the same session still sat on 2026-11-07, so do not join php 25.0 onto purescript 4.0 as the same week.

How does a PureScript client POST get_growth?

The documented HTTP helpers live in Affjax. AN.request sends the payload. lookupEnv reads the key. jsonParser turns the inner body string into JSON.

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

{"mode":"get_growth","source":"google search","keyword":"purescript","percent_growth":["7D","30D","3M","12M"]}
module Main where

import Prelude

import Affjax as AX
import Affjax.Node as AN
import Affjax.RequestBody as RequestBody
import Affjax.RequestHeader (RequestHeader(..))
import Affjax.ResponseFormat as ResponseFormat
import Data.Argonaut.Core (stringify)
import Data.Argonaut.Parser (jsonParser)
import Data.Either (Either(..))
import Data.HTTP.Method (Method(..))
import Data.Maybe (Maybe(..))
import Effect (Effect)
import Effect.Aff (launchAff_)
import Effect.Class.Console as Console
import Node.Process (lookupEnv)

main :: Effect Unit
main = launchAff_ do
  mKey <- lookupEnv "TRENDSAPI_API_KEY"
  case mKey of
    Nothing -> Console.log "missing TRENDSAPI_API_KEY"
    Just apiKey -> do
      let payload =
            """{"mode":"get_growth","source":"google search","keyword":"purescript","percent_growth":["7D","30D","3M","12M"]}"""
      result <- AN.request $ AN.defaultRequest
        { url = "https://api.trendsapi.ai/api"
        , method = Left POST
        , headers =
            [ RequestHeader "Authorization" ("Bearer " <> apiKey)
            , RequestHeader "Content-Type" "application/json"
            ]
        , content = Just (RequestBody.string payload)
        , responseFormat = ResponseFormat.string
        }
      case result of
        Left err -> Console.log (AX.printError err)
        Right resp -> case jsonParser resp.body of
          Left parseErr -> Console.log parseErr
          Right envelopeJson -> Console.log (stringify envelopeJson)

Package names and docs belong next to the code, not in prose as live links:

https://pursuit.purescript.org/packages/purescript-affjax
https://pursuit.purescript.org/packages/purescript-argonaut-core
https://github.com/purescript/purescript
https://www.purescript.org

Every successful response is {"statusCode": int, "body": string}. Affjax ResponseFormat.string is the transport read. resp.body is still a JSON string that contains another JSON string in body. jsonParser on that inner string is the second parse. Skipping it leaves recent_value unreachable. Docs for the envelope sit at https://trendsapi.ai/docs. Google Search series docs sit at https://trendsapi.ai/trends/google-trends.

What did purescript Search print against the phrase tokens?

purescript Search closed at 4.0 versus 3.0 on the 2026-11-14 tip, matching the series close of 4.0. Adjacent weeks were 3.0, then 20.0, then 0.0, then 0.0. 14D was 4.0 versus 20.0, down 80.0%. 30D compared 4.0 versus 0.0 and printed growth 999999.0 because the 2026-10-17 baseline was a zero floor. 3M was 4.0 versus 14.0, down 71.43%. 12M was 4.0 versus 14.0, down 71.43%. YTD compared 4.0 versus 0.0 and printed growth 999999.0. Peak was 100.0 on 2026-10-03, then 80.0 on 2026-06-06, 40.0 on 2022-04-09, 37.0 on 2026-05-09, and 37.0 on 2026-04-04. Tip 4.0 is not a new high. A helper that only stores 7D then reports 4.0 and misses the October 100.0.

purescript programming Search closed at 0.0 versus 0.0 on the 2026-11-07 tip, data_quality low. 14D, 30D, 3M, 12M, and YTD compared 0.0 versus 0.0. The phrase token sat on a different Saturday than the one-word series. Opposite weeks are not matching series. A helper that only stores purescript programming then reports a flat zero and misses Search 4.0.

purescript language Search closed at 0.0 versus 0.0 on the 2026-11-14 tip, data_quality low. Every listed window compared 0.0 versus 0.0. purescript compiler Search also closed at 0.0 versus 0.0 on 2026-11-14, data_quality low, every listed window flat at 0.0. Phrase 0.0 is not the one-word series at 4.0. Compiler 0.0 is not language 0.0 just because both printed zero this week.

Neighbors in the same session still sat on 2026-11-07: haskell programming 30.0 versus 25.0, up 20.0%; gleam programming 11.0 versus 9.0, up 22.22%; zig programming 15.0 versus 17.0, down 11.76%; elm programming 6.0 versus 5.0, up 20.0%; hare programming 8.0 versus 7.0, up 14.29%; php 25.0 versus 38.0, volume 556000. Two Saturday tips in one run. Do not join php 25.0 or haskell 30.0 onto purescript 4.0 as the same week. An Elm client that stores the neighbor rows is at https://trendsapi.ai/elm-trends-api.

Keyword Close Versus Window Tip
purescript 4.0 3.0, +33.33% 7D 2026-11-14
purescript 4.0 20.0, -80.0% 14D 2026-11-14
purescript 4.0 0.0, 999999.0 30D 2026-11-14
purescript peak 100.0 not the tip weekly series 2026-10-03
purescript programming 0.0 0.0 7D 2026-11-07
purescript language 0.0 0.0 7D 2026-11-14
purescript compiler 0.0 0.0 7D 2026-11-14
haskell programming 30.0 25.0, +20.0% 7D 2026-11-07
php 25.0 38.0, vol 556000 7D 2026-11-07

What did YouTube, News, and Wikipedia print?

YouTube for purescript scored 0.0 versus 0.0 on 2026-11-14, data_quality low. Every listed window compared 0.0 versus 0.0. The series is not empty across five years. Peak was 100.0 on 2023-07-22, then 95.0 on 2024-03-23, 88.0 on 2025-02-08, 56.0 on 2022-03-26, and 53.0 on 2022-04-02. Tip 0.0 is not a new high. A helper that only stores 7D YouTube then reports 0.0 and misses the 2023 peak of 100.0. YouTube for purescript programming also scored 0.0 versus 0.0 on 2026-11-14, every listed window flat. Do not copy Search 4.0 onto a YouTube adoption alert.

Google News for purescript returned 502 source_unavailable on the first try, then scored 0.0 versus 0.0 on retry, data_quality low. Every listed window compared 0.0 versus 0.0. Store the miss and the retry. Absence of News coverage is a finding.

Wikipedia title PureScript printed October 6.8 / 856 views versus September 0.0 / 766 (volume +11.75%). 7D and 14D returned collapsed_range. 3M was 6.8 / 856 versus July 6.1 / 847 (volume +1.06%). 12M was 6.8 / 856 versus October 2025 35.5 / 1237 (volume -30.8%). YTD was 6.8 / 856 versus December 2025 36.5 / 1250 (volume -31.52%). Peak was 100.0 / 2093 in December 2021, then 99.0 / 2080 in November 2022, 96.1 / 2041 in October 2022, 92.2 / 1989 in January 2022. October is not a new high. November is not in the monthly series yet. September printed score 0.0 with 766 views. Score 0.0 is not volume 0.

Neighbor Wikipedia titles in the same session: Elm (programming language) October 12.2 / 2498 versus September 0.0 / 2071 (volume +20.62%); Haskell (programming language) 60.0 / 11456 versus 62.6 / 11932 (volume -3.99%); Gleam (programming language) 48.1 / 3005 versus 52.4 / 3127 (volume -3.9%). Bare PureScript at 856 October views is the language page. Language title resolved, unlike a Roc language title that 404d in a prior session. There is no Pursuit download-count source to join onto those 856 views.

How many requests does a weekly PureScript watchlist use?

Free tier is 100 successful 200s per month. Starter is 5,000. Pro is 25,000. Business is 100,000. Only 200s count. A watchlist that stores purescript, purescript programming, purescript language, purescript compiler, YouTube purescript, Wikipedia PureScript, and one Google Trends board is 7 calls. Four runs in a 30-day month is 28 calls and fits the free cap. Adding haskell, gleam, zig, elm, hare, and php as neighbors is 6 more Search calls, 52 calls per month, still under Starter.

get_top_trends bills 1 request per 10 rows. limit 25 costs 3. Pair the live board with get_growth. A live-rank helper that skipped weekly Search would have missed outlook outage at rank 2 with weekly Search 100.0 on 2026-11-14. That outage walk-through is at https://trendsapi.ai/blog/outlook-outage-live-rank-vs-weekly-search.

Do not join YouTube 0.0 onto Search 4.0 as matching series. Do not join Wikipedia 856 October views onto Search 4.0 as the same week. Do not join php 25.0 onto purescript 4.0 as the same Saturday. Store recent_date per keyword. Store the 502 on News, then the 0.0 retry. There is no Pursuit source, so a helper that waits for package downloads never starts.