scrapedo-haystack
A Haystack component that fetches web pages through the Scrape.do API and returns them as Haystack Documents.
Scrape.do handles proxies, retries, CAPTCHAs and anti-bot protection, so the component works on pages that block normal HTTP requests. Pages can be returned as Markdown (ready for an LLM) or raw HTML.
Installation
pip install scrapedo-haystack
Get an API token from Scrape.do and set it as an environment variable:
export SCRAPEDO_API_KEY="your-token"
Usage
Fetch pages
from scrapedo_haystack import ScrapeDoFetcher
fetcher = ScrapeDoFetcher()
result = fetcher.run(urls=["https://example.com"])
doc = result["documents"][0]
print(doc.meta["url"])
print(doc.content) # page content as Markdown
Options
fetcher = ScrapeDoFetcher(
output="markdown", # "markdown" or "raw" (original HTML)
render=True, # run JavaScript in a headless browser
super_proxy=True, # use residential and mobile IPs
geo_code="us", # route the request through a country
extra_params={"waitUntil": "networkidle0"}, # any other Scrape.do parameter
timeout=60,
max_workers=4, # URLs fetched in parallel
raise_on_failure=False, # skip failed URLs instead of raising
)
All Scrape.do API parameters are listed in the Scrape.do documentation.
Use in a RAG pipeline
Fetch pages, split them, and answer a question from their content:
from haystack import Pipeline
from haystack.components.builders import ChatPromptBuilder
from haystack.components.generators.chat import OpenAIChatGenerator
from haystack.components.preprocessors import DocumentSplitter
from haystack.dataclasses import ChatMessage
from scrapedo_haystack import ScrapeDoFetcher
template = [
ChatMessage.from_user(
"""Answer the question using only these pages.
{% for doc in documents %}
Source: {{ doc.meta.url }}
{{ doc.content }}
{% endfor %}
Question: {{ question }}"""
)
]
pipe = Pipeline()
pipe.add_component("fetcher", ScrapeDoFetcher(render=True))
pipe.add_component("splitter", DocumentSplitter(split_by="word", split_length=300))
pipe.add_component("prompt", ChatPromptBuilder(template=template, required_variables=["question"]))
pipe.add_component("llm", OpenAIChatGenerator(model="gpt-4o-mini"))
pipe.connect("fetcher.documents", "splitter.documents")
pipe.connect("splitter.documents", "prompt.documents")
pipe.connect("prompt.prompt", "llm.messages")
result = pipe.run({
"fetcher": {"urls": ["https://haystack.deepset.ai/overview/intro"]},
"prompt": {"question": "What is Haystack?"},
})
print(result["llm"]["replies"][0].text)
This example also needs OPENAI_API_KEY set.
Load a saved pipeline
Haystack 3 only loads components from allowed modules when reading a pipeline from YAML. Add this package to the allowlist:
pipe = Pipeline.loads(yaml_text, allowed_modules=["scrapedo_haystack.fetcher"])
The API token is never written to the YAML; it is read from SCRAPEDO_API_KEY when the pipeline loads.
Output
Each fetched URL becomes one Document:
| Field | Value |
|---|---|
content |
Page as Markdown, or raw HTML when output="raw" |
meta["url"] |
The requested URL |
meta["status_code"] |
HTTP status returned by Scrape.do |
meta["content_type"] |
text/markdown, or the page's content type for raw output |
Development
pip install -e ".[test]"
pytest
License
Apache-2.0
Metadata
Release files for scrapedo-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 |
|---|---|---|---|---|
| scrapedo_haystack-0.1.0.tar.gz | 5.9 kB | With provenance | Details for scrapedo_haystack-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| scrapedo_haystack-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for scrapedo_haystack-0.1.0-py3-none-any.whl |
Total release size: 11.8 kB
Release files / scrapedo_haystack-0.1.0.tar.gz
| Download URL | scrapedo_haystack-0.1.0.tar.gz |
|---|---|
| Size | 5.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dbc865629e3dc3142fe4ff3d3c1ce04832029526af64f817d7e990c0912b43de
|
|
BLAKE2b-256 checksum How to use checksums |
c9c2f8861073127b6372e76275b3c31af37f0d1a9e9a32a360ec01dd402c6920
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.
Transparency logRelease files / scrapedo_haystack-0.1.0-py3-none-any.whl
| Download URL | scrapedo_haystack-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f9ba291274a434b4f8e702ec080737d4c737528ed2233bb52e3d8e7ba5319814
|
|
BLAKE2b-256 checksum How to use checksums |
ca1c824718457bb7b7ab41c20de10d8932e90ab6ab0de4589b3e337eaf03d822
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.
Transparency logSecurity for scrapedo-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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for scrapedo_haystack-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.
Transparency logA 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.