Degoog Docs

Degoog API reference

User facing HTTP endpoints and a real life usage example.

Overview

Most of our HTTP surface is internal plumbing for the web UI. The endpoints below are what you will likely use for making external calls.

These endpoints live at the same host and port as your UI (http://localhost:4444 by default, or DEGOOG_PORT). All responses are returned in JSON. You can configure rate limits by going to Settings then Server, and these limits will apply to every caller.

GET /api/search

Run a metasearch and get merged and scored results.

Param Description
q Required. Your search query.
type web (default) | images | videos | news.
page Starts at 1. Restricted to a maximum of 10.
time any | hour | day | week | month | year | custom. For custom, pass dateFrom and dateTo (using the standard YYYY MM DD format).
lang ISO 639 1 language code. This overrides DEGOOG_DEFAULT_SEARCH_LANGUAGE for your current request.
curl "http://localhost:4444/api/search?q=rust+lifetimes"

Response:

{
          "results": [
            {
              "title": "...",
              "url": "https://...",
              "snippet": "...",
              "source": "google",
              "score": 92,
              "sources": ["google", "duckduckgo"]
            }
          ],
          "query": "rust lifetimes",
          "totalTime": 812,
          "type": "web",
          "engineTimings": [{ "name": "Google", "time": 540, "resultCount": 10 }],
          "relatedSearches": ["rust lifetime elision", "..."]
        }

POST /api/search

This works exactly like the GET version but accepts a JSON body. You should use this when you have a long list of engines to query.

curl -X POST http://localhost:4444/api/search \
          -H "Content-Type: application/json" \
          -d '{
            "query": "rust lifetimes",
            "type": "web",
            "page": 1,
            "lang": "en",
            "engines": ["google", "duckduckgo"]
          }'

GET /api/search/stream

This is the Server Sent Events variant. It uses the exact same query parameters as GET /api/search and emits two events:

  • engine-result fires as each engine returns. The results field contains the running merged list, so you can simply keep the last one if you are a lazy consumer.
  • done is the final event containing totalTime, engineTimings, and relatedSearches.
curl -N "http://localhost:4444/api/search/stream?q=hello"

GET /api/suggest?q=...

Fetches autocomplete suggestions merged from Google and DuckDuckGo. This returns an array of strings.

GET /api/lucky?q=...

Runs a web search and sends a 302 redirect directly to the URL of the first result.

GET /opensearch.xml

OpenSearch descriptor that allows browsers to install Degoog as a search engine.

Tip: wiring Degoog into Open WebUI

Degoog is completely SearXNG compatible for the built in web search inside Open WebUI, meaning you will not need any custom tools.

  1. Open WebUI and go to your Admin Panel.
  2. Navigate to Settings.
  3. Select Web Search and enable it.
  4. Set your Web Search Engine to searxng.
  5. Set the SearxNG Query URL to your Degoog instance URL followed by /api/search, like this: http://127.0.0.1:4444/api/search.

Just remember to replace http://127.0.0.1:4444 with your actual Degoog address.