A C++ 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 libcurl plugin. libcurl sends the request. nlohmann/json parses the envelope, then parses the body string a second time. Pulled on 2026-10-11, Google Search for c++ scored 74.0 for the week of 2026-10-10, down 5.13% from 78.0. c++ programming scored 75.0, down 7.41% from 81.0. cpp scored 65.0, down 2.99% from 67.0, with estimated volume 934000. YouTube for c++ scored 67.0, down 4.29% from 70.0. Do not copy 65.0 onto Search 74.0. Do not treat g++ Search 81.0 as the language token. The same helper that stores those rows also pulls a live Google Trends board; a rank-3 token that weekly Search printed at 100.0 versus 30.0 is documented in Flood Watch live rank versus weekly Search.

How does a C++ 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":"c++","percent_growth":["7D","30D","3M","12M"]}
#include <cstdlib>
#include <iostream>
#include <string>
#include <curl/curl.h>
#include <nlohmann/json.hpp>

struct mem { std::string buf; };

static size_t write_cb(char *data, size_t size, size_t nmemb, void *userdata) {
    auto *m = static_cast<mem *>(userdata);
    m->buf.append(data, size * nmemb);
    return size * nmemb;
}

int main() {
    const char *key = std::getenv("TRENDSAPI_API_KEY");
    const char *payload =
        "{\"mode\":\"get_growth\",\"source\":\"google search\","
        "\"keyword\":\"c++\","
        "\"percent_growth\":[\"7D\",\"30D\",\"3M\",\"12M\"]}";
    mem chunk;
    CURL *curl = curl_easy_init();
    struct curl_slist *headers = nullptr;
    std::string auth = std::string("Authorization: Bearer ") + key;
    headers = curl_slist_append(headers, auth.c_str());
    headers = curl_slist_append(headers, "Content-Type: application/json");
    curl_easy_setopt(curl, CURLOPT_URL, "https://api.trendsapi.ai/api");
    curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
    curl_easy_setopt(curl, CURLOPT_POSTFIELDS, payload);
    curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_cb);
    curl_easy_setopt(curl, CURLOPT_WRITEDATA, &chunk);
    curl_easy_perform(curl);
    auto envelope = nlohmann::json::parse(chunk.buf);
    /* body is a JSON string; parse it a second time */
    auto inner = nlohmann::json::parse(envelope["body"].get<std::string>());
    std::cout << inner["results"].dump(2) << "\n";
    return 0;
}

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://curl.se/libcurl/c/curl_easy_setopt.html
https://github.com/nlohmann/json

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 C++-specific source on this API. npm covers npmjs package names. python covers PyPI project names. A watchlist that needs Conan or vcpkg download counts has to pull those from somewhere else. A C sibling of this helper is on C Trends API. A Rust sibling is on Rust Trends API.

What did get_growth return for C++ language tokens?

get_growth for c++ on google search tips on 2026-10-10. Store the exact strings. The plus-plus token, the programming phrase, the cpp abbreviation, the g++ compiler token, and the nlohmann json library token are different series.

Keyword Period Recent date Recent Baseline date Baseline Growth
c++ 7D 2026-10-10 74.0 2026-10-03 78.0 -5.13%
c++ 14D 2026-10-10 74.0 2026-09-26 94.0 -21.28%
c++ 30D 2026-10-10 74.0 2026-09-12 85.0 -12.94%
c++ 3M 2026-10-10 74.0 2026-07-11 78.0 -5.13%
c++ 12M 2026-10-10 74.0 2025-10-11 80.0 -7.5%
c++ YTD 2026-10-10 74.0 2026-01-03 68.0 +8.82%
c++ programming 7D 2026-10-10 75.0 2026-10-03 81.0 -7.41%
c++ programming 14D 2026-10-10 75.0 2026-09-26 99.0 -24.24%
c++ programming 30D 2026-10-10 75.0 2026-09-12 89.0 -15.73%
c++ programming 3M 2026-10-10 75.0 2026-07-11 82.0 -8.54%
c++ programming 12M 2026-10-10 75.0 2025-10-11 79.0 -5.06%
c++ programming YTD 2026-10-10 75.0 2026-01-03 72.0 +4.17%
cpp 7D 2026-10-10 65.0 2026-10-03 67.0 -2.99%
cpp 14D 2026-10-10 65.0 2026-09-26 89.0 -26.97%
cpp 3M 2026-10-10 65.0 2026-07-11 75.0 -13.33%
cpp 12M 2026-10-10 65.0 2025-10-11 82.0 -20.73%
cpp YTD 2026-10-10 65.0 2026-01-03 48.0 +35.42%
g++ 7D 2026-10-10 81.0 2026-10-03 87.0 -6.9%
g++ 12M 2026-10-10 81.0 2025-10-11 84.0 -3.57%
g++ YTD 2026-10-10 81.0 2026-01-03 77.0 +5.19%
cmake 7D 2026-10-10 15.0 2026-10-03 18.0 -16.67%
cmake 12M 2026-10-10 15.0 2025-10-11 45.0 -66.67%
cmake YTD 2026-10-10 15.0 2026-01-03 25.0 -40.0%
nlohmann json 7D 2026-10-10 4.0 2026-10-03 7.0 -42.86%
nlohmann json 12M 2026-10-10 4.0 2025-10-11 9.0 -55.56%
nlohmann json YTD 2026-10-10 4.0 2026-01-03 5.0 -20.0%

get_time_series for c++ on Google Search closed at 74 on 2026-10-10, matching get_growth 74.0. Adjacent weeks: 78 on 2026-10-03, 94 on 2026-09-26, 94 on 2026-09-19, 85 on 2026-09-12. The series has 261 weekly points from 2021-10-16 through 2026-10-10. Peak in this pull is 100 on 2026-04-18, with 96 on 2026-05-09, 94 on 2026-06-06, and 94 on 2026-09-19. Tip 74 is not a new series high. It is not 100. 12M printed -7.5% versus 80.0. YTD printed +8.82% versus 68.0. 7D printed -5.13% versus 78.0. A job that alerts "C++ is down" off a one-week -5.13% while YTD is +8.82% is reading a Search tip, not the language.

c++ programming closed at 75, matching growth 75.0, down 7.41% from 81.0. Adjacent weeks: 81 on 2026-10-03, 99 on 2026-09-26, 99 on 2026-09-19, 89 on 2026-09-12. Peak in this pull is 100 on 2026-02-14 and 100 on 2026-06-06, with 99 on 2026-05-09 and 99 on 2026-09-26. Tip 75 is not a new series high. YTD printed +4.17% versus 72.0 while 7D printed -7.41%. Do not copy 75.0 onto c++ 74.0. 7D signs agree (both down). YTD signs agree (both up). Magnitudes differ: programming phrase 7D -7.41% versus plus-plus token -5.13%, and programming phrase YTD +4.17% versus plus-plus token +8.82%.

cpp closed at 65.0, down 2.99% from 67.0. Estimated recent volume printed 934000 versus 963000 on 7D. 14D was 65.0 versus 89.0 (-26.97%). 3M was 65.0 versus 75.0 (-13.33%). 12M was 65.0 versus 82.0 (-20.73%). YTD was 65.0 versus 48.0 (+35.42%), with estimated volume 934000 versus 690000. cpp volume on this source is derived from the 0-100 score, not an independent count. Do not join cpp 65.0 onto c++ 74.0. YTD signs agree (both up). YTD magnitudes diverge: cpp +35.42% versus c++ +8.82%.

g++ closed at 81.0, down 6.9% from 87.0. 12M was 81.0 versus 84.0 (-3.57%). YTD was 81.0 versus 77.0 (+5.19%). Close 81.0 sits next to c++ 74.0. Do not join those two closes. cmake closed at 15.0, down 16.67% from 18.0. 12M was 15.0 versus 45.0 (-66.67%). YTD was 15.0 versus 25.0 (-40.0%). nlohmann json closed at 4.0, down 42.86% from 7.0. 12M was 4.0 versus 9.0 (-55.56%). YTD was 4.0 versus 5.0 (-20.0%). There is no Conan source and no vcpkg source. A job that alerts "C++ is down" off CMake 7D or nlohmann json 7D is reading the build-tool or library series.

Neighbors this session: c programming Search 42.0 versus 42.0 (0.0% 7D), 12M 42.0 versus 61.0 (-31.15%), YTD 42.0 versus 44.0 (-4.55%). Do not copy 42.0 onto 74.0. rust programming Search 25.0, up 66.67% from 15.0, 12M 25.0 versus 30.0 (-16.67%), YTD 25.0 versus 28.0 (-10.71%). 7D signs diverge: rust programming +66.67% versus c++ -5.13%. go programming Search 16.0, down 23.81% from 21.0, 12M 16.0 versus 49.0 (-67.35%), YTD 16.0 versus 33.0 (-51.52%). A Go client that does the same double parse is on Go Trends API. A Zig sibling is on Zig Trends API.

How do YouTube, News, and Wikipedia disagree with Search?

YouTube get_growth for c++ closed at 67.0 versus 70.0 (-4.29%). get_time_series closed at 67, matching growth. Adjacent weeks: 70 on 2026-10-03, 69 on 2026-09-26, 67 on 2026-09-19, 70 on 2026-09-12. Peak in this pull is 100 on 2024-10-19 and 100 on 2024-10-26, with 95 on 2024-11-02 and 94 on 2024-11-09. Tip 67 is not a new YouTube series high. Search at 74 is not a new Search high. 12M YouTube was 67.0 versus 70.0 (-4.29%). YTD YouTube was 67.0 versus 66.0 (+1.52%). 3M YouTube was 67.0 versus 70.0 (-4.29%). 7D signs agree: YouTube -4.29% versus Search -5.13%. Do not fill YouTube from Search 74.0. YouTube c++ programming closed at 65.0 versus 66.0 (-1.52%). 30D was 65.0 versus 65.0 (0.0%). YTD was 65.0 versus 62.0 (+4.84%). Do not copy YouTube 67.0 onto YouTube programming 65.0.

Google News get_growth for c++ closed at 14.0 versus 7.0 (+100.0%). 12M was 14.0 versus 5.0 (+180.0%). YTD was 14.0 versus 4.0 (+250.0%). Keyword News 14.0 does not lead Search 74.0 and does not track YouTube 67.0. 7D signs diverge: News +100.0% versus Search -5.13%. Keyword News and the Google News Top News board are different feeds. Source docs for Search sit at Google Trends.

Wikipedia get_growth for C++ resolved to that title. 7D and 14D returned collapsed_range. September 2026 scored 12.6 with 13 pageviews versus August 22.3 with 23 pageviews (score -43.5%, volume -43.48%). 3M was 12.6 / 13 versus June 21.4 / 22, volume -40.91%. 12M was 12.6 / 13 versus September 2025 6.8 / 7, volume +85.71%. YTD volume was 13 versus 5 (+160.0%). Thirteen September views is not a high-traffic language article. C++ (programming language) on source wikipedia printed 0.0 score and 0 volume on 2025-12-01 versus 0.0 / 0 on 2025-09-01. 30D returned collapsed_range. 12M and YTD returned date_out_of_range with data ending 2025-12-01. The language title has no 2026 views in this pull. Compare Wikipedia on volume. Do not join 13 pageviews onto Search 74.0. Do not join 0 pageviews onto Search 74.0. Source docs for Wikipedia sit at Wikipedia Trends.

How does a C++ job pull a live board?

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

{"mode":"get_top_trends","type":"Google Trends","limit":25}
const char *board_payload =
    "{\"mode\":\"get_top_trends\",\"type\":\"Google Trends\",\"limit\":25}";
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, board_payload);
curl_easy_perform(curl);
auto board_envelope = nlohmann::json::parse(chunk.buf);
auto board_inner = nlohmann::json::parse(board_envelope["body"].get<std::string>());
std::cout << board_inner["data"].dump(2) << "\n";

get_top_trends takes a feed type, not a keyword. Pair the live snapshot with sort=rank_change on 1d and 7d. On 2026-10-11T10:01:39Z the live Google Trends board ranked flood watch at 3. Weekly Search for that string closed at 100.0 versus 30.0, a new Search series high. A helper that only stores 7D Search for c++ at 74.0 misses that board. Mode docs live at Docs.

What belongs in a C++ watchlist?

Store c++, c++ programming, cpp, g++, and nlohmann json as separate Search series. Add YouTube c++ because the 0-100 close (67.0) is not Search 74.0 even when 7D signs agree. Add Google News c++ because 7D already disagrees in sign with Search (+100.0% versus -5.13%). Add Wikipedia volume for the resolved C++ title (13 September views), not the 0-view C++ (programming language) title and not the 0-100 score. Skip a Conan column: that source does not exist. Do not store cmake 15.0 as C++ language adoption. Do not store cpp 65.0 as the plus-plus token. Five Search keywords plus one YouTube series plus one live Google Trends board is 7 calls. Four weekly runs fit the free 100-request cap. Starter is 5,000, Pro 25,000, Business 100,000. Only successful 200 responses count.