PHPackages                             murat-yuksel/news-api-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. murat-yuksel/news-api-php

ActiveLibrary[API Development](/categories/api)

murat-yuksel/news-api-php
=========================

PHP Client for Google News API

v1.0(7y ago)71111[1 issues](https://github.com/murat-yuksel/news-api-php/issues)MITPHPPHP ^7.0

Since Aug 11Pushed 7y ago1 watchersCompare

[ Source](https://github.com/murat-yuksel/news-api-php)[ Packagist](https://packagist.org/packages/murat-yuksel/news-api-php)[ Docs](https://muratyuksel.net)[ RSS](/packages/murat-yuksel-news-api-php/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

PHP Client for Google News API
==============================

[](#php-client-for-google-news-api)

PHP wrapper for Google News API. For more information:

Install
-------

[](#install)

composer require murat-yuksel/news-api-php

Example
-------

[](#example)

Basic

```
 $client = new \NewsApi\Client();
 $request = new \NewsApi\Request\TopHeadlinesRequest();
 $request->apiKey = getenv('NEWS_API_KEY');
 $request->q = 'turkey';
 $request->category = 'business';

 $result = $client->topHeadlines($request);

```

Another

```
function sources(\NewsApi\Client $client)
{
    $request = new \NewsApi\Request\SourcesRequest();
    $request->apiKey = getenv('NEWS_API_KEY');
    $request->language = 'en';
    $request->category = 'entertainment';

    return $client->sources($request);
}

```

Laravel

```
Route::get('/', function (\NewsApi\Client $client) {
    $request = new \NewsApi\Request\EverythingRequest();
    $request->apiKey = env('NEWS_API_KEY');
    $request->q = 'turkey';
    $sources = $client->everything($request);
    var_dump($sources);
});

```

Endpoints
---------

[](#endpoints)

- /v2/top-headlines
- /v2/everything
- /v2/sources

All request parameters are available via TopHeadlinesRequest, EverythingRequest and SourcesRequest

Tests
-----

[](#tests)

Needs api key provided with env

phpunit tests/ --bootstrap tests/bootstrap.php

Want to contribute?
-------------------

[](#want-to-contribute)

Don't be shy, open for any suggestion, pull request, bug report... Open an issue please

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2879d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/99215088?v=4)[murat-yuksel](/maintainers/murat-yuksel)[@Murat-Yuksel](https://github.com/Murat-Yuksel)

---

Tags

apiclientgooglenewsapiapiclientgoogle news

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/murat-yuksel-news-api-php/health.svg)

```
[![Health](https://phpackages.com/badges/murat-yuksel-news-api-php/health.svg)](https://phpackages.com/packages/murat-yuksel-news-api-php)
```

###  Alternatives

[gemini-api-php/client

API client for Google's Gemini API

224255.2k5](/packages/gemini-api-php-client)[deepseek-php/deepseek-php-client

deepseek PHP client is a robust and community-driven PHP client library for seamless integration with the Deepseek API, offering efficient access to advanced AI and data processing capabilities.

46784.5k5](/packages/deepseek-php-deepseek-php-client)[gemini-api-php/laravel

Gemini API client for Laravel

8916.9k](/packages/gemini-api-php-laravel)[serpwow/google-search-results

Google Search Results PHP package via SerpWow.com

1931.8k1](/packages/serpwow-google-search-results)[skeeks/yii2-google-api

Component for work with google api based on google/apiclient

1143.6k1](/packages/skeeks-yii2-google-api)[smnandre/pagespeed-api

PageSpeed Insight PHP Api Client 🚀 Analyse web pages for performances metrics, core web vitals...

1614.3k](/packages/smnandre-pagespeed-api)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
