Skip to main content
The Olostep LangChain integration provides comprehensive tools to build AI agents that can search, scrape, analyze, and structure data from any website. Perfect for LangChain and LangGraph applications. Olostep is listed in LangChain’s docs, on the integrations page and in the Search and Web browsing tables of the tools page.

Features

The integration provides access to all 6 Olostep API capabilities:

Scrapes

Extract content from any single URL in multiple formats (Markdown, HTML, JSON, text)

Searches

Search the web and get each result’s URL, title and description, with optional page content as markdown

Batches

Process up to 100,000 URLs in parallel. Batch jobs complete in up to 20-25 minutes

Answers

AI-powered web search with natural language queries and structured output

Maps

Extract all URLs from a website for site structure analysis

Crawls

Autonomously discover and scrape entire websites by following links

Installation

Setup

Set your Olostep API key as an environment variable:
Get your API key from the Olostep Dashboard.

Available Tools

scrape_website

Extract content from a single URL. Supports multiple formats and JavaScript rendering.
string
required
Website URL to scrape (must include http:// or https://)
string
default:"markdown"
Output format: markdown, html, json, or text
string
Country code for location-specific content (e.g., “US”, “GB”, “CA”)
integer
Wait time in milliseconds for JavaScript rendering (0-10000)
string
Optional parser ID for specialized extraction (e.g., “@olostep/amazon-product”)
integer
default:"20000"
Maximum characters of content returned. Longer pages are cut and marked with truncated and full_length; the full page is at the <format>_url link

scrape_batch

Process multiple URLs in parallel (up to 100,000 at once).
array
required
List of URLs to scrape
string
default:"markdown"
Output format for all URLs: markdown, html, json, or text
string
Country code for location-specific content
integer
Wait time in milliseconds for JavaScript rendering
string
Optional parser ID for specialized extraction

get_batch_results

Get the content of a batch’s pages, a set at a time. If the batch is still running, it returns the status so the agent can call again later.
string
required
The batch_id returned by scrape_batch
string
default:"markdown"
Content format: markdown, html, json, or text
integer
default:"20"
Pages per call, from 1 to 100
integer
default:"0"
Pass next_cursor from the previous call while has_more is true
integer
default:"20000"
Maximum characters of content per page. Longer pages are cut and marked with truncated and full_length

search_web

Search the web when you don’t have a URL yet. Returns each result’s URL, title and description. With scrape_results, each result also includes the page content as markdown, so the agent can read the pages without a separate scrape.
string
required
What to search for, in natural language
integer
default:"5"
Number of results, from 1 to 25
array
Only return results from these domains, e.g. ["docs.python.org"]
array
Never return results from these domains
boolean
default:"false"
Also return each result’s content as markdown. Each scraped page uses extra credits
integer
default:"20000"
Maximum characters of markdown kept per page. Longer pages are cut and marked with truncated and full_length
See Search for pricing and the full API.

answer_question

Search the web and get AI-powered answers with sources. Perfect for data enrichment and research.
string
required
Question or task to search for
object
Optional JSON schema dict/string describing desired output format

extract_urls

Extract all URLs from a website for site structure analysis.
string
required
Website URL to extract URLs from
string
Optional search query to filter URLs
integer
Limit the number of URLs returned
array
Glob patterns to include (e.g., [“/blog/**”])
array
Glob patterns to exclude (e.g., [“/admin/**”])

crawl_website

Autonomously discover and scrape entire websites by following links.
string
required
Starting URL for the crawl
integer
default:"100"
Maximum number of pages to crawl
array
Glob patterns to include (e.g., [”/**”] for all)
array
Glob patterns to exclude (e.g., [“/admin/**”])
integer
Maximum depth to crawl from start_url
boolean
default:"false"
Include external URLs

get_crawl_results

Get the content of the pages a crawl found, a set at a time. If the crawl is still running, it returns the status so the agent can call again later.
string
required
The crawl_id returned by crawl_website
string
default:"markdown"
Content format: markdown, html, json, or text
integer
default:"20"
Pages per call, from 1 to 100
integer
default:"0"
Pass next_cursor from the previous call while has_more is true
integer
default:"20000"
Maximum characters of content per page. Longer pages are cut and marked with truncated and full_length

LangChain Agent Integration

Build intelligent agents that can search and scrape the web:

LangGraph Integration

Build complex multi-step workflows with LangGraph:

Advanced Use Cases

Data Enrichment

Enrich spreadsheet data with web information:

E-commerce Product Scraping

Scrape product data with specialized parsers:

SEO Audit

Analyze entire websites for SEO:

Documentation Scraping

Crawl and extract documentation:

Specialized Parsers

Olostep provides pre-built parsers for popular websites:
  • @olostep/google-search - Google search results
Use them with the parser parameter:

Error Handling

Best Practices

When scraping more than 3-5 URLs, use scrape_batch instead of multiple scrape_website calls. Batch processing is much faster and more cost-effective.
For JavaScript-heavy sites, use wait_before_scraping parameter (2000-5000ms is typical). This ensures dynamic content is fully loaded.
For popular websites (Amazon, LinkedIn, Google), use our pre-built parsers to get structured data automatically.
When using extract_urls or crawl_website, use glob patterns to focus on relevant pages and avoid unnecessary processing.
Implement exponential backoff for rate limit errors. The API automatically handles most rate limiting internally.

Support

Scrapes API

Learn about the Scrapes endpoint

Batches API

Learn about the Batches endpoint

Answers API

Learn about the Answers endpoint

Maps API

Learn about the Maps endpoint

Crawls API

Learn about the Crawls endpoint

Python SDK

Explore the Python SDK

LangChain Website

LangChain platform