Skip to content

LessAPI-DuckDuckGo is an API service for a search engine. Simple, lightweight, reliable, Docker deployable, easy to maintain. 一个基于DuckDuckGo的搜索引擎API服务。简单、轻量、可靠、Docker部署、易于维护。

License

lessapi-dev/lessapi-duckduckgo

Repository files navigation

LessAPI-DuckDuckGo

GitHub Docker FOSSA Status

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.

Large Language Model (LLM) Friendly. Support Plain Text Response.

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:v0.0.3

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. e.g., http://proxy.server:3000 (optional) Default is empty
  • llmStyle: Whether to use Large Language Model (LLM) Friendly style response. e.g. 1, 0 (optional) Default is 0

Request Example:

curl 'http://127.0.0.1:8080/search/text?keyword=lessapi&maxCount=10'
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."
      }
    ]
  }
}

Advanced

Use Environment Variables

  • LESSAPI_DEFAULT_LANGUAGE: (optional) Default language, such as en-US, fr-FR, zh-CN, ru-RU, etc. Default is en-US
  • LESSAPI_DEFAULT_VIA_PROXY_URL: (optional) The address of the proxy used by the browser, e.g., http://proxy.server:3000 Default is empty

Security

Security Status

License

MIT

FOSSA Status

About

LessAPI-DuckDuckGo is an API service for a search engine. Simple, lightweight, reliable, Docker deployable, easy to maintain. 一个基于DuckDuckGo的搜索引擎API服务。简单、轻量、可靠、Docker部署、易于维护。

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published