nao-30 / gtrends-php-sdk
A professional PHP SDK for the Google Trends CLI API
Installs: 2
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 0
Forks: 0
Open Issues: 3
pkg:composer/nao-30/gtrends-php-sdk
Requires
- php: ^8.0|^8.1|^8.2|^8.3
- ext-json: *
- guzzlehttp/guzzle: ^7.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.0
- laravel/framework: 10.*
- orchestra/testbench: ^6.0|^7.0|^8.0|^9.0|^10.0
- phpstan/phpstan: ^2.1
- phpunit/phpunit: ^9.0|^10.0|^11.0
- squizlabs/php_codesniffer: ^3.13
- dev-master
- v0.0.5
- v0.0.4
- v0.0.3
- v0.0.2
- v0.0.1
- dev-dependabot/github_actions/actions/checkout-6
- dev-dependabot/composer/squizlabs/php_codesniffer-tw-3.13or-tw-4.0
- dev-dependabot/github_actions/actions/dependency-review-action-4
- dev-fix/ci-failures-and-phpstan
- dev-develop
- dev-feature/maintenance-planning
- dev-feature/distribution-preparation
- dev-feature/testing-infrastructure
- dev-feature/api-endpoints
- dev-feature/configuration-management
- dev-feature/exception-hierarchy
This package is auto-updated.
Last update: 2025-12-31 09:40:50 UTC
README
A professional-grade PHP SDK for the Google Trends CLI API. This SDK provides a simple, intuitive interface to interact with the Google Trends API, allowing developers to access trending searches, related topics and queries, comparison data, and more.
Features
- Seamless integration with Laravel applications
- Compatible with standalone PHP projects
- Support for all Google Trends API endpoints
- Comprehensive error handling
- Extensive documentation and examples
Requirements
- PHP 8.0 or higher
- JSON extension
- cURL extension
- Composer
Installation
composer require gtrends/gtrends-php-sdk
Quick Start
Standalone PHP
<?php require 'vendor/autoload.php'; $client = new Gtrends\Sdk\Client([ 'base_uri' => 'https://trends-api-url.com', 'timeout' => 30 ]); // Get trending searches $trending = $client->getTrending('US');
Laravel Integration
Add the service provider to your config/app.php file:
'providers' => [ // Other service providers... Gtrends\Sdk\Laravel\GtrendsServiceProvider::class, ],
Publish the configuration:
php artisan vendor:publish --provider="Gtrends\Sdk\Laravel\GtrendsServiceProvider"
Use the facade in your code:
use Gtrends\Sdk\Laravel\Facades\Gtrends; // Get trending searches $trending = Gtrends::getTrending('US');
Documentation
For full documentation, examples, and API reference, please see the docs directory.
License
This package is open-sourced software licensed under the MIT license.