Skip to main content

JinaReaderConnector

A component that interacts with Jina AI's reader service to process queries and return documents.

Basic Information

  • Type: haystack_integrations.components.connectors.jina.reader.JinaReaderConnector

Inputs

ParameterTypeDefaultDescription
querystrThe query string or URL to process.
headersOptional[Dict[str, str]]NoneOptional headers to include in the request for customization. Refer to the Jina Reader documentation for more information.

Outputs

ParameterTypeDefaultDescription
documentsList[Document]A dictionary with the following keys: - documents: A list of Document objects.

Overview

Work in Progress

Bear with us while we're working on adding pipeline examples and most common components connections.

A component that interacts with Jina AI's reader service to process queries and return documents.

This component supports different modes of operation: read, search, and ground.

Usage example:

from haystack_integrations.components.connectors.jina import JinaReaderConnector

reader = JinaReaderConnector(mode="read")
query = "https://example.com"
result = reader.run(query=query)
document = result["documents"][0]
print(document.content)

>>> "This domain is for use in illustrative examples..."

Usage Example

components:
JinaReaderConnector:
type: jina.src.haystack_integrations.components.connectors.jina.reader.JinaReaderConnector
init_parameters:

Parameters

Init Parameters

These are the parameters you can configure in Pipeline Builder:

ParameterTypeDefaultDescription
modeUnion[JinaReaderMode, str]The operation mode for the reader (read, search or ground). - read: process a URL and return the textual content of the page. - search: search the web and return textual content of the most relevant pages. - ground: call the grounding engine to perform fact checking. For more information on the modes, see the Jina Reader documentation.
api_keySecretSecret.from_env_var('JINA_API_KEY')The Jina API key. It can be explicitly provided or automatically read from the environment variable JINA_API_KEY (recommended).
json_responseboolTrueControls the response format from the Jina Reader API. If True, requests a JSON response, resulting in Documents with rich structured metadata. If False, requests a raw response, resulting in one Document with minimal metadata.

Run Method Parameters

These are the parameters you can configure for the component's run() method. This means you can pass these parameters at query time through the API, in Playground, or when running a job. For details, see Modify Pipeline Parameters at Query Time.

ParameterTypeDefaultDescription
querystrThe query string or URL to process.
headersOptional[Dict[str, str]]NoneOptional headers to include in the request for customization. Refer to the Jina Reader documentation for more information.