PHPackages                             gallica-lupus/laravel-newsapi - 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. [Framework](/categories/framework)
4. /
5. gallica-lupus/laravel-newsapi

ActiveProject[Framework](/categories/framework)

gallica-lupus/laravel-newsapi
=============================

Laravel wrapper for https://newsapi.org/

1.0(3y ago)012MITPHPPHP &gt;=7.0.0

Since Jan 8Pushed 3y agoCompare

[ Source](https://github.com/gallica-lupus/laravel-newsapi)[ Packagist](https://packagist.org/packages/gallica-lupus/laravel-newsapi)[ RSS](/packages/gallica-lupus-laravel-newsapi/feed)WikiDiscussions master Synced 1mo ago

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

Laravel Package for NewsAPI.org
===============================

[](#laravel-package-for-newsapiorg)

Laravel wrapper for [NewsAPI.org](https://newsapi.org) API calls. Documentation for the API can be found [here](https://newsapi.org/docs)

Installation
------------

[](#installation)

**1-** Require the package via Composer in your `composer.json`.

```
{
  "require": {
    "gallica-lupus/laravel-newsapi": "^1.0"
  }
}
```

**2-** Run Composer to install or update the new requirement.

```
$ composer install
```

or

```
$ composer update
```

**3-** Add the service provider to your `app/config/app.php` file

```
NewsAPI\NewsAPIServiceProvider::class,
```

**4-** Add the facade to your `app/config/app.php` file

```
'NewsAPI' => NewsAPI\Facades\NewsAPI::class,
```

**5-** Publish the configuration file

```
$ php artisan vendor:publish --provider="NewsAPI\NewsAPIServiceProvider"
```

**6-** Review the configuration file and add your key (preferably through env: `'api_key' => env('NEWSAPI_KEY')` )

```
config/newsapi.php

```

Usage
-----

[](#usage)

Refer to the official [docs](https://newsapi.org/docs) as to which calls can be made and check the calls in traits under [NewsAPI\\Requests](NewsAPI%5CRequests).

For example, get all sources (if using facade):

```
use NewsAPI;

...

$response = NewsAPI::sources()->all();

```

The above returns an object containing a `sources` array.

Get a top headlines by country and category:

```

$response = NewsAPI::topHeadlines()->get([
            'country' => 'gb',
            'category'=>'sports'
        ]);

```

Get all news from bbc.co.uk in English for time period from 2018-05-01 to 2018-05-04 sorted by publication date:

```
        $response = NewsAPI::everything()->get([
            'language' => 'en',
            'domains'=>'bbc.co.uk',
            'from' => '2018-05-01',
            'to' => ''2018-05-04,
            'sortBy' => 'publishedAt',
        ]);

```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 50% of commits — single point of failure

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

1220d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0fe854b586e8af7837ab077c0edc87f105ba0f3a1c266452c6fc7218dba2b545?d=identicon)[gallica-lupus](/maintainers/gallica-lupus)

---

Top Contributors

[![avinet-ops](https://avatars.githubusercontent.com/u/122171461?v=4)](https://github.com/avinet-ops "avinet-ops (2 commits)")[![gallica-lupus](https://avatars.githubusercontent.com/u/122171461?v=4)](https://github.com/gallica-lupus "gallica-lupus (2 commits)")

---

Tags

apiframeworklaravel news

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/gallica-lupus-laravel-newsapi/health.svg)

```
[![Health](https://phpackages.com/badges/gallica-lupus-laravel-newsapi/health.svg)](https://phpackages.com/packages/gallica-lupus-laravel-newsapi)
```

###  Alternatives

[nutgram/nutgram

The Telegram bot library that doesn't drive you nuts

714214.9k8](/packages/nutgram-nutgram)[lanin/laravel-api-debugger

Easily debug your JSON API.

2311.8M](/packages/lanin-laravel-api-debugger)[evias/nem-php

Composer Package for PHP (Laravel or Pure PHP), Wrapper to use the NEM blockchain REST API and SDK with NIS compatibility.

332.9k](/packages/evias-nem-php)

PHPackages © 2026

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