A DuckDuckGo API for the web in JavaScript with no dependencies.
Please note that this is not an official api.
Step 1: Include ddgweb.js
<script src="https://cdn.rawgit.com/Allen-B1/ddgweb-api/master/ddgweb.min.js"></script>
Step 2:
ddg.result("DuckDuckGo").then(function(result) {
alert(result.text);
});
For the full documentation, read the API documentation