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 returnsdocuments+links, the same output shape as Haystack's built-inSerperDevWebSearch/SearchApiWebSearch, so it is drop-in for pipelines wired to those.KeenableFetcher— fetches a list of URLs and returnsdocumentswhose content is the page's main text as markdown (Keenable extracts it server-side, so you don't need a separateLinkContentFetcher+HTMLToDocumentstep).
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 defaultSecret.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_URLoverrides the base URL (HTTPS enforced; plainhttponly 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file keenable_haystack-0.1.1.tar.gz.
File metadata
- Download URL: keenable_haystack-0.1.1.tar.gz
- Upload date:
- Size: 9.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cec16fd392c8337b48a6e5e19179d179c4f1bed29a19afc562cf22bd5f347edb
|
|
| MD5 |
6655e3cb31dfaa0c9ed451bda5ada0e1
|
|
| BLAKE2b-256 |
705702d8f96be80e77ea3de8797d0b875b39b864e780687d4b9f7980a7d4c2fb
|
Provenance
The following attestation bundles were made for keenable_haystack-0.1.1.tar.gz:
Publisher:
publish.yml on keenableai/keenable-haystack
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
keenable_haystack-0.1.1.tar.gz -
Subject digest:
cec16fd392c8337b48a6e5e19179d179c4f1bed29a19afc562cf22bd5f347edb - Sigstore transparency entry: 1901404438
- Sigstore integration time:
-
Permalink:
keenableai/keenable-haystack@4626d4bf70e82a18faafa576ab0c9f225bbdc55f -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/keenableai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4626d4bf70e82a18faafa576ab0c9f225bbdc55f -
Trigger Event:
release
-
Statement type:
File details
Details for the file keenable_haystack-0.1.1-py3-none-any.whl.
File metadata
- Download URL: keenable_haystack-0.1.1-py3-none-any.whl
- Upload date:
- Size: 12.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3b87efa0017c9de518f9bd625de1a6bb767f89c1310853b237a7b472dd316050
|
|
| MD5 |
42f00d67f4b19ccb32992cc2c466c6a5
|
|
| BLAKE2b-256 |
5a1f3acbf7ae6ddc1391a37892c5a18cd8cd8c654149907d635a7f791a68d15f
|
Provenance
The following attestation bundles were made for keenable_haystack-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on keenableai/keenable-haystack
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
keenable_haystack-0.1.1-py3-none-any.whl -
Subject digest:
3b87efa0017c9de518f9bd625de1a6bb767f89c1310853b237a7b472dd316050 - Sigstore transparency entry: 1901404637
- Sigstore integration time:
-
Permalink:
keenableai/keenable-haystack@4626d4bf70e82a18faafa576ab0c9f225bbdc55f -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/keenableai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4626d4bf70e82a18faafa576ab0c9f225bbdc55f -
Trigger Event:
release
-
Statement type: