LangChain tools for SnapRender Screenshot API — capture websites as PNG, JPEG, WebP, or PDF
Project description
langchain-snaprender
LangChain / LangGraph tools for SnapRender Screenshot API. Lets your LangChain agents capture website screenshots as PNG, JPEG, WebP, or PDF.
Install
pip install langchain-snaprender
Setup
export SNAPRENDER_API_KEY="sk_live_your_key_here"
Get a free key at app.snap-render.com — 50 screenshots/month, no credit card.
Usage
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")]})
Tools
take_screenshot
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_cache
Check if a screenshot is cached (free, doesn't count against quota).
Parameters: url, format
get_usage
Get current month's usage stats.
License
MIT
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 langchain_snaprender-0.1.0.tar.gz.
File metadata
- Download URL: langchain_snaprender-0.1.0.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bc1a6b167b8d8aa2bc23ec85122e4404e6ac36fefa491126e39ac85d2a6f4f92
|
|
| MD5 |
040a938088ab787711a5a668fd1565e1
|
|
| BLAKE2b-256 |
9bd63ab07f2b95d5d6e84698a9c90f33e79b9b6f9a65fc77736e1a2a5210a1d4
|
File details
Details for the file langchain_snaprender-0.1.0-py3-none-any.whl.
File metadata
- Download URL: langchain_snaprender-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
791d4423fd31c5563e9196dafb17ca566bfe83cf03edda173933f03f0b7e1423
|
|
| MD5 |
1345c978c849a5c5160f1c952921b44c
|
|
| BLAKE2b-256 |
c6e4d5dedc8b4249a75e51e80e366a38c7db5a29cb82bd08de6bec9f5dfacd02
|