PHPackages                             magdy-hakam/laravel5-genderize-api-client - 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. magdy-hakam/laravel5-genderize-api-client

ActiveLibrary[API Development](/categories/api)

magdy-hakam/laravel5-genderize-api-client
=========================================

Laravel client for the genderize.io API

2.0(3y ago)113MITPHPPHP ^7.1||^8.0

Since Apr 3Pushed 3y agoCompare

[ Source](https://github.com/magdyHakam/laravel5-genderize-api-client)[ Packagist](https://packagist.org/packages/magdy-hakam/laravel5-genderize-api-client)[ Docs](https://github.com/magdyHakam/laravel5-genderize-api-client)[ RSS](/packages/magdy-hakam-laravel5-genderize-api-client/feed)WikiDiscussions master Synced 1mo ago

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

Laravel 5 Genderize.io API Client
=================================

[](#laravel-5-genderizeio-api-client)

[![Latest Version on Packagist](https://camo.githubusercontent.com/1a1032a166d2a75731c147dbce3b8fa608681479ecff0e069595173cd5f6280b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f706978656c70657465722f6c61726176656c352d67656e646572697a652d6170692d636c69656e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/pixelpeter/laravel5-genderize-api-client)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Travis Build](https://camo.githubusercontent.com/16a5e6dcdad498004d57e7b2dba75fcc1fb7eb47a8b45cbd8f208f7fb494beec/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f706978656c70657465722f6c61726176656c352d67656e646572697a652d6170692d636c69656e742f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/pixelpeter/laravel5-genderize-api-client)[![Scrutinizer Quality](https://camo.githubusercontent.com/62b2ecb005f0bd133de833cbd7e0c38d289f86b786179c5b346fd0e46da6b97e/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f706978656c70657465722f6c61726176656c352d67656e646572697a652d6170692d636c69656e742e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/pixelpeter/laravel5-genderize-api-client)[![Scrutinizer Build](https://camo.githubusercontent.com/d369ab54eb643b223745c163a5e204657486f44a1a4bb7477a259b1152b30539/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f6275696c642f672f706978656c70657465722f6c61726176656c352d67656e646572697a652d6170692d636c69656e742e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/pixelpeter/laravel5-genderize-api-client)[![SensioLabsInsight](https://camo.githubusercontent.com/8ca543ac4534fe7104b50a0b656ab52cc9f5f294887e021e212739af2af1b109/68747470733a2f2f696d672e736869656c64732e696f2f73656e73696f6c6162732f692f33323937643539382d623836382d343062302d386265612d6530396165613161313063302e7376673f7374796c653d666c61742d737175617265)](https://insight.sensiolabs.com/projects/3297d598-b868-40b0-8bea-e09aea1a10c0)[![Total Downloads](https://camo.githubusercontent.com/cab9c45daf7040f530e36b32b9156dffc6fc87a2cad317294670130ef2f3e3d4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f706978656c70657465722f6c61726176656c352d67656e646572697a652d6170692d636c69656e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/pixelpeter/laravel5-genderize-api-client)[![Coverage Status](https://camo.githubusercontent.com/0a0950f43560724d35aca8eede8fac58e1d6f5711644190e350d3ac6ce3fdaf8/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f706978656c70657465722f6c61726176656c352d67656e646572697a652d6170692d636c69656e742f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/pixelpeter/laravel5-genderize-api-client?branch=master)

A simple Laravel 5 client for the [Genderize.io API](https://genderize.io/). It provides a fluent interface for easy request building.

Version overview
----------------

[](#version-overview)

Laravelphpuse branch5.87.1, 7.2, 7.3w.i.p.5.77.1, 7.2, 7.32.0.x5.67.1, 7.2, 7.32.0.x5.57.0, 7.1, 7.21.1.x/2.0.xInstallation
------------

[](#installation)

### Step 1: Install Through Composer

[](#step-1-install-through-composer)

```
composer require pixelpeter/laravel5-genderize-api-client
```

### Step 2: Add the Service Provider (not needed with v2.x because of auto discovery)

[](#step-2-add-the-service-provider-not-needed-with-v2x-because-of-auto-discovery)

Add the service provider in `app/config/app.php`

```
'provider' => [
    ...
    Pixelpeter\Genderize\GenderizeServiceProvider::class,
    ...
];
```

### Step 3: Add the Facade

[](#step-3-add-the-facade)

Add the alias in `app/config/app.php`

```
'aliases' => [
    ...
    'Genderize' => Pixelpeter\Genderize\Facades\Genderize::class,
    ...
];
```

### Step 4: Publish the configuration file

[](#step-4-publish-the-configuration-file)

This is only needed when you have an API key from Genderize.io

```
php artisan vendor:publish --provider="Pixelpeter\Genderize\GenderizeServiceProvider"
```

Examples
--------

[](#examples)

### Send requests

[](#send-requests)

#### Single name

[](#single-name)

```
use Genderize;

Genderize::name('Peter')->get();
```

#### Multiple names (max. 10)

[](#multiple-names-max-10)

```
use Genderize;

Genderize::name(['John', 'Jane'])->get();

// or for better readability you can use the plural
Genderize::names(['John', 'Jane'])->get();
```

#### Add language and country options

[](#add-language-and-country-options)

```
use Genderize;

Genderize::name('John')->country('US')->lang('EN')->get();
```

### Working with the response

[](#working-with-the-response)

#### For single usage

[](#for-single-usage)

```
use Genderize;

$response = Genderize::name('Peter')->get();

print $response->result->first()->gender; // 'male'
print $response->result->first()->name; // 'Peter'
print $response->result->first()->probability; '0.99'
print $response->result->first()->count; 144
print $response->result->first()->isMale(); true
print $response->result->first()->isFemale(); false
print $response->result->first()->isNotMale(); false
print $response->result->first()->isNotFemale(); true
```

#### For batch usage

[](#for-batch-usage)

```
use Genderize;

$response = Genderize::names(['John', 'Jane'])->country('US')->lang('EN')->get();

foreach($response->result as $row)
{
    print $row->name;
}
```

### Getting information about the request and limits

[](#getting-information-about-the-request-and-limits)

```
use Genderize;

$response = Genderize::name('Peter')->get();

print $response->meta->code; // 200 - HTTP response code
print $response->meta->limit; // 1000 - Max number of allowed requests
print $response->meta->remaining; // 950 - Number of requests left
print $response->meta->reset->diffInSeconds(); // Carbon\Carbon - time left till reset
```

### More documentation

[](#more-documentation)

Refer to [Genderize.io API Documentation](https://store.genderize.io/documentation/) for more examples and documentation.

Testing
-------

[](#testing)

Run the tests with:

```
vendor/bin/phpunit
```

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

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

1136d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/bf0b3de9e26dd318fb454bcc49edcf14b46f9dd8fc3c8c39b450cee4ee09d7f2?d=identicon)[magdyHakam](/maintainers/magdyHakam)

---

Top Contributors

[![pixelpeter](https://avatars.githubusercontent.com/u/6502630?v=4)](https://github.com/pixelpeter "pixelpeter (32 commits)")[![magdyHakam](https://avatars.githubusercontent.com/u/15979831?v=4)](https://github.com/magdyHakam "magdyHakam (4 commits)")[![dependabot-support](https://avatars.githubusercontent.com/u/112581971?v=4)](https://github.com/dependabot-support "dependabot-support (3 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (1 commits)")[![jibar026](https://avatars.githubusercontent.com/u/59713182?v=4)](https://github.com/jibar026 "jibar026 (1 commits)")[![Stroemgren](https://avatars.githubusercontent.com/u/2242472?v=4)](https://github.com/Stroemgren "Stroemgren (1 commits)")

---

Tags

apilaravelvalidationgender

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/magdy-hakam-laravel5-genderize-api-client/health.svg)

```
[![Health](https://phpackages.com/badges/magdy-hakam-laravel5-genderize-api-client/health.svg)](https://phpackages.com/packages/magdy-hakam-laravel5-genderize-api-client)
```

PHPackages © 2026

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