Jina Reader

JinaReaderTools calls the Jina Reader API to expose read_url and search_query functions that fetch and search web content.

JinaReaderTools enable an Agent to read web pages and perform searches using the Jina Reader API.

Prerequisites

The toolkit calls the Jina Reader API over HTTP and needs no additional library. The example below uses the default OpenAI model:

uv pip install -U agno openai

If api_key is not passed, the toolkit reads the JINA_API_KEY environment variable.

export JINA_API_KEY=***

Example

The following agent will use the Jina Reader API to summarize the content of https://github.com/agno-agi/agno

cookbook/91_tools/jinareader_tools.py
from agno.agent import Agent
from agno.tools.jina import JinaReaderTools

agent = Agent(tools=[JinaReaderTools()])
agent.print_response("Summarize: https://github.com/agno-agi/agno")

Toolkit Params

ParameterTypeDefaultDescription
api_keyOptional[str]NoneThe API key for authentication purposes. If not provided, uses JINA_API_KEY environment variable.
base_urlstr"https://r.jina.ai/"The base URL of the API.
search_urlstr"https://s.jina.ai/"The URL used for search queries.
max_content_lengthint10000The maximum length of content allowed.
timeoutOptional[int]NoneProvider processing timeout, sent in the X-Timeout header. HTTP transport still uses the httpx default timeout.
search_query_contentboolTrueInclude content in search query results.
enable_read_urlboolTrueEnable the read_url functionality.
enable_search_queryboolFalseEnable the search_query functionality.
allboolFalseEnable all functionality.

The toolkit stringifies the provider response dictionary and truncates that output as a whole. Its returned string is not just the clean article Markdown.

Toolkit Functions

FunctionDescription
read_urlReads the content of a specified URL using Jina Reader API. Parameters include url for the URL to read. Returns the truncated content or an error message if the request fails.
search_queryPerforms a web search using Jina Reader API based on a specified query. Parameters include query for the search term. Returns the truncated search results or an error message if the request fails.

Developer Resources