Web extraction for AI agents. Turn any permitted public web page into clean JSON or Markdown with one call, as a plain client or a LangChain, LlamaIndex, or CrewAI tool.
Website · Docs · Get a free key · MCP server
Haunt reads a public page and hands your agent structured data back. When a page is blocked, login-walled, CAPTCHA-gated, or too thin to trust, it returns an honest machine-readable error instead of fabricated data, so your agent can retry, switch source, skip, or ask a human.
Free tier: 1,000 credits a month, no card.
pip install hauntapifrom hauntapi import Haunt
haunt = Haunt("your_api_key") # or set HAUNT_API_KEY
result = haunt.extract("https://example.com/product", "product name and price")
if result.success:
print(result.data) # {"name": "...", "price": "..."}
else:
print(result.error_code) # access_denied, login_required, not_found, ...Markdown for RAG, notes, or .md files:
result = haunt.extract("https://example.com/docs", "the page content",
response_format="markdown")The same client, wired into the framework you already use. Lazy imports, so you only need the one you install.
LangChain
from hauntapi import langchain_tool
tools = [langchain_tool()]LlamaIndex
from hauntapi import llamaindex_tool
tools = [llamaindex_tool()]CrewAI
from crewai import Agent
from hauntapi import crewai_tool
researcher = Agent(role="Researcher", tools=[crewai_tool()])Need the framework installed too? pip install "hauntapi[langchain]" (or llamaindex, crewai).
An agent that receives fabricated data from a blocked page acts on garbage and cannot tell. Haunt returns error codes like access_denied, login_required, captcha_required, and not_found, so your agent branches on reality instead of a hallucination.
haunt.extract_batch([...])for many URLs in one callhaunt.extract_auth(...)for pages you are allowed to access with your own headershaunt.usage()for remaining credits- Full REST and MCP docs: https://hauntapi.com/docs
MIT licensed.