访问 https://r.datayes.com/auth/login 登录 Datayes 账号,并在 Datayes 控制台获取可撤销的 API token。
macOS / Linux:
export DATAYES_TOKEN='your-token'
Windows PowerShell:
$env:DATAYES_TOKEN = "your-token"
Windows CMD:
set DATAYES_TOKEN=your-token
python3 scripts/datayes_web_search.py 发请求。DATAYES_TOKEN 读取 token。脚本会自动带上 Authorization: Bearer 。rewrite=false,保留用户原始查询,减少意外改写。python3 scripts/datayes_web_search.py spec
python3 scripts/datayes_web_search.py search "新能源车 渗透率 2026" --query-scope research
python3 scripts/datayes_web_search.py search "美国关税政策 2026" --query-scope news --top 30
| 值 | 搜索范围 |
|---|---|
| --- | --- |
| (不传) | 综合全部类型(默认) |
research | 券商研报 |
announcement | 上市公司公告 |
news | 财经资讯/新闻 |
meetingSummary | 电话会/调研纪要 |
indicator | 宏观/行业数据指标 |
researchTable | 研报图表 |
news。research。announcement。meetingSummary。indicator。queryScope 做综合搜索。共 1 个版本