🔗 Official Integration Guide

Give Your LangChain Agents Web Access

WebPerception API integrates with LangChain in 5 lines of code. Scrape any website, take screenshots, and extract structured data with AI.

Get Started in 3 Minutes

1 Install the SDK
pip install requests langchain
2 Create a LangChain Tool
from langchain.tools import Tool
import requests

def web_perceive(url: str) -> str:
    """Scrape a URL and extract structured data using AI."""
    response = requests.post(
        "https://api.mantisapi.com/v1/scrape",
        headers={"Authorization": "Bearer YOUR_API_KEY"},
        json={
            "url": url,
            "extract": {
                "schema": {
                    "title": "string",
                    "main_content": "string",
                    "links": ["string"]
                }
            }
        }
    )
    return str(response.json())

scrape_tool = Tool(
    name="web_scraper",
    description="Scrape a website and extract structured data. Input: URL",
    func=web_perceive
)
3 Add to Your Agent
from langchain.agents import initialize_agent, AgentType
from langchain.chat_models import ChatOpenAI

llm = ChatOpenAI(model="gpt-4", temperature=0)
agent = initialize_agent(
    tools=[scrape_tool],
    llm=llm,
    agent=AgentType.OPENAI_FUNCTIONS,
    verbose=True
)

# Your agent can now browse the web!
result = agent.run("What's the top story on Hacker News right now?")
print(result)

Why LangChain Developers Choose WebPerception

🧠

AI-Native Extraction

No CSS selectors. No XPath. Define a JSON schema and get structured data back. Works even when websites change their HTML.

JavaScript Rendering

Full browser rendering handles SPAs, infinite scroll, and dynamic content. Your agent sees exactly what a human sees.

🛡️

Anti-Bot Bypass

Built-in residential proxies, browser fingerprinting, and CAPTCHA handling. No blocked requests.

📸

Visual Perception

Take screenshots for your vision-enabled agents. Combine with GPT-4V for visual understanding of any webpage.

🔧

Tool-Ready

Designed as a LangChain Tool from day one. Works with OpenAI Functions, ReAct, and any agent architecture.

💰

Free Tier

100 requests/month free. No credit card required. Start building your web-enabled agent in minutes.

What LangChain + WebPerception Agents Can Do

🔍 Research Agent

Build an agent that researches any topic by crawling multiple sources, extracting key facts, and synthesizing a report.

result = agent.run(
    "Research the top 5 AI startups that raised Series A in 2026. "
    "For each, find their product, funding amount, and key investors."
)

📊 Competitor Monitor

Track competitor pricing, features, and messaging changes in real-time. Get alerts when something changes.

result = agent.run(
    "Check competitor.com/pricing and extract all plan names, "
    "prices, and included features. Compare with our current pricing."
)

📰 News Aggregator

Build an agent that monitors news sources and curates relevant articles for your team, complete with summaries.

result = agent.run(
    "Check TechCrunch, The Verge, and Hacker News for AI-related "
    "news from today. Summarize the top 3 stories."
)

Start Building Web-Enabled LangChain Agents

Free tier. No credit card. 100 requests/month to get started.

Get Free API Key → Read the Docs