Home   |   About   |   Data Sources   |   Policies   |   Contact   |   API   |   TODO   |   News   |   Acknowledgements


PDFrate has a simplistic, but functional API. This is best expressed via examples:

The following shows how to submit a file (bad.pdf) using curl:

    curl --form filesubmission=@bad.pdf https://csmutz.com/pdfrate/submitfile

The following shows how to submit a vote for a file. The classes are one of {ben, mal, opp, tar} and the id is the sha256 of the file:

    curl -d "class=ben&id=sha256" https://csmutz.com/pdfrate/vote

The following shows how to shows how to search for a file where hash is an md5, sha1, or sha256 hash:

    curl https://csmutz.com/pdfrate/search/hash

All of the above will return a redirect to your user agent for the HTML report. However, this redirect also contains the json formated report for the file. Hence, user agents that follow redirections (like most browsers) will see the HTML report, and those which do not (mostly utilities hitting API) will see the json report, if any).

The following shows how to view the report (sans the metadata) for a file:

    curl https://csmutz.com/pdfrate/viewjson/sha256

The following shows how to view the metadata of a file:

    curl https://csmutz.com/pdfrate/meta/sha256

Note that in the event the file has not been submitted to pdfrate, you will recieve a report/metadata with null data.

Note that all submission require use of HTTPS (TLS).

All activity is subject to the same resource limits. See policies for details.