Skip to main content

Keenable web-search and page-fetch components for Haystack. Keyless by default.

Project description

keenable-haystack

Keenable web search + page fetch for Haystack 2.x, as two components:

  • KeenableWebSearch — searches the web and returns documents + links, the same output shape as Haystack's built-in SerperDevWebSearch / SearchApiWebSearch, so it is drop-in for pipelines wired to those.
  • KeenableFetcher — fetches a list of URLs and returns documents whose content is the page's main text as markdown (Keenable extracts it server-side, so you don't need a separate LinkContentFetcher + HTMLToDocument step).

Keyless by default: with no API key the keyless public endpoints are used. Provide a key to use the authenticated endpoints (required for mode="realtime" and for higher rate limits).

Install

pip install keenable-haystack

Usage

from haystack_integrations.components.websearch.keenable import KeenableWebSearch
from haystack_integrations.components.fetchers.keenable import KeenableFetcher

# No key -> keyless public endpoints. Set KEENABLE_API_KEY to lift limits.
websearch = KeenableWebSearch(top_k=5)
hits = websearch.run(query="latest developments in AI agents")
print(hits["links"])

fetcher = KeenableFetcher()
pages = fetcher.run(urls=hits["links"][:2])
print(pages["documents"][0].content)

In a pipeline (drop-in for any web-search component):

from haystack import Pipeline
from haystack.components.builders import PromptBuilder

pipe = Pipeline()
pipe.add_component("search", KeenableWebSearch(top_k=5))
pipe.add_component("prompt", PromptBuilder(template="Answer using:\n{{ documents }}"))
pipe.connect("search.documents", "prompt.documents")

KeenableWebSearch.run accepts optional per-query filters (site, published_after/before, acquired_after/before, mode). There is no max_results: the API returns a fixed-size result set; top_k (constructor) trims it client-side.

Configuration

  • API key (optional). api_key=Secret.from_token(...) / the default Secret.from_env_var("KEENABLE_API_KEY", strict=False). Blank/unset → keyless public endpoints. Serializes by env-var name, never the key value.
  • Endpoint (optional). KEENABLE_API_URL overrides the base URL (HTTPS enforced; plain http only for loopback). The endpoint is never a component argument the model can set, so it cannot be used to redirect requests.

KeenableFetcher rejects non-http(s) schemes and private/internal hosts client-side before sending, and (like LinkContentFetcher) skips failed URLs by default — set raise_on_failure=True to surface errors instead.

License

MIT © Keenable

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

keenable_haystack-0.1.0.tar.gz (9.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

keenable_haystack-0.1.0-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

File details

Details for the file keenable_haystack-0.1.0.tar.gz.

File metadata

  • Download URL: keenable_haystack-0.1.0.tar.gz
  • Upload date:
  • Size: 9.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for keenable_haystack-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6c6d07a1f8268bc66003dac2c3c89f85b1818d70808166e399a8859c32eae9ee
MD5 413401c42f7b847aa78bd73b09d41a9e
BLAKE2b-256 1f028867f590b80687a95e1016f1a0dd72ec328e44c757e85bcaf9b3e864397a

See more details on using hashes here.

Provenance

The following attestation bundles were made for keenable_haystack-0.1.0.tar.gz:

Publisher: publish.yml on keenableai/keenable-haystack

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file keenable_haystack-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for keenable_haystack-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ad2022ba3229346e0b33f8b31744975ff039349658069ec14509cf1115bf649e
MD5 72fbfed9fb5e8009b265805fd686dc4c
BLAKE2b-256 dd5b0951243a9c910c028ac52f008496e1ca111be35e659cd5fedadb2c62363b

See more details on using hashes here.

Provenance

The following attestation bundles were made for keenable_haystack-0.1.0-py3-none-any.whl:

Publisher: publish.yml on keenableai/keenable-haystack

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page