This is an unofficial Duckduckgo API created to grab the first 25 results queried from <duckduckgo.com>. The website <duckduckgo.com> does provide an api, however I didn't like the results. So, now we are here... I rolled my own unofficial Duckduckgo API for easy utilization in a Java based project. Just make sure you're rocking maven in project, and you're in our little club 😉
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
Java 8 is required to run this application, other than that there are no
prerequisites for the project, as the dependencies are included in the pom.xml
file.
To install the library is as simple as cloning the repository and building a jar file by running
mvn clean package
Then it's as easy as importing the jar into you project as a dependency! Alternatively,
you can install the library via a maven repository. Simply add the following to your
projects pom.xml
file
<dependency>
<groupId>org.bitnick.web</groupId>
<artifactId>duckduckgo</artifactId>
<version>[CURRENT VERSION]</version>
</dependency>
And have fun!
Run unit tests locally:
mvn test
Import the module and instantiate the WebSearch()
constructor by calling the static method WebSearch.instanceOf()
. Finally, call the search method and enjoy!
WebSearch webSearchTest = WebSearch.instanceOf();
List<SearchResult> anonfileResults = webSearchTest.search("anonfile api");
anonfileResults.forEach(x -> System.out.printf("%s\n%s\n%s\n\n",
x.getTitle(), x.getUrl(), x.getDescription()));
Lightweight and simple searching on the Duckduckgo website. Enjoy!
Navigate to tags on this repository to see all available versions.
Name | Mail Address | GitHub Profile |
---|---|---|
Nicholas Strydom | nstrydom@gmail.com | nstrydom2 |
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE.md license file for more details.
- My Family
- Paps
- Hat tip to anyone whose code was used
- Inspiration
- etc