A PHP Trends API client is a Bearer-authenticated POST to https://api.trendsapi.ai/api, then a second json_decode of the body string. On 2026-09-07, Google Search for php scored 36.0 for the Saturday-dated week of 2026-09-05, up 5.88% from 34.0 on 2026-08-29, with estimated volume 471,000. The framework token laravel scored 21.0, down 74.7% from 83.0 on 2026-06-06. The version token php 8 scored 25.0, flat on 7D after crashing from 77.0 on 2026-08-22. YouTube for php sat at 15.0. Google News for php sat at 23.0 after a 100.0 print on 2026-08-22. Wikipedia resolved php as title Php with score 98.8 and 6,571 August views, while Laravel scored 1.3 with 5,059 views. Those strings are not one language series. Store them as separate rows.

How does a PHP client call Trends API?

The HTTP shape is one POST. Mode, source, and keyword sit in the JSON body. Auth is Authorization: Bearer. ext-curl is enough. json_decode decodes the envelope. The first decode yields statusCode and a body string. The second decode yields results.

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

{"mode":"get_growth","source":"google search","keyword":"php","percent_growth":["7D","30D","3M","12M"]}
<?php
function trends_post(string $jsonBody): array {
    $key = getenv("TRENDSAPI_API_KEY");
    if ($key === false || $key === "") {
        throw new RuntimeException("missing TRENDSAPI_API_KEY");
    }
    $ch = curl_init("https://api.trendsapi.ai/api");
    curl_setopt_array($ch, [
        CURLOPT_POST => true,
        CURLOPT_HTTPHEADER => [
            "Authorization: Bearer " . $key,
            "Content-Type: application/json",
        ],
        CURLOPT_POSTFIELDS => $jsonBody,
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_CONNECTTIMEOUT => 10,
        CURLOPT_TIMEOUT => 60,
    ]);
    $raw = curl_exec($ch);
    if ($raw === false) {
        throw new RuntimeException(curl_error($ch));
    }
    $http = curl_getinfo($ch, CURLINFO_HTTP_CODE);
    curl_close($ch);
    if ($http !== 200) {
        throw new RuntimeException("HTTP " . $http);
    }
    $envelope = json_decode($raw, true, 512, JSON_THROW_ON_ERROR);
    // body is a JSON string; parse it a second time
    return json_decode($envelope["body"], true, 512, JSON_THROW_ON_ERROR);
}

The first mistake most clients make is treating $envelope["body"] as an array after one decode. It is still a JSON string. Decode the envelope, then decode body a second time. Stdlib pages:

https://www.php.net/curl
https://www.php.net/json-decode

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.

What did get_growth return for PHP language tokens?

Pulled on 2026-09-07 with source set to google search. get_growth tips on 2026-09-05. The prior Saturday 2026-08-29 is the last full week in the same series.

Keyword Period Recent Baseline date Baseline Growth
php 7D 36.0 2026-08-29 34.0 +5.88%
php 14D 36.0 2026-08-22 36.0 0.0%
php 30D 36.0 2026-08-08 37.0 -2.7%
php 3M 36.0 2026-06-06 49.0 -26.53%
php 12M 36.0 2025-09-06 42.0 -14.29%
php YTD 36.0 2026-01-03 33.0 +9.09%
laravel 7D 21.0 2026-08-29 20.0 +5.0%
laravel 14D 21.0 2026-08-22 29.0 -27.59%
laravel 30D 21.0 2026-08-08 40.0 -47.5%
laravel 3M 21.0 2026-06-06 83.0 -74.7%
laravel 12M 21.0 2025-09-06 52.0 -59.62%
laravel YTD 21.0 2026-01-03 27.0 -22.22%
php 8 7D 25.0 2026-08-29 25.0 0.0%
php 8 14D 25.0 2026-08-22 77.0 -67.53%
php 8 30D 25.0 2026-08-08 58.0 -56.9%
php 8 3M 25.0 2026-06-06 95.0 -73.68%
php 8 12M 25.0 2025-09-06 34.0 -26.47%
php 8 YTD 25.0 2026-01-03 16.0 +56.25%
wordpress 7D 48.0 2026-08-29 37.0 +29.73%
wordpress 30D 48.0 2026-08-08 53.0 -9.43%
wordpress 3M 48.0 2026-06-06 74.0 -35.14%
wordpress 12M 48.0 2025-09-06 62.0 -22.58%
python 7D 40.0 2026-08-29 35.0 +14.29%
python 3M 40.0 2026-06-06 96.0 -58.33%
javascript 7D 29.0 2026-08-29 19.0 +52.63%
javascript 3M 29.0 2026-06-06 68.0 -57.35%

php Search estimated volume on the 2026-09-05 tip is 471,000 versus 445,000 on 2026-08-29. The time series printed 36 with volume 471,429 on the same week. Store 471,000 as the get_growth recent_volume and 471,429 as the dated series close. Do not collapse them. laravel, php 8, wordpress, python, and javascript growth rows in this pull did not include a volume field. Do not join 471,000 onto a laravel score of 21.0.

A 3M alert on php fires at -26.53%. The same window on laravel fires at -74.7% versus 83.0, and on php 8 at -73.68% versus 95.0. wordpress 7D is up 29.73% from 37.0 while laravel 14D is down 27.59% from 29.0. python 3M is -58.33% versus 96.0. javascript 3M is -57.35% versus 68.0. Those are six Search series, not aliases. Keep the keywords split. Do not alert language adoption off a framework 3M crash.

get_time_series for php on Google Search puts the 36.0 tip in a 261-point weekly pull. The series hits 100 on 2022-02-12 with volume 1,309,524. The 2026 high in that pull is 55 on 2026-06-27 (volume 720,238). Later 2026 weeks: 44 on 2026-07-04, 37 on 2026-08-08, 34 on 2026-08-29, then 36 on 2026-09-05. The 2026-09-05 week is not a new high. It is a late-summer print under a 2022 peak.

php 8 time series peaks at 100 on 2026-05-30, then 95 on 2026-06-06, 80 on 2026-08-15, 77 on 2026-08-22, then 25 on 2026-08-29 and 25 on 2026-09-05. Language php sat at 36 through that version crash. laravel time series peaks at 100 on 2022-02-19. The 2026 high is 87 on 2026-05-16, then 83 on 2026-06-06, 40 on 2026-08-08, 20 on 2026-08-29, 21 on 2026-09-05.

Source field notes for Search sit on Google Trends. The Go sibling of this client is Go Trends API.

What did YouTube, News, and Wikipedia return for php?

Same pull day. YouTube and Google News use weekly tips on 2026-09-05. Wikipedia is monthly. 7D and 14D on Wikipedia were not requested; 30D is the August point.

Source Keyword resolved Period Score Volume Baseline score Growth
youtube php 7D 15.0 18.0 -16.67%
youtube php 14D 15.0 17.0 -11.76%
youtube php 30D 15.0 14.0 +7.14%
youtube php 3M 15.0 16.0 -6.25%
youtube php 12M 15.0 20.0 -25.0%
youtube php YTD 15.0 13.0 +15.38%
google news php 7D 23.0 22.0 +4.55%
google news php 14D 23.0 100.0 -77.0%
google news php 30D 23.0 17.0 +35.29%
google news php 3M 23.0 27.0 -14.81%
google news php 12M 23.0 0.0 999999
google news php YTD 23.0 0.0 999999
wikipedia Php 30D 98.8 6571 100.0 -1.2%
wikipedia Php 3M 98.8 6571 51.0 +93.73%
wikipedia Php 12M 98.8 6571 4.3 +2197.67%
wikipedia Laravel 30D 1.3 5059 0.6 +116.67%
wikipedia Laravel 3M 1.3 5059 3.1 -58.06%
wikipedia Laravel 12M 1.3 5059 7.7 -83.12%

YouTube for php is 15.0, down 6.25% over 3M, while Search is down 26.53% over the same window. The YouTube series peaks at 100 on 2023-02-11. 2026 weeks sit between 13 and 21. Do not alert language adoption off the Search 3M print while YouTube is barely off 16.0.

Google News for php is 23.0 on 2026-09-05 versus 100.0 on 2026-08-22. The 12M and YTD News windows baselined at 0.0 and returned growth 999999. Print 23.0 vs 0.0. Do not store 999999. The News time series in this pull is mostly 0-2 through early 2026. Non-zero 2026 weeks include 41 on 2026-05-30, 71 on 2026-08-15, 100 on 2026-08-22, 22 on 2026-08-29, 23 on 2026-09-05. Coverage spiked the same week php 8 Search was at 77.0, then both dropped. Language Search stayed at 36.0.

Wikipedia keyword php resolved as title Php with 6,571 views and score 98.8 for 2026-08-01 versus 6,641 views and 100.0 in July (volume -1.05%). Keyword Laravel resolved as Laravel with 5,059 views and score 1.3 versus 4,905 views and 0.6 in July (volume +3.14%). Keyword PHP (programming language) resolved as Php (programming language) with 5 views and score 27.8. That is a stub. Compare Wikipedia rows on recent_volume, not on the 0-100 score. Do not join 6,571 or 5,059 pageviews onto a Search score of 36.0. Wikipedia pageview fields are on Wikipedia Trends.

How should a PHP job poll a live board?

get_top_trends takes a feed type, not a keyword. Pair the board with get_growth on the tokens that matter. On 2026-09-07T10:01:42Z, Google Trends rank 1 was what does a mistrial mean. Rank 3 was labor day. Rank 9 was chatgpt. None of php, laravel, or php 8 appear in that top 25. The walkthrough that stores a live-board holiday token against last week's Search and sales closes is Labor Day Search vs sales.

$board = trends_post(json_encode([
    "mode" => "get_top_trends",
    "type" => "Google Trends",
    "limit" => 25,
]));
$growth = trends_post(json_encode([
    "mode" => "get_growth",
    "source" => "google search",
    "keyword" => "php",
    "percent_growth" => ["7D", "30D", "12M"],
]));
$score = $growth["results"][0]["recent_value"];

Dense rank lists in this pull start at rank 1 in data[0]. Read the rank field when sort is rank_change. Do not assume array offset equals rank after a mover sort. The 1d mover sort on 2026-09-07T10:01:42Z, baseline 2026-09-06T02:01:39Z, returned 11 rows. labor day at live rank 3 was not in that 1d list. what is labor day was, at rank 14 versus previous rank 24, rank_change +10. The 7d mover sort returned only 2 rows against baseline 2026-08-31T02:01:37Z.

A weekly PHP job of five Search keywords plus one board is 6 calls. Twenty-four calls per 30-day month fits the 100-request free tier. Daily polling of that set is about 180 calls and needs Starter.

Response 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. php, laravel, and php 8 are three series. Wikipedia titles are resolved names; confirm the title before joining volumes.
  5. Quota counts successful 200 responses: free 100/month, then 5,000 / 25,000 / 100,000 on paid tiers.

The Python sibling of this helper is Python Trends API. The C# sibling is C# Trends API. No SDK is required. A 40-line cURL helper covers growth, series, and board pulls for jobs that already run on cron.