Documentation
¶
Overview ¶
Package jina is web search and page reading through Jina AI (checked 2026-09-26): s.jina.ai for search, about $0.50 per 1,000 searches ($0.05 per million tokens, at least 10,000 a search, 100 requests a minute), and r.jina.ai for pages built with JavaScript, PDFs and sites that block plain fetches, about $0.25–$0.50 per 1,000 pages.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PlainSnippet ¶
PlainSnippet turns Jina's markdown into a plain-text snippet. The TS adapter follows the same rules: images go, links keep their text, bold, code and heading marks go, spaces collapse, and it is cut at 300 characters counted as JavaScript counts them.
Types ¶
type Reader ¶
type Reader struct{ Client }
Reader is a ports.Fetcher on r.jina.ai. Jina fetches the page from its own servers, so your network is never reached. Use it where the page reader comes back empty or blocked.
type WebSearch ¶
type WebSearch struct{ Client }
WebSearch is a ports.Search on s.jina.ai. Cheaper than Brave, slower and more limited: for low traffic where cost matters most. Jina returns each result's page text; only a short snippet is kept, so the model still opens only the pages it needs. It has no recency filter, so Recency is ignored.
func NewWebSearch ¶
NewWebSearch is a Jina search with an API key.