Sign inSign up

lessapi/lessapi-duckduckgo

By lessapi

Updated over 2 years ago

An API service for a search engine. Based on DuckduckGo.

Image
1

843

lessapi/lessapi-duckduckgo repository overview

Project Github

https://github.com/lessapi-dev/lessapi-duckduckgo

English | 简体中文 | 繁體中文 | 日本語 | 한국어 | Русский | Deutsch | Français | Español | Italiano | Português

Introduction

LessAPI-DuckDuckGo is an API service for a search engine.

Based on Playwright and DuckDuckGo's search engine, it encapsulates to provide simple API interfaces.

Simple, lightweight, reliable, Docker deployable, easy to maintain.

Status

Experimentally under development and not recommended for use in production environments.

Deployment

One command is all it takes to deploy the service to port 8080 using Docker.

docker run -d -p 8080:8080 --restart=unless-stopped --name lessapi-duckduckgo lessapi/lessapi-duckduckgo:latest

Usage

OpenAPI Standard Documentation (Swagger 3.0)

OpenAPI Standard Documentation (Swagger 3.0)

Text Search GET /search/text

Request Parameters:

  • keyword: Search keyword (required)
  • region: Region (optional) such as en-US, fr-FR, zh-CN, ru-RU, etc. Default is en-US
  • maxCount: Maximum number of results returned (optional) Default is 20
  • viaProxyUrl: The address of the proxy used by the browser (optional) e.g., http://proxy.server:3000 Default is empty

Request Example:

curl 'http://127.0.0.1:8080/search/text?keyword=lessapi&maxCount=2'
curl 'http://127.0.0.1:8080/search/text?keyword=lessapi&maxCount=99&viaProxyUrl=http://proxy.server:3000'

Response Example:

{
  "code": "success",
  "data": {
    "results": [
      {
        "order": 1,
        "title": "Adele - Hello (Official Music Video) - YouTube",
        "url": "https://www.youtube.com/watch?v=YQHsXMglC9A",
        "description": "Listen to \"Easy On Me\" here: http://Adele.lnk.to/EOMPre-order Adele's new album \"30\" before its release on November 19: https://www.adele.comShop the \"Adele..."
      },
      {
        "order": 2,
        "title": "Hello Definition & Meaning - Merriam-Webster",
        "url": "https://www.merriam-webster.com/dictionary/hello",
        "description": "Learn the origin, usage, and synonyms of the word hello, an expression or gesture of greeting. See examples of hello in sentences and related words from the dictionary."
      }
    ]
  }
}

License

MIT

Tag summary

Content type

Image

Digest

sha256:8cbae4ad0

Size

349.1 MB

Last updated

over 2 years ago

docker pull lessapi/lessapi-duckduckgo