autom-haystack
Haystack integration for Autom, a SERP API that returns live search engine results as JSON.
AutomWebSearch searches the web with Google (the default), Bing, Brave, DuckDuckGo or Yahoo. It returns the results as Haystack Documents, ready for a RAG pipeline or an agent.
Installation
pip install autom-haystack
Get an API key at app.autom.dev and set it in the environment:
export AUTOM_API_KEY="your-api-key"
Usage
from haystack_integrations.components.websearch.autom import AutomWebSearch
search = AutomWebSearch(top_k=5)
result = search.run(query="What is Haystack?")
for doc in result["documents"]:
print(doc.meta["title"], doc.meta["link"])
print(doc.content)
run returns two outputs:
documents: oneDocumentper organic result. The content is the snippet, and the metadata holdstitle,linkandposition, plusdateandsourcewhen Autom returns them.links: the result URLs.
| Parameter | Default | Description |
|---|---|---|
api_key |
Secret.from_env_var("AUTOM_API_KEY") |
Autom API key |
top_k |
10 |
Maximum number of results; None keeps the whole page |
engine |
google |
google, bing, brave, duckduckgo or yahoo |
allowed_domains |
Only search these domains, added to the query as site: filters |
|
search_params |
Extra parameters for Autom, such as {"gl": "us", "hl": "en"} or {"tbs": "qdr:w"} (past week) for Google |
|
timeout |
60 |
Seconds to wait for Autom |
A failed request raises AutomError, a Haystack ComponentError with the HTTP status. The API key never appears in the message. Autom reports a rate limit as HTTP 401 with "Rate limit exceeded", and the error says so. run_async is available too.
In a RAG pipeline
from haystack import Pipeline
from haystack.components.builders import ChatPromptBuilder
from haystack.components.generators.chat import OpenAIChatGenerator
from haystack.dataclasses import ChatMessage
from haystack_integrations.components.websearch.autom import AutomWebSearch
template = [
ChatMessage.from_user(
"Answer the question from these search results.\n"
"{% for doc in documents %}- {{ doc.content }} ({{ doc.meta.link }})\n{% endfor %}\n"
"Question: {{ question }}"
)
]
pipeline = Pipeline()
pipeline.add_component("search", AutomWebSearch(top_k=5))
pipeline.add_component("prompt", ChatPromptBuilder(template=template, required_variables=["documents", "question"]))
pipeline.add_component("llm", OpenAIChatGenerator(model="gpt-4.1-mini"))
pipeline.connect("search.documents", "prompt.documents")
pipeline.connect("prompt.prompt", "llm.messages")
question = "What is new in Python 3.13?"
result = pipeline.run({"search": {"query": question}, "prompt": {"question": question}})
print(result["llm"]["replies"][0].text)
Development
pip install -e ".[test]"
pytest -m "not integration" # offline
AUTOM_API_KEY=... pytest # with the live test
License
MIT
Metadata
Release files for autom-haystack 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| autom_haystack-0.1.0.tar.gz | 7.6 kB | Without provenance | Details for autom_haystack-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| autom_haystack-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for autom_haystack-0.1.0-py3-none-any.whl |
Total release size: 14.6 kB
Release files / autom_haystack-0.1.0.tar.gz
| Download URL | autom_haystack-0.1.0.tar.gz |
|---|---|
| Size | 7.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b0278bba51004227ea3fb6294cc9c716b9bf0bb3d34f41b8e586a26873a77601
|
|
BLAKE2b-256 checksum How to use checksums |
f07757aec93dc0625bf6dee06d39c4822bfb76035e557cc2462b60864717ce2f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Release files / autom_haystack-0.1.0-py3-none-any.whl
| Download URL | autom_haystack-0.1.0-py3-none-any.whl |
|---|---|
| Size | 7.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
226feeb2a71fa25b3a420ce630332d94b8245916c376c85575a1f97e78e21f7f
|
|
BLAKE2b-256 checksum How to use checksums |
b0852196ad6ecaacf804421784fd7f01f8dbee7c8e80f4c49b8591d7772a3d61
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Security for autom-haystack 0.1.0
Provenance
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
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.