LangChain / LangGraph tools for SnapRender Screenshot API. Lets your LangChain agents capture website screenshots as PNG, JPEG, WebP, or PDF.
pip install langchain-snaprenderexport SNAPRENDER_API_KEY="sk_live_your_key_here"Get a free key at snap-render.com — 200 screenshots/month, no credit card.
from langchain_snaprender import take_screenshot, check_cache, get_usage
# Use as standalone tools
result = take_screenshot.invoke({"url": "https://example.com"})
print(result)
# Or bind to a LangChain agent
from langchain_openai import ChatOpenAI
from langgraph.prebuilt import create_react_agent
llm = ChatOpenAI(model="gpt-4o")
tools = [take_screenshot, check_cache, get_usage]
agent = create_react_agent(llm, tools)
response = agent.invoke({"messages": [("user", "Take a screenshot of stripe.com")]})Capture any website as PNG, JPEG, WebP, or PDF.
Parameters: url, format, full_page, dark_mode, block_ads, block_cookie_banners, device, width, height
Check if a screenshot is cached (free, doesn't count against quota).
Parameters: url, format
Get current month's usage stats.
MIT