pip install cloro-haystack Get an API key at dashboard.cloro.dev. The free plan includes 500 credits each month. Set the key as CLORO_API_KEY, or pass api_key=Secret.from_token(...).
With include_ads=True, the ads on the Google or Bing page are the last Documents. The content of an ad starts with Ad:. Its meta["source"] is "google_ad" or "bing_ad", and its meta has title, link, position, block_position, ad_type, price and store, when the ad has them. links has no ads.
With engine="bing", the component searches Bing. The country sets the Bing market. Bing Search accepts all countries except CN, KR and RU. It has no device, location or hl fields. Set search_params={"pages": 2} for more results (2 credits for each extra page) or search_params={"first": 11} to start at a later result. Bing shows its AI summary only on the first page. The query can have a maximum of 3,500 characters after URL encoding, and fewer for non-Latin scripts.
websearch = CloroWebSearch(engine="bing", country="GB", include_ai_overview=True) CloroAIAnswer from haystack_integrations.components.websearch.cloro import CloroAIAnswer ai_answer = CloroAIAnswer(engine="aimode") # "chatgpt", "aimode", "gemini" or "bing_aimode" result = ai_answer.run(query="What is retrieval-augmented generation?") print(result["replies"][0]) print(result["links"]) replies has one string: the answer as Markdown. documents has one Document for each source that the answer cites, with title, link and position in meta. An answer can take 15 to 60 seconds, so the default timeout is 180 seconds.
With engine="bing_aimode", the query can have a maximum of 3,500 characters after URL encoding, and fewer for non-Latin scripts. To send the query from a US state, set search_params={"state": "CA"} with country="US" (2 more credits).
The output names of CloroAIAnswer match AnswerBuilder:
from haystack import Pipeline from haystack.components.builders import AnswerBuilder from haystack_integrations.components.websearch.cloro import CloroAIAnswer pipe = Pipeline() pipe.add_component("ai", CloroAIAnswer(engine="chatgpt")) pipe.add_component("answer", AnswerBuilder()) pipe.connect("ai.replies", "answer.replies") pipe.connect("ai.documents", "answer.documents") query = "Which vector databases support hybrid search?" result = pipe.run({"ai": {"query": query}, "answer": {"query": query}}) print(result["answer"]["answers"][0].data) CloroWebSearch connects like the other Haystack web search components, for example to a ChatPromptBuilder through documents, or to a fetcher through links.
Both components have run_async for AsyncPipeline.
A cloro error response raises CloroError with the cloro error code, for example INVALID_API_KEY_FORMAT (401), INSUFFICIENT_CREDITS (403) or CONCURRENCY_LIMIT_EXCEEDED (429). A timeout raises TimeoutError.
uv sync uv run pytest uv run ruff check . && uv run ruff format --check . uv run mypy src uv build The tests use httpx.MockTransport and do not call the cloro API.
Both files in this release have provenance metadata.
AI Mode AI Overview Bing ChatGPT Gemini Google Haystack Web Search cloro
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.
Both files in this release have been uploaded with provenance metadata.
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.
Nov 22, 2026 2 release files Full provenance
Nov 21, 2026 2 release files Full provenance
Nov 7, 2026 2 release files Full provenance
Nov 6, 2026 2 release files Full provenance




