PHPackages                             faicchia/laravel-nationalize - 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. faicchia/laravel-nationalize

ActiveLibrary[API Development](/categories/api)

faicchia/laravel-nationalize
============================

A service wrapper around nationalize.io

1.0.0(3y ago)0161MITPHPPHP ^8.0

Since Jul 20Pushed 3y ago1 watchersCompare

[ Source](https://github.com/faicchia/laravel-nationalize)[ Packagist](https://packagist.org/packages/faicchia/laravel-nationalize)[ RSS](/packages/faicchia-laravel-nationalize/feed)WikiDiscussions main Synced 1mo ago

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

Laravel Nationalize
===================

[](#laravel-nationalize)

[![Packagist](https://camo.githubusercontent.com/a2b924f0565328c845200e17fa7988fc8b7f433cd816a663de5539031c39e084/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f66616963636869612f6c61726176656c2d6e6174696f6e616c697a65)](https://packagist.org/packages/faicchia/laravel-nationalize/)[![Tests](https://github.com/faicchia/laravel-nationalize/actions/workflows/run-tests.yaml/badge.svg)](https://github.com/faicchia/laravel-nationalize/actions/workflows/run-tests.yaml)[![Style](https://github.com/faicchia/laravel-nationalize/actions/workflows/php-cs-fixer.yaml/badge.svg)](https://github.com/faicchia/laravel-nationalize/actions/workflows/php-cs-fixer.yaml)[![License](https://camo.githubusercontent.com/fdf2982b9f5d7489dcf44570e714e3a15fce6253e0cc6b5aa61a075aac2ff71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667)](https://github.com/faicchia/laravel-nationalize/blob/main/LICENSE.md)

A service wrapper around [nationalize.io](https://nationalize.io/)

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

[](#installation)

```
composer require faicchia/laravel-nationalize
```

The package will automatically register itself.

### Configuration

[](#configuration)

If you wish to edit the package configuration, you can run the following command to publish it into your `config/` folder:

```
php artisan vendor:publish --provider="Faicchia\Nationalize\NationalizeServiceProvider"
```

### Environment

[](#environment)

If you purchased an API Key, add the following line to your `.env` file

```
NATIONALIZE_API_KEY=...
```

Usage
-----

[](#usage)

### Single name

[](#single-name)

```
$response = Nationalize::name('Michael')->get()

print $response->status // 200 - HTTP response code

print $response->limit // 1000 - The amount of names available in the current time window

print $response->remaining // 728 - The number of names left in the current time window

print $response->reset // 15281 - Seconds remaining until a new time window opens

print $response->error // null - Error string

print $response->result->name // Michael

print $response->result->countries
//  [
//    "US" => 0.08986482266532715,
//    "AU" => 0.05976757527083082,
//    "NZ" => 0.04666974820852911
//  ]
```

### Multiple names

[](#multiple-names)

```
$response = Nationalize::name(['Michael', 'Kevin'])->get()
// or
$response = Nationalize::names(['Michael', 'Kevin'])->get()

foreach ($response->result as $prediction) {
    print $prediction->name
    print $prediction->countries
}
```

### Error

[](#error)

```
// e.g. Invalid API Key
$response = Nationalize::name('Michael')->get()

print $response->status // 401
print $response->error // "Invalid API key"
```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

1392d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/43ad45bd4380cf68e1353a9552a0e18d8e791d72af74a56ff05bfbf6c17158ec?d=identicon)[faicchia](/maintainers/faicchia)

---

Top Contributors

[![faicchia](https://avatars.githubusercontent.com/u/88747015?v=4)](https://github.com/faicchia "faicchia (6 commits)")

---

Tags

laravelnationalizenationalize-apiphp

###  Code Quality

TestsPest

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/faicchia-laravel-nationalize/health.svg)

```
[![Health](https://phpackages.com/badges/faicchia-laravel-nationalize/health.svg)](https://phpackages.com/packages/faicchia-laravel-nationalize)
```

###  Alternatives

[skagarwal/google-places-api

Google Places Api

1913.0M8](/packages/skagarwal-google-places-api)[dcblogdev/laravel-microsoft-graph

A Laravel Microsoft Graph API (Office365) package

168285.5k1](/packages/dcblogdev-laravel-microsoft-graph)[vluzrmos/slack-api

Wrapper for Slack.com WEB API.

102589.1k3](/packages/vluzrmos-slack-api)[smodav/mpesa

M-Pesa API implementation

16363.7k1](/packages/smodav-mpesa)[jasara/php-amzn-selling-partner-api

A fluent interface for Amazon's Selling Partner API in PHP

1344.8k1](/packages/jasara-php-amzn-selling-partner-api)[grantholle/powerschool-api

A Laravel package to make interacting with PowerSchool less painful.

1715.6k1](/packages/grantholle-powerschool-api)

PHPackages © 2026

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