WhatCMS API

Access our CMS detection algorithms and data with the WhatCMS API.


  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.

https://whatcms.org/APIEndpoint/Detect?key=YOUR-API-KEY&url=en.wikipedia.org

Using Curl

curl -G https://whatcms.org/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://whatcms.org/APIEndpoint/Detect?key=YOUR-API-KEY&url=en.wikipedia.org",
    "request_web": "https://whatcms.org/?s=en.wikipedia.org",
    "result": {
        "code": 200,
        "msg": "CMS Found",
        "id": 8,
        "name": "MediaWiki",
        "confidence": "high",
        "cms_url": "https://whatcms.org/c/8_MediaWiki"
    }
}

PHP Wrapper

The whatcms-php wrapper can help you easily integrate WhatCMS detections into any PHP application. This package is open source and hosted on Github.

We recommended installing whatcms-php through Composer.

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

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

php composer.phar require whatcms/whatcms-php

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

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

Status Endpoint

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

https://whatcms.org/APIEndpoint/Detect?key=YOUR-API-KEY

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

CodeMessage
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
200Success
201Failed: CMS or Host Not Found
202Requested Url Was Unavailable


Dedicated Content Management System Detection