API v1

This API allows to get some intel about prone to be compromised websites, already -worth to mention- pwned websites and to get the security awareness score of websites which have been unmasked (desenmascarados in Spanish) among other information.
For a full reference of this service check it out here.

Overview

This is the first approach to provide an API for the desenmascara.me service therefore the amount of details returned is limited. If you want to obtain the full details you may go directly either to the desenmascara.me service or pwnedwebsites.com resource.

Index

Querying if a given website has been pwned

The most common use of the API is to return compromised details for a given URL. The API takes a single parameter which is the URL to be searched for. It will search for either for http or https version of the website.
GET http://desenmascara.me/api/pwned/{URL}
i.e:
GET http://desenmascara.me/api/pwned/www.isc.org
will return pwned website details (url; incident; date; sector; reference) separated by ";"
http://www.isc.org ; redirecting visitors to the Angler Exploit Kit ; 29 Dec 2014, midnight ; Internet consortium ; http://www.scmagazine.com/isc-website-compromised-possibly-due-to-vulnerable-wordpress-plugin/article/390192/
In case the queried website has not been pwned but it was in the desenmascara.me database, the following text will appear
Not pwned yet
In case the queried website has not been pwned and it was not in the desenmascara.me database, the following text will appear
Not desenmascarada yet


Getting the security awareness score of a given website

In the same way as getting a pwned website, in order to return the security awareness score of a given website, the API takes a single parameter which is the URL to be searched for.
GET http://desenmascara.me/api/{URL}
i.e:
GET http://desenmascara.me/api/www.fbi.gov
will return the url, the score value of the website and the last date which was unmasked (desenmascarado in Spanish) separated by ";"
http://www.fbi.gov ; 60 ; 6 Apr 2015, 1:27 p.m.
In case the queried website has not been unmasked yet (desenmascarado in Spanish), the following text will appear
Not desenmascarada yet


HTTP o HTTPS
In contrast to querying a pwned website where the search is either for http and https, here by default when querying a website as above the query is for http. If you want to query the https version of a website you should do it as below:
GET http://desenmascara.me/api/s/{URL}
i.e:
GET http://desenmascara.me/api/s/www.securizame.com
will return the score value of the website along with the last date which was unmasked (desenmascarado in Spanish)
https://www.securizame.com ; 120 ; 1 Apr 2015, 1:13 p.m.
Notice that based on the kind of query (either http or https) the result may be different as the website infrastructure might change. i.e:
GET http://desenmascara.me/api/www.securizame.com
result different to the https version
http://www.securizame.com ; 35 ; 13 Jan 2013, 8:53 p.m.


Querying the number of URLs related to a given brand

There are either fake or no official pages for several brands. Take a look to some stats collected.
By quering a given brand or word you can get the number of URLs retrieved by the desenmascara.me service.
GET http://desenmascara.me/api/brand/{brand}
i.e:
GET http://desenmascara.me/api/brand/rayban
will return the brand (or word), and the number of URLs available in the desenmascara.me service related to this brand (or word).
rayban ; 93


ANOTHER POTENTIAL USES
One of the core purposes of this search is to search for number of brands but you can use it as you like. The term used here will look in the metadata field, therefore you can use as your imagination allows you:

To get some numbers about software used
GET http://desenmascara.me/api/brand/apache
apache ; 16570
To get some numbers about CMSs used
GET http://desenmascara.me/api/brand/wordpress
wordpress ; 3395
Security headers used
GET http://desenmascara.me/api/brand/httponly
httponly ; 3603
and so on... you get the idea right? :)

Getting the URL's MD5 and the current status of 10 random FAKE websites for a given brand

In order to have an idea of the data collected you can get some examples of websites (obfuscated with the MD5 instead of the URL) for any brand, let's say for example for RayBan.
By quering a given brand you can get 10 random of URL's MD5 and it's current status.
GET http://desenmascara.me/api/brand-urls/{brand}
i.e:
GET http://desenmascara.me/api/brand-urls/rayban
will return a list of 10 objects as below:
MD5 FAKE URL;CURRENT STATUS;LAST TIME CHECKED
16f3d05fb5444508348321341a4006a0; Taken down; 19 Oct 2015, 11:30 a.m.
d46c2eb0f15552d58a9a77ff8a9e69a6; Taken down; 19 Oct 2015, 11:30 a.m.
b06b725ce038a84400fa61943c42041a; 200; 19 Oct 2015, 11:30 a.m.
7e8fe862a4e1f81d53a9cfac626b8185; Taken down; 19 Oct 2015, 11:30 a.m.
652bf36df12e52276fd999c1d78af58b; URL error; 19 Oct 2015, 11:32 a.m.
962f77050e510f6245dfb2798b13ccc2; URL error; 19 Oct 2015, 11:32 a.m.
b85feec71ebcfb45453697cdef1e006a; URL error; 19 Oct 2015, 11:33 a.m.
38aba6dd07d04df593ce6c2f8a024d4e; 200; 19 Oct 2015, 11:34 a.m.
1045c21841f73ede0b0acd751430485a; 200; 19 Oct 2015, 9:10 a.m.
14ad4767035825044696c76d1d0c67f9; URL error; 19 Oct 2015, 9:11 a.m.
The CURRENT STATUS values can be: