# Jina

> Replace r.jina.ai and s.jina.ai with Search1API to read pages and search in Jina's request and response formats.

Canonical URL: https://s1.dev/docs/compatibility/jina

Search1API answers the request formats of Jina Reader (`r.jina.ai`) and Jina Search (`s.jina.ai`):

| Jina | Search1API |
| --- | --- |
| `https://r.jina.ai/` | `https://api.search1api.com/compat/jina/r/` |
| `https://s.jina.ai/` | `https://api.search1api.com/compat/jina/s/` |

Authenticate with `Authorization: Bearer YOUR_API_KEY`. A key without `Bearer`, as Open WebUI sends it, is also accepted.

## Reader

Put the page URL after the base, as with `r.jina.ai`:

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

`GET /compat/jina/r?url=…` and `POST /compat/jina/r` with `{ "url": "…" }` also work. A URL without a scheme is read over `https://`.

The response is Jina's plain-text format:

```text
Title: Hono - Web framework built on Web Standards

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

Markdown Content:
…
```

With `Accept: application/json`, the response is `{ "code": 200, "status": 20000, "data": { "title", "description", "url", "content" } }`. The content is always Markdown; `X-Return-Format`, `X-Respond-With`, `X-Retain-Images`, `X-With-Links-Summary`, `X-Target-Selector` and other options are ignored.

## Search

<Tabs items={['curl', 'Open WebUI']}>

<Tab value="curl">

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

</Tab>

<Tab value="Open WebUI">

Choose **jina** as the web search engine, enter your Search1API key as the Jina API key, and set:

```bash
JINA_API_BASE_URL="https://api.search1api.com/compat/jina/s/"
```

</Tab>

</Tabs>

The query can be the path (`/s/{query}`), the `q` parameter, or `q` in a JSON body sent with `POST`.

| Parameter or header | Behavior |
| --- | --- |
| `count` or `num` | Default `10`, up to `20`. |
| `type` | `web` (default), `news` or `images`. |
| `site` or `X-Site` | Restrict results to sites. |
| `hl` | Primary language of the results. |
| `page` | Result page. |
| `X-Respond-With: no-content` | Return titles, URLs and descriptions without reading the pages. |

> **warn:** As with Jina, each result includes its page content unless the request sends `X-Respond-With: no-content`. Each page read costs 1 credit, so a default search for 10 results costs up to 11 credits.

The plain-text response lists each result as `[1] Title:`, `[1] URL Source:`, `[1] Description:` and `[1] Published Time:` lines, followed by its content. With `Accept: application/json`, `data` is a list of `{ title, url, description, publishedTime, content }`. Token usage is not returned.

## Credits

| Request | Credits |
| --- | --- |
| Reader | 1 |
| Search with `X-Respond-With: no-content` | 1 |
| Search (default) | 1, plus 1 for each page read |

## Errors

Errors return JSON in Jina's format, `{ "data": null, "code": 401, "name": "…", "status": 40100, "message": "…", "readableMessage": "…" }`, with the status code.