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. cJSON parses the envelope, then parses the body string a second time. Pulled on 2026-10-10, Google Search for c programming scored 41.0 for the week of 2026-10-03, down 35.94% from 64.0. c language scored 31.0, down 46.55% from 58.0. YouTube for c programming scored 100.0, up 13.64% from 88.0, a new YouTube series high. Do not copy 100.0 onto Search 41.0. Do not treat gcc Search 42.0 as the language token. The same helper that stores those rows also pulls a live Google Trends board; a rank-12 token that weekly Search printed at 26.0 versus 1.0 is documented in Hurricane Rachel 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 programming","percent_growth":["7D","30D","3M","12M"]}
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <curl/curl.h>
#include <cJSON.h>
struct mem { char *ptr; size_t len; };
static size_t write_cb(char *data, size_t size, size_t nmemb, void *userdata) {
size_t n = size * nmemb;
struct mem *m = userdata;
char *p = realloc(m->ptr, m->len + n + 1);
if (!p) return 0;
m->ptr = p;
memcpy(m->ptr + m->len, data, n);
m->len += n;
m->ptr[m->len] = 0;
return n;
}
int main(void) {
const char *key = getenv("TRENDSAPI_API_KEY");
const char *payload =
"{\"mode\":\"get_growth\",\"source\":\"google search\","
"\"keyword\":\"c programming\","
"\"percent_growth\":[\"7D\",\"30D\",\"3M\",\"12M\"]}";
struct mem chunk = {0};
CURL *curl = curl_easy_init();
struct curl_slist *headers = NULL;
char auth[256];
snprintf(auth, sizeof auth, "Authorization: Bearer %s", key);
headers = curl_slist_append(headers, auth);
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);
cJSON *envelope = cJSON_Parse(chunk.ptr);
cJSON *body = cJSON_GetObjectItemCaseSensitive(envelope, "body");
/* body is a JSON string; parse it a second time */
cJSON *inner = cJSON_Parse(body->valuestring);
printf("%s\n", cJSON_Print(cJSON_GetObjectItemCaseSensitive(inner, "results")));
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/DaveGamble/cJSON
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 Rust sibling of this helper is on Rust Trends API. A Go sibling is on Go Trends API.
What did get_growth return for C language tokens?
get_growth for c programming on google search tips on 2026-10-03. Store the exact strings. The programming phrase, the language phrase, the GCC token, the Clang token, and the libcurl token are different series.
| Keyword | Period | Recent date | Recent | Baseline date | Baseline | Growth |
|---|---|---|---|---|---|---|
| c programming | 7D | 2026-10-03 | 41.0 | 2026-09-26 | 64.0 | -35.94% |
| c programming | 14D | 2026-10-03 | 41.0 | 2026-09-19 | 58.0 | -29.31% |
| c programming | 30D | 2026-10-03 | 41.0 | 2026-09-05 | 52.0 | -21.15% |
| c programming | 3M | 2026-10-03 | 41.0 | 2026-07-04 | 55.0 | -25.45% |
| c programming | 12M | 2026-10-03 | 41.0 | 2025-10-04 | 54.0 | -24.07% |
| c programming | YTD | 2026-10-03 | 41.0 | 2026-01-03 | 44.0 | -6.82% |
| c language | 7D | 2026-10-03 | 31.0 | 2026-09-26 | 58.0 | -46.55% |
| c language | 14D | 2026-10-03 | 31.0 | 2026-09-19 | 50.0 | -38.0% |
| c language | 30D | 2026-10-03 | 31.0 | 2026-09-05 | 53.0 | -41.51% |
| c language | 3M | 2026-10-03 | 31.0 | 2026-07-04 | 70.0 | -55.71% |
| c language | 12M | 2026-10-03 | 31.0 | 2025-10-04 | 43.0 | -27.91% |
| c language | YTD | 2026-10-03 | 31.0 | 2026-01-03 | 29.0 | +6.9% |
| gcc | 7D | 2026-10-03 | 42.0 | 2026-09-26 | 60.0 | -30.0% |
| gcc | 3M | 2026-10-03 | 42.0 | 2026-07-04 | 74.0 | -43.24% |
| gcc | 12M | 2026-10-03 | 42.0 | 2025-10-04 | 65.0 | -35.38% |
| gcc | YTD | 2026-10-03 | 42.0 | 2026-01-03 | 40.0 | +5.0% |
| clang | 7D | 2026-10-03 | 17.0 | 2026-09-26 | 32.0 | -46.88% |
| clang | 3M | 2026-10-03 | 17.0 | 2026-07-04 | 42.0 | -59.52% |
| clang | 12M | 2026-10-03 | 17.0 | 2025-10-04 | 31.0 | -45.16% |
| clang | YTD | 2026-10-03 | 17.0 | 2026-01-03 | 19.0 | -10.53% |
| libcurl | 7D | 2026-10-03 | 6.0 | 2026-09-26 | 15.0 | -60.0% |
| libcurl | 3M | 2026-10-03 | 6.0 | 2026-07-04 | 32.0 | -81.25% |
| libcurl | 12M | 2026-10-03 | 6.0 | 2025-10-04 | 16.0 | -62.5% |
| libcurl | YTD | 2026-10-03 | 6.0 | 2026-01-03 | 6.0 | 0.0% |
| cmake | 7D | 2026-10-03 | 18.0 | 2026-09-26 | 37.0 | -51.35% |
| cmake | 12M | 2026-10-03 | 18.0 | 2025-10-04 | 40.0 | -55.0% |
| cmake | YTD | 2026-10-03 | 18.0 | 2026-01-03 | 25.0 | -28.0% |
get_time_series for c programming on Google Search closed at 41 on 2026-10-03, matching get_growth 41.0. Adjacent weeks: 64 on 2026-09-26, 58 on 2026-09-19, 57 on 2026-09-12, 52 on 2026-09-05. Peak in this pull is 100 on 2022-09-17, with 99 on 2022-02-26, 99 on 2022-11-19, and 98 on 2022-09-24. Tip 41 is not a new series high. It is not 100. 12M printed -24.07% versus 54.0. YTD printed -6.82% versus 44.0. 7D printed -35.94% versus 64.0. A job that alerts "C is down" off a one-week -35.94% while YouTube prints a new high of 100 is reading a Search tip, not the language.
c language closed at 31, matching growth 31.0, down 46.55% from 58.0. Adjacent weeks: 58 on 2026-09-26, 50 on 2026-09-19, 46 on 2026-09-12, 53 on 2026-09-05. Peak in this pull is 100 on 2026-06-06, with 90 on 2026-05-16, 89 on 2026-05-30, and 89 on 2026-06-20. Tip 31 is not a new series high. YTD printed +6.9% versus 29.0 while 7D printed -46.55%. Do not copy 31.0 onto c programming 41.0. 7D signs agree (both down). YTD signs diverge: programming phrase -6.82% versus language phrase +6.9%.
gcc closed at 42.0, down 30.0% from 60.0. 3M was 42.0 versus 74.0 (-43.24%). 12M was 42.0 versus 65.0 (-35.38%). YTD was 42.0 versus 40.0 (+5.0%). Close 42.0 is next to c programming 41.0. Do not join those two closes. clang closed at 17.0, down 46.88% from 32.0. 3M was 17.0 versus 42.0 (-59.52%). 12M was 17.0 versus 31.0 (-45.16%). YTD was 17.0 versus 19.0 (-10.53%). libcurl closed at 6.0, down 60.0% from 15.0. 3M was 6.0 versus 32.0 (-81.25%). 12M was 6.0 versus 16.0 (-62.5%). YTD was 6.0 versus 6.0 (0.0%). cmake closed at 18.0, down 51.35% from 37.0. 12M was 18.0 versus 40.0 (-55.0%). YTD was 18.0 versus 25.0 (-28.0%). There is no Conan source and no vcpkg source. A job that alerts "C is down" off CMake 7D is reading the build-tool series.
Neighbors this session: c++ Search 77.0, down 20.62% from 97.0, 12M 77.0 versus 79.0 (-2.53%), YTD 77.0 versus 68.0 (+13.24%). c++ programming Search 76.0, down 22.45% from 98.0, 12M 76.0 versus 82.0 (-7.32%), YTD 76.0 versus 70.0 (+8.57%). Do not copy 77.0 onto 41.0. rust Search 62.0, down 19.48% from 77.0, 12M 62.0 versus 67.0 (-7.46%), YTD 62.0 versus 70.0 (-11.43%). rust programming Search 17.0, down 45.16% from 31.0, 12M 17.0 versus 37.0 (-54.05%), YTD 17.0 versus 30.0 (-43.33%). rust is also a game series. Do not copy 62.0 onto 17.0. go programming Search 20.0, down 62.96% from 54.0, 12M 20.0 versus 53.0 (-62.26%), YTD 20.0 versus 33.0 (-39.39%). zig Search 65.0, down 4.41% from 68.0, 12M 65.0 versus 66.0 (-1.52%), YTD 65.0 versus 68.0 (-4.41%). zig is also a given-name series. A Zig client that does the same double parse is on Zig Trends API. A Groovy HttpClient sibling is on Groovy Trends API.
How do YouTube, News, and Wikipedia disagree with Search?
YouTube get_growth for c programming closed at 100.0 versus 88.0 (+13.64%). get_time_series closed at 100, matching growth. Adjacent weeks: 88 on 2026-09-26, 69 on 2026-09-19, 72 on 2026-09-12, 68 on 2026-09-05. Peak in this pull is 100 on 2026-10-03, with 98 on 2024-09-28, 97 on 2023-08-26, and 95 on 2023-10-07. Tip 100 is a new YouTube series high. Search at 41 is not a new Search high. 12M YouTube was 100.0 versus 65.0 (+53.85%). YTD YouTube was 100.0 versus 52.0 (+92.31%). 3M YouTube was 100.0 versus 51.0 (+96.08%). 7D signs diverge: YouTube +13.64% versus Search -35.94%. Do not fill YouTube from Search 41.0.
Google News get_growth closed at 0.0 versus 0.0 on every window. data_quality was low. Keyword News 0.0 does not lead Search 41.0 and does not track YouTube 100.0. 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 programming resolved to C programming. 7D and 14D returned collapsed_range. September 2026 scored 0.4 with 46 pageviews versus August 3.1 with 53 pageviews (score -87.1%, volume -13.21%). 3M was 0.4 / 46 versus June 5.3 / 59, volume -22.03%. 12M was 0.4 / 46 versus September 2025 55.0 / 189, volume -75.66%. YTD volume was 46 versus 57 (-19.3%). Forty-six September views is not the high-traffic language article. C (programming language) on source wikipedia scored 3.9 with 130,039 pageviews versus August 8.6 with 145,555 pageviews (score -54.65%, volume -10.66%). 3M volume was 130,039 versus 136,247 (-4.56%). 12M volume was 130,039 versus 240,196 (-45.86%). YTD volume was 130,039 versus 117,160 (+10.99%). YTD score printed 999999 versus 0.0. Report the volumes. Wikipedia 12M volume on the language article falling 45.86% while Search 12M for c programming is -24.07%. Compare Wikipedia on volume. Do not join 46 pageviews onto Search 41.0. Do not join 130,039 pageviews onto Search 41.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);
cJSON *board_envelope = cJSON_Parse(chunk.ptr);
cJSON *board_body = cJSON_GetObjectItemCaseSensitive(board_envelope, "body");
cJSON *board_inner = cJSON_Parse(board_body->valuestring);
printf("%s\n", cJSON_Print(cJSON_GetObjectItemCaseSensitive(board_inner, "data")));
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-10T10:01:46Z the live Google Trends board ranked hurricane rachel at 12. Weekly Search for that string closed at 26.0 versus 1.0, a new Search series high. A helper that only stores 7D Search for c programming at 41.0 misses that board. Mode docs live at Docs.
What belongs in a C watchlist?
Store c programming, c language, gcc, clang, and libcurl as separate Search series. Add YouTube c programming because 7D already disagrees in sign with Search (+13.64% versus -35.94%) and because the YouTube tip is a new series high of 100. Add Wikipedia volume for the resolved C (programming language) title, not the 46-view C programming title and not the 0-100 score. Skip a Conan column: that source does not exist. Do not store cmake 18.0 as C language adoption. Do not store rust 62.0 as language adoption without rust programming 17.0. 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.