Skip to main content
Piloterr
LangGraph logo

AI stacks

Stateful agent graphs with Piloterr tools

Build LangGraph workflows that call Piloterr REST APIs as tools. Orchestrate multi-step scrape → analyze → act loops with checkpoints, branching, and human-in-the-loop.

  • ReAct and custom StateGraph patterns
  • Wrap any Piloterr endpoint as a LangChain tool
  • Structured JSON for reliable graph transitions
  • Production anti-bot bypass on every scrape step

At a glance

Graph

stateful agents

Tools

Piloterr APIs

400+

data sources

REST

HTTP API

Why connect LangGraph

  • Multi-step research graphs

    Chain scrape, filter, and summarize nodes, LangGraph persists state between Piloterr tool calls.

  • Branching on live data

    Route graph edges based on JSON fields returned from Piloterr endpoints.

  • Human-in-the-loop

    Pause graphs for review after scrapes return sensitive or high-impact data.

  • LangChain compatible

    Reuse the same @tool wrappers you built for LangChain, drop them into LangGraph agents.

LangGraph + Piloterr patterns

Graph-based workflows for research, ops, and enrichment.

  • Research loops

    Agent iterates SERP and news scrapes until enough sources are gathered.

  • Enrichment pipelines

    Sequential graph: domain → company → LinkedIn → scored output.

  • Monitoring graphs

    Scheduled invocations compare scrape hashes and trigger alerts.

  • Tool-routing agents

    Supervisor node picks the right Piloterr API for each subtask.

LangGraph + Piloterr vs linear chains

ApproachDIYPiloterr
Linear LangChain chainFixed scrape orderDynamic tool routing
Raw fetch nodesBlocked on WAF sitesManaged bypass
Stateless scriptsNo retry / checkpointGraph checkpoints
HTML parsing nodesFragile selectorsStable JSON schemas

Connect LangGraph in four steps

  1. Step 1

    Install LangGraph

    pip install langgraph langchain-openai requests

  2. Step 2

    Get your API key

    Set PILOTERR_API_KEY in your environment.

    Get your API key
  3. Step 3

    Define Piloterr tools

    Create @tool functions that call REST endpoints, same pattern as LangChain.

  4. Step 4

    Build the graph

    Use create_react_agent or StateGraph with your tools and compile with a checkpointer.

Workflow recipes

  • Iterative SERP research

    Graph loops news + web search tools until the agent has enough citations.

  • Lead enrichment graph

    Branch on company size after domain scrape, route to different CRM fields.

  • Price monitor with HITL

    Scrape product pages, pause for human approval before sending Slack alerts.

  • Supervisor + worker scrapes

    Supervisor node assigns Amazon vs Walmart tools to worker sub-agents.

When to pick LangGraph vs LangChain

  • Scenario

    Multi-step loops and branching

    Recommendation: LangGraph

  • Scenario

    Simple single agent

    Recommendation: LangChain create_agent

  • Scenario

    Role-based multi-agent crews

    Recommendation: CrewAI

  • Scenario

    RAG indexing

    Recommendation: LlamaIndex

LangGraph ReAct agent example

A graph agent with a Google News tool backed by Piloterr.

Python
import os
import requests
from langchain.tools import tool

PILOTERR_KEY = os.environ["PILOTERR_API_KEY"]
BASE = "https://api.piloterr.com/v2"

@tool
def search_google_news(query: str, location: str = "Paris, FR") -> dict:
    """Search Google News for recent articles matching a query."""
    response = requests.post(
        f"{BASE}/google/news",
        headers={"x-api-key": PILOTERR_KEY, "Content-Type": "application/json"},
        json={"query": query, "location": location, "page": 1},
        timeout=60,
    )
    response.raise_for_status()
    return response.json()

Transparent credit pricing

Pay only for successful requests. Start with +500 credits, then scale with plans from $49/mo.

Premium

$49/mo

18,000 credits

Premium+

$99/mo

40,000 credits

Startup

$249/mo

110,000 credits

Ready to get started?

Your web scraping API is one click away. Start with +500 credits, no infrastructure to set up, no proxies to manage, and no credit card required.

Start free (+500 credits)