PHPackages                             masnathan/domain-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. masnathan/domain-api-client

ActiveLibrary

masnathan/domain-api-client
===========================

This is an easy way to check domain details.

010PHP

Since Sep 30Pushed 4y ago1 watchersCompare

[ Source](https://github.com/MASNathan/domain-api-client)[ Packagist](https://packagist.org/packages/masnathan/domain-api-client)[ RSS](/packages/masnathan-domain-api-client/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Domain Checker
==============

[](#domain-checker)

[![Latest Version on Packagist](https://camo.githubusercontent.com/45c998602d329bc8f9623af948c34e4fb1cd349ef393400b6b4857aed08dce79/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d61736e617468616e2f646f6d61696e2d6170692d636c69656e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/masnathan/domain-api-client)[![GitHub Tests Action Status](https://camo.githubusercontent.com/7bf70c85090772813813116b9fcb3e21189c4f808a304e5d741e2f2a35db130d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f6d61736e617468616e2f646f6d61696e2d6170692d636c69656e742f72756e2d74657374733f6c6162656c3d7465737473)](https://github.com/masnathan/domain-api-client/actions?query=workflow%3ATests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/47e5170f53cee53e65630d5398e414a56231b094fda17b5b77d4a5a7e200f6f0/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f6d61736e617468616e2f646f6d61696e2d6170692d636c69656e742f436865636b253230262532306669782532307374796c696e673f6c6162656c3d636f64652532307374796c65)](https://github.com/masnathan/domain-api-client/actions?query=workflow%3A%22Check+%26+fix+styling%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/8172ea669c6b4bcaca129fe401aea33d2f42b3bfd3acb734f9a6597d021b5a11/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d61736e617468616e2f646f6d61696e2d6170692d636c69656e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/masnathan/domain-api-client)

This is an easy way to check if a domain is valid, if it’s available for purchase, it's age or it's DNS settings

Request your API key [here](https://rapidapi.com/MASNathan/api/domain-checker7/)

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

[](#installation)

You can install the package via composer:

```
composer require masnathan/domain-api-client
```

Usage
-----

[](#usage)

### Whois

[](#whois)

```
use MASNathan\DomainAPI\Domain;

$domainClient = new Domain('domain-checker7.p.rapidapi.com', 'super-secret-api-key');

$details = $domainClient->whois('github.com');

var_dump($details);
// array:10 [
//   "domain" => "github.com"
//   "sld" => "github"
//   "tld" => "com"
//   "valid" => true
//   "available" => false
//   "created_at" => "2007-10-09 18:20:50"
//   "updated_at" => "2020-09-08 09:18:27"
//   "expires_at" => "2022-10-09 18:20:50"
//   "registrar" => "MarkMonitor, Inc."
//   "whois" => "whois.markmonitor.com"
// ]

// you can also use the batch method to request up to 100 domains

$details = $domainClient->whoisBatch(['github.com', 'rapidapi.com', 'google.com']);
```

### DNS

[](#dns)

```
use MASNathan\DomainAPI\Domain;

$domainClient = new Domain('domain-checker7.p.rapidapi.com', 'super-secret-api-key');

$details = $domainClient->dns('github.com');

var_dump($details);
// array:8 [
//   "domain" => "github.com"
//   "valid" => true
//   "A" => array:1 [
//     0 => "140.82.121.4"
//   ]
//   "AAAA" => []
//   "CNAME" => array:1 [...]
//   "NS" => array:8 [...]
//   "MX" => array:5 [...]
//   "TXT" => array:8 [...]
// ]

// you can also use the batch method to request up to 100 domains

$details = $domainClient->dnsBatch(['github.com', 'rapidapi.com', 'google.com']);
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [André Filipe](https://github.com/masnathan)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

16

—

LowBetter than 5% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity28

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2139464?v=4)[André Filipe](/maintainers/MASNathan)[@MASNathan](https://github.com/MASNathan)

---

Top Contributors

[![MASNathan](https://avatars.githubusercontent.com/u/2139464?v=4)](https://github.com/MASNathan "MASNathan (2 commits)")

### Embed Badge

![Health badge](/badges/masnathan-domain-api-client/health.svg)

```
[![Health](https://phpackages.com/badges/masnathan-domain-api-client/health.svg)](https://phpackages.com/packages/masnathan-domain-api-client)
```

PHPackages © 2026

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