PHPackages                             theprivateer/domainr - 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. theprivateer/domainr

ActiveLibrary[API Development](/categories/api)

theprivateer/domainr
====================

A PHP wrapper for the Domainr API.

v0.1.3(8y ago)1521MITPHPPHP &gt;=5.5.9

Since Jul 26Pushed 8y agoCompare

[ Source](https://github.com/theprivateer/domainr)[ Packagist](https://packagist.org/packages/theprivateer/domainr)[ Docs](https://github.com/theprivateer/domainr)[ RSS](/packages/theprivateer-domainr/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (3)Dependencies (1)Versions (5)Used By (1)

Domainr
=======

[](#domainr)

A PHP wrapper for the [Domainr](https://domainr.com/) API.

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

[](#installation)

The package can be installed using Composer:

```
composer require theprivateer/domainr
```

Usage
-----

[](#usage)

For detailed documentation please visit the [Domainr API on Mashape](https://market.mashape.com/domainr/domainr) or Domainr API on [Domainr.build](https://domainr.build/v2.0/docs). You will need to [subscribe to the Domainr API](https://market.mashape.com/domainr/domainr/pricing) to get a Mashape API key - there is currently a free plan that allows for 10,000 requests per month, however you will need to enter credit card details to cover any overage.

```
// autoload
include 'path/to/autoload.php'

$client = new \Privateer\Domainr\Domainr('YOUR_MASHAPE_API_KEY');
```

### Search

[](#search)

```
$client->search($query, $location = null, $registrar = null, $defaults = null);
```

The search method allows you to search for domains by keyword, and receive multiple alternatives back from Domainr.

```
$client->search('acme.coffee');
```

JSON data will be returned:

```
[
   {
      "domain":"acme.coffee",
      "host":"",
      "subdomain":"acme.",
      "zone":"coffee",
      "path":"",
      "registerURL":"https:\/\/api.domainr.com\/v2\/register?client_id=mashape-salimgrsy&domain=acme.coffee&registrar=&source="
   },
   {
      "domain":"acme.cafe",
      "host":"",
      "subdomain":"acme.",
      "zone":"cafe",
      "path":"",
      "registerURL":"https:\/\/api.domainr.com\/v2\/register?client_id=mashape-salimgrsy&domain=acme.cafe&registrar=&source="
   },
   {
      "domain":"acme.com.tr",
      "host":"",
      "subdomain":"acme.",
      "zone":"com.tr",
      "path":"",
      "registerURL":"https:\/\/api.domainr.com\/v2\/register?client_id=mashape-salimgrsy&domain=acme.com.tr&registrar=&source="
   }
]
```

### Register

[](#register)

```
$client->register($domain, $registrar = null);
```

This method returns a string, the value of which is the URL to the domain's registrar:

```
$client->register('acme.coffee');

// https://domains.google.com/registrar?s=acme.coffee&utm_campaign=domainr.com&utm_content=&af=domainr.com
```

### Status

[](#status)

```
$client->status($domain);
```

The status method allows you to check domain availability:

```
$status = $client->status('acme.coffee');
```

This will return an instance of `\Privateer\Domainr\Status`. The values of the underlying JSON response will be accessible via the `get()` method on the `Status` object:

```
$status = $client->status('acme.coffee');

$status->get('domain');
// acme.coffee

$status->get('zone');
// coffee

$status->get('status');
// undelegated inactive

$status->get('summary');
// inactive
```

The `Status` object has a number of utility helpers to further explain the response.

```
$status->get('description');
// Available for new registration.

$status->get('available');
// true
```

These dynamic properties are derived from the [status descriptions](https://domainr.build/docs/status#section-domain-status) in the Domainr API documentation\].

The `Status` object also static method to access these values:

```
Status::description($summary);
```

```
\Privateer\Domainr\Status::description('inactive');
// Available for new registration.

\Privateer\Domainr\Status::available('inactive');
// true
```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity51

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

Every ~0 days

Total

4

Last Release

3213d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/884249d2bb312969d25674c0f5b296ff7fc03776ea2dafabedc4d0b04c711acb?d=identicon)[theprivateer](/maintainers/theprivateer)

---

Top Contributors

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

---

Tags

apiDomainr

### Embed Badge

![Health badge](/badges/theprivateer-domainr/health.svg)

```
[![Health](https://phpackages.com/badges/theprivateer-domainr/health.svg)](https://phpackages.com/packages/theprivateer-domainr)
```

###  Alternatives

[openai-php/laravel

OpenAI PHP for Laravel is a supercharged PHP API client that allows you to interact with the Open AI API

3.7k7.6M74](/packages/openai-php-laravel)[mailchimp/transactional

458.9M16](/packages/mailchimp-transactional)[get-stream/stream-chat

A PHP client for Stream Chat (https://getstream.io/chat/)

301.8M2](/packages/get-stream-stream-chat)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)

PHPackages © 2026

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