A Dart 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 Dart library. dart:io HttpClient sends the request. dart:convert parses the envelope, then parses the body string a second time. Pulled on 2026-09-14, Google Search for dart programming scored 27.0 for the week of 2026-09-12, up 12.5% from 24.0. flutter scored 34.0, down 2.86% from 35.0. dart sdk scored 11.0, down 21.43% from 14.0. Do not treat the Flutter 7D drop as language adoption. The same helper that stores those rows also pulls a live Google Trends board; a rank-3 token that weekly Search already printed at 100.0 is documented in iPhone 18 Pro Max live rank versus weekly Search.

How does a Dart 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":"dart programming","percent_growth":["7D","30D","3M","12M"]}
import 'dart:convert';
import 'dart:io';

Future<Map<String, dynamic>> trendsPost(String payload) async {
  final key = Platform.environment['TRENDSAPI_API_KEY'];
  if (key == null) {
    throw StateError('TRENDSAPI_API_KEY is unset');
  }
  final client = HttpClient();
  final req = await client.postUrl(Uri.parse('https://api.trendsapi.ai/api'));
  req.headers.set(HttpHeaders.authorizationHeader, 'Bearer $key');
  req.headers.contentType = ContentType.json;
  req.write(payload);
  final resp = await req.close();
  if (resp.statusCode != 200) {
    throw StateError('HTTP ${resp.statusCode}');
  }
  final text = await resp.transform(utf8.decoder).join();
  final envelope = jsonDecode(text) as Map<String, dynamic>;
  // body is a JSON string; parse it a second time
  return jsonDecode(envelope['body'] as String) as Map<String, dynamic>;
}

void main() async {
  final inner = await trendsPost(
    '{"mode":"get_growth","source":"google search","keyword":"dart programming","percent_growth":["7D","30D","3M","12M"]}',
  );
  print(inner);
}

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

https://api.dart.dev/stable/dart-io/HttpClient-class.html
https://api.dart.dev/stable/dart-convert/jsonDecode.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 Dart-specific source on this API. npm covers npmjs package names. python covers PyPI project names. A Dart watchlist that needs pub.dev download counts has to pull those from somewhere else.

What did get_growth return for Dart language tokens?

Pulled on 2026-09-14 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 dart is a polluted token (the sport, the language, other homonyms). Store the phrase tokens.

Keyword Period Recent Baseline date Baseline Growth
dart programming 7D 27.0 2026-09-05 24.0 +12.5%
dart programming 14D 27.0 2026-08-29 38.0 -28.95%
dart programming 30D 27.0 2026-08-15 41.0 -34.15%
dart programming 3M 27.0 2026-06-13 66.0 -59.09%
dart programming 12M 27.0 2025-09-13 62.0 -56.45%
dart programming YTD 27.0 2026-01-03 38.0 -28.95%
dart language 7D 24.0 2026-09-05 26.0 -7.69%
dart sdk 7D 11.0 2026-09-05 14.0 -21.43%
flutter 7D 34.0 2026-09-05 35.0 -2.86%
dartlang 7D 6.0 2026-09-05 6.0 0.0%
dart 7D 29.0 2026-09-05 28.0 +3.57%
typescript 7D 26.0 2026-09-05 30.0 -13.33%
javascript 7D 25.0 2026-09-05 30.0 -16.67%
kotlin 7D 33.0 2026-09-05 34.0 -2.94%

dart programming and flutter closed at opposite 7D directions. The phrase token rose 12.5%. Flutter fell 2.86% to 34.0. dart language fell 7.69% to 24.0. dart sdk scored 11.0, down 21.43% from 14.0. dartlang sat at 6.0, flat versus 6.0. Bare dart scored 29.0. That is not the language series. A job that alerts "Dart is down" off Flutter 7D is reading the UI toolkit series. Store each string.

3M is a summer drop on Flutter and the SDK, milder on the 7D bounce of the phrase token. dart programming is 27.0 versus 66.0 on 2026-06-13 (-59.09%). dart language is 24.0 versus 84.0 (-71.43%). dart sdk is 11.0 versus 38.0 (-71.05%). flutter is 34.0 versus 99.0 (-65.66%). typescript is 26.0 versus 89.0 (-70.79%). javascript is 25.0 versus 71.0 (-64.79%). kotlin is 33.0 versus 92.0 (-64.13%). Do not alert language adoption off a Flutter or SDK 3M crash. YouTube for the same tokens is a different shape (next section).

get_time_series for dart programming on Google Search closed at 27 on 2026-09-12, matching get_growth 27.0. Adjacent weeks: 24 on 2026-09-05, 38 on 2026-08-29, 38 on 2026-08-22, 41 on 2026-08-15, 39 on 2026-08-08. The series hit 100 on 2026-06-06, with 87 on 2026-05-16 and 86 on 2026-05-30. The 2026-01-03 close was 38. The 2025-09-13 close was 62. The 7D bounce from 24 to 27 sits after that June peak, not at a new high.

get_time_series for flutter closed at 34 on 2026-09-12, matching get_growth 34.0. Adjacent weeks: 35 on 2026-09-05, 39 on 2026-08-29, 43 on 2026-08-22, 44 on 2026-08-15, 50 on 2026-08-08. Peak 100 on 2026-05-16, with 99 on 2026-05-30, 99 on 2026-06-13, and 99 on 2026-06-20. 12M was 34.0 versus 69.0 on 2025-09-13 (-50.72%). Tip 34 is the floor after that May peak. Flutter 7D -2.86% is one more week on that floor, not language adoption.

dartlang is a sparse series in this pull. Tip 6.0 versus 6.0 on 7D. 14D was 6.0 versus 0.0 on 2026-08-29, which printed growth 999999. Report 6.0 versus 0.0. Do not store 999999. get_time_series closed at 6 on 2026-09-12, matching get_growth. Adjacent weeks: 6 on 2026-09-05, then 0 on 2026-08-29 through 2026-08-15. Peak in this pull is 100 on 2022-09-17. Concatenated domain tokens are not the language token.

Bare dart YTD was 29.0 versus 100.0 on 2026-01-03 (-71.0%). The New Year peak is the sport series. Phrase token YTD was 27.0 versus 38.0 (-28.95%). Do not copy 100.0 onto dart programming.

The Kotlin OkHttp sibling of this helper is Kotlin Trends API. The Swift sibling is Swift Trends API.

What did YouTube, News, and Wikipedia return?

YouTube for dart programming tipped 29.0 on 2026-09-12, up 3.57% from 28.0 on 2026-09-05, the same 7D direction as Search +12.5%. 14D was 29.0 versus 32.0 (-9.38%). 30D was 29.0 versus 40.0 (-27.5%). 3M was 29.0 versus 28.0 (+3.57%) while Search 3M was -59.09%. 12M was 29.0 versus 39.0 (-25.64%). YTD was 29.0 versus 32.0 (-9.38%). get_time_series closed at 29 on 2026-09-12, matching get_growth. Adjacent weeks: 28 on 2026-09-05, 32 on 2026-08-29, 35 on 2026-08-22, 40 on 2026-08-15. Peak in this pull is 100 on 2024-01-27, with 83 on 2024-01-20. The week of 2026-05-23 printed 0 while Search that week was 75. Tip 29 is not that 2024 peak. Do not copy YouTube zeros onto Search 27.0.

YouTube for flutter moved harder than Search on 7D. It tipped 34.0, down 15.0% from 40.0, while Search fell 2.86%. 14D was 34.0 versus 39.0 (-12.82%). 30D was 34.0 versus 35.0 (-2.86%). 3M was 34.0 versus 36.0 (-5.56%) while Search 3M was -65.66%. 12M was 34.0 versus 43.0 (-20.93%). YTD was 34.0 versus 37.0 (-8.11%). get_time_series closed at 34, matching get_growth. Adjacent weeks: 40 on 2026-09-05, 39 on 2026-08-29, 39 on 2026-08-22. Peak 100 on 2023-02-04 and again on 2024-02-24. Flutter YouTube 34.0 is not Flutter Search 34.0 even when the scores match. A Search summer crash is not a YouTube crash of the same size.

Keyword Google News for dart 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 for flutter is a live series. It tipped 21.0, down 71.62% from 74.0 on 2026-09-05. 14D was 21.0 versus 100.0 on 2026-08-29 (-79.0%). 30D was 21.0 versus 69.0 (-69.57%). 3M was 21.0 versus 21.0 (flat). 12M and YTD baselined at 0.0 and printed growth 999999. Report 21.0 versus 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 27.0.

Wikipedia resolved two titles. Keyword Dart (programming language) resolved with August score 0.0 and 6,718 views versus July 0.4 / 6,790 (score -100.0%, volume -1.06%). 3M volume was 6,718 versus 7,625 (-11.9%) while the score went 0.0 versus 5.0 (-100.0%). 12M volume was 6,718 versus 9,477 on 2025-08-01 (-29.11%) while the score went 0.0 versus 15.3 (-100.0%). YTD volume was 6,718 versus 8,906 (-24.57%). 7D and 14D collapsed to the same monthly point. Report both score and volume.

Keyword Dart is a different page. August score 2.1 with 848 views versus July 2.4 / 877 (score -12.5%, volume -3.31%). 3M volume was 848 versus 1,039 (-18.38%). 12M volume was 848 versus 1,040 (-18.46%). YTD volume was 848 versus 1,300 (-34.77%). The language page has more August views than the short title (6,718 versus 848). Keyword Flutter (software) resolved with August score 0.0 and 10,207 views versus July 1.1 / 10,534 (score -100.0%, volume -3.1%). 3M volume was 10,207 versus 11,794 (-13.46%). 12M volume was 10,207 versus 14,118 (-27.7%). Compare Wikipedia on volume. Do not join either page onto Search 27.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-14T10:01:37Z ranked iphone duo 1, labor day 2, and iphone 18 pro max 3. The 1-day rank_change sort (20 rows, baseline 2026-09-13T02:01:38Z) omitted iphone 18 pro max. The 7-day sort returned 8 rows and also omitted that token. Weekly Search for the same phrase was 100.0, up 316.67% from 24.0. Live rank and both mover lists can miss a token that weekly Search already printed at 100. The walk-through is iPhone 18 Pro Max live rank versus weekly Search.

A Dart watchlist that stores six Search tokens (dart programming, dart language, dart sdk, flutter, typescript, kotlin) 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 Scala sibling of this helper is Scala Trends API. The Python sibling is Python 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. dart, dart programming, dart language, dartlang, dart sdk, and flutter are six 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 Dart library is required. A 40-line HttpClient helper covers growth, series, and board pulls for jobs that already run under systemd or a cron timer.