Skip to content

Sources developer

BlueSkyXN edited this page May 4, 2026 · 2 revisions

Sources / 开发者平台

事实来源:主仓 pr-88 @ a312645。2 个内置 developer 源。


1. 全部 2 源

源 接入 鉴权 凭据 限流(无 Key / 有 Key)
github open_api optional (rate_limit) github_token 60 req/h vs 5000 req/h
stackoverflow open_api optional (quota) stackoverflow_api_key 300 req/day vs 10000 req/day

2. 配置

github_token: ghp_xxx                # https://github.com/settings/tokens(PAT,read 权限即可)
stackoverflow_api_key: xxx           # https://stackapps.com/apps/oauth/register

不配也能用,但限流明显——建议都配上。


3. 调用示例

souwen search web "fastapi async" -e github -n 10
souwen search web "python asyncio" -e stackoverflow -n 10
from souwen.facade import search

resp = await search("LangChain", domain="developer", sources=["github"])
for sr in resp:
    for r in sr.results:
        print(r.title, r.url, r.snippet)

4. 反模式

  • 不配 GitHub Token + 高频调用:60 req/h 很快撞墙。
  • GitHub Token 给写权限:完全没必要,read 即可。

5. 接下来

Clone this wiki locally