Search1API文档

Jina

用 Search1API 替换 r.jina.ai 和 s.jina.ai,以 Jina 的请求和响应格式读取网页和搜索。

Search1API 支持 Jina Reader(r.jina.ai)和 Jina Search(s.jina.ai)的请求格式:

JinaSearch1API
https://r.jina.ai/https://api.search1api.com/compat/jina/r/
https://s.jina.ai/https://api.search1api.com/compat/jina/s/

使用 Authorization: Bearer YOUR_API_KEY 进行认证。也接受不带 Bearer 前缀的密钥(Open WebUI 就是这样发送的)。

Reader

与 r.jina.ai 一样,把页面 URL 直接拼接在基础 URL 之后:

curl "https://api.search1api.com/compat/jina/r/https://hono.dev/docs/" \
  -H "Authorization: Bearer YOUR_API_KEY"

也可以使用 GET /compat/jina/r?url=…,或发送 { "url": "…" } 到 POST /compat/jina/r。不带协议的 URL 会通过 https:// 读取。

响应为 Jina 的纯文本格式:

Title: Hono - Web framework built on Web Standards

URL Source: https://hono.dev/docs/

Markdown Content:
…

带上 Accept: application/json 时,响应为 { "code": 200, "status": 20000, "data": { "title", "description", "url", "content" } }。内容始终是 Markdown;X-Return-Format、X-Respond-With、X-Retain-Images、X-With-Links-Summary、X-Target-Selector 等选项会被忽略。

curl "https://api.search1api.com/compat/jina/s/hono%20cloudflare%20workers" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "X-Respond-With: no-content"

查询可以放在路径中(/s/{query})、q 参数中,或通过 POST 发送的 JSON 请求体中的 q。

参数或请求头行为
count 或 num默认 10,最多 20。
typeweb(默认)、news 或 images。
site 或 X-Site将结果限定在指定站点。
hl结果的主要语言。
page结果页码。
X-Respond-With: no-content只返回标题、URL 和描述,不读取页面。

搜索默认会读取每个结果页面

与 Jina 一样,除非请求发送了 X-Respond-With: no-content,否则每个结果都会包含其页面内容。每读取一个页面消耗 1 积分,因此一次默认返回 10 条结果的搜索最多消耗 11 积分。

纯文本响应中,每条结果依次列出 [1] Title:、[1] URL Source:、[1] Description: 和 [1] Published Time: 行,随后是其内容。带上 Accept: application/json 时,data 是由 { title, url, description, publishedTime, content } 组成的列表。不返回 token 用量。

积分

请求积分
Reader1
带 X-Respond-With: no-content 的搜索1
搜索(默认)1,每读取一个页面另加 1

错误

错误以 Jina 的 JSON 格式 { "data": null, "code": 401, "name": "…", "status": 40100, "message": "…", "readableMessage": "…" } 返回,并带有相应的状态码。

本页内容