ddgr-web-search

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

DDGR Web Search (JSON)

DDGR 网页搜索(JSON格式)

Overview

概述

Use
ddgr "query" --json
to fetch search results as structured JSON, then extract only the minimal fields needed for the task.
使用
ddgr "query" --json
以结构化JSON格式获取搜索结果,然后提取任务所需的最少字段。

Workflow

工作流程

  1. Run a JSON search (non-interactive).
bash
ddgr "cli websearch" --json
  1. If you need fewer/more results or filters, add options:
bash
ddgr "cli websearch" --json -n 5
ddgr "cli websearch" --json -t w
ddgr "cli websearch" --json -w "example.com"
ddgr "cli websearch" --json -r "us-en"
  1. Summarize or cite results using only a small subset of entries. Avoid copying full JSON into context.
  1. 运行JSON格式搜索(非交互式)。
bash
ddgr "cli websearch" --json
  1. 如果需要调整结果数量或添加筛选条件,使用以下选项:
bash
ddgr "cli websearch" --json -n 5
ddgr "cli websearch" --json -t w
ddgr "cli websearch" --json -w "example.com"
ddgr "cli websearch" --json -r "us-en"
  1. 仅使用少量条目来总结或引用结果,避免将完整JSON复制到上下文当中。

Useful Options (Non-Exhaustive)

实用选项(非完整列表)

  • --json
    : output results as JSON
  • -n N
    : results per page (0-25)
  • -t d|w|m|y
    : time filter (day/week/month/year)
  • -w SITE
    : restrict to a site/domain
  • -r REG
    : region code (e.g.,
    us-en
    )
  • --unsafe
    : disable safe search if needed
  • -x
    : expand full URLs
  • --proxy URI
    : use HTTPS proxy
  • --json
    : 以JSON格式输出结果
  • -n N
    : 每页结果数量(0-25)
  • -t d|w|m|y
    : 时间筛选(日/周/月/年)
  • -w SITE
    : 限制搜索站点/域名
  • -r REG
    : 地区代码(例如
    us-en
  • --unsafe
    : 必要时禁用安全搜索
  • -x
    : 展开完整URL
  • --proxy URI
    : 使用HTTPS代理