Who Hosts This API

Detect hosting providers programatically

  1. Example Request
  2. Request Parameters
  3. Result JSON
  4. PHP Wrapper
  5. Status Endpoint
  6. Rate Limiting
  7. Result Codes

Example Request

Fetch our data with curl, guzzle or your favorite HTTP client.


Using Curl

curl -G https://www.who-hosts-this.com/APIEndpoint/Detect \
--data-urlencode key="Your-api-key" \
--data-urlencode url="en.wikipedia.org"

Request Parameters

The API query requires two parameters: the url you want to check and your api key.

NameDescriptionExample Values
urlThe url of the page to check. Required
  • en.wikipedia.org
  • https://en.wikipedia.org
  • en.wikipedia.org/wiki/Main_Page
keyYour unique api key. RequiredGet A Free API Key

Result JSON

All API responses are JSON encoded and have the following format.

    "request": "https://www.who-hosts-this.com/others/Who-Hosts-This/APIEndpoint/Detect?key=YOUR-API-KEY&url=en.wikipedia.org",
    "request_web": "https://www.who-hosts-this.com/?s=en.wikipedia.org",
    "result": {
        "code": 200,
        "msg": "Success: CMS or Host Found"
    "results": [
            "ip": "2620:0:861:ed1a::1",
            "type": "AAAA",
            "isp_id": "544",
            "isp_name": "Wikimedia Foundation Inc.",
            "isp_url": "https://localhost/others/Who-Hosts-This/544-Wikimedia-Foundation-Inc"
            "ip": "",
            "type": "A",
            "isp_id": "544",
            "isp_name": "Wikimedia Foundation Inc.",
            "isp_url": "https://localhost/others/Who-Hosts-This/544-Wikimedia-Foundation-Inc"

PHP Wrapper

The who-hosts-this-php wrapper can help you easily integrate hosting provider detections into any PHP application. This package is open source and hosted on Github.

We recommended installing who-hosts-this-php through Composer.

curl -sS https://getcomposer.org/installer | php

Next, run the Composer command to install the latest stable version:

php composer.phar require whatcms/who-hosts-this-php

Once installed, you can use the WhoHostsThis class to fetch results:

require 'vendor/autoload.php';
$key = 'Your API Key';
$detector = new \WhoHostsThis\WhoHostsThis($key);
$check_url = 'en.wikipedia.org';
$result	 = $detector->CheckUrl($check_url);

Status Endpoint

You can use the status endpoint for checking your account totals.


Example Response

    "request": "https://whatcms.org/APIEndpoint/Status?key=YOUR-API-KEY",
    "result": {
        "code": 200,
        "msg": "Success",
        "period_start": 1520722943,
        "period_end": 1523401343,
        "period_quota": 10000,
        "period_requests": 406,
        "period_remaining": 9594

Rate Limiting

As we open up our API to more and more usage, the rate limits will help make sure our system will remain stable and available to everyone.

Please note, some API queries will require us to fetch the requested url. If the server for the requested url is slow to respond, our results will also be delayed. We allow up to 20 seconds for responses to complete.

Result Codes

0Server Failure
100API Key Not Set
101Invalid API Key
102Request not authenticated: %s
110Url Parameter Not Set
111Invalid Url
112Missing required parameter: %s
113Invalid value for required parameter: %s
120Too Many Requests
121You have exceeded your monthly request quota
123Account disabled per violation of Terms and Conditions
201Failed: CMS or Host Not Found
202Requested Url Was Unavailable