Skip to main content
A Node.js LangChain plugin that lets developers use Decodo’s Web Data API alongside their LangChain applications. Decodo LangChain tools work with any Web Data API plan. Free trials are available on the dashboard.
More information can be found on GitHub here.
Building in Python? See LangChain (Python), which also includes a document loader for RAG pipelines.

Features

  • Web scraping – scrape any URL and retrieve Markdown content
  • Google Search – search Google and retrieve structured results
  • Amazon Search – search Amazon and retrieve structured product data
  • Full TypeScript support – complete type definitions for all parameters
  • LangChain integration – seamless integration with LangChain’s tool system

Quick start

Prerequisites

  • Node.js >= v20
  • A Decodo Web Data API subscription
Installation:
Once you have a plan activated, copy your API key from the Web Data API playground. Older plans only have a generated username and password, which also work. To run the bundled sample agents:
  1. Clone the repo and install dependencies
  1. Copy .env.example to .env and fill in SCRAPER_API_KEY. On an older plan, fill in SCRAPER_API_USERNAME and SCRAPER_API_PASSWORD instead. The examples also read OPENAI_API_KEY.
  1. Run any of the sample agents
Skipping step 2 throws Decodo config requires either an apiKey or both a username and a password. as soon as a tool is constructed.
A simple agentic example:

Available tools

Configuration

All tools accept a DecodoConfig object holding either an API key (recommended) or, for older plans, a username and password:
It is one or the other. Passing both throws Decodo config accepts either apiKey or username and password, not both. Passing neither – or a username without a password – throws Decodo config requires either an apiKey or both a username and a password.
Under the hood the tools wrap the Decodo TypeScript SDK.

Parameters

Every tool accepts the same input schema. Parameter names are camelCase – jsRender, not JsRender.
Unknown fields are silently dropped, not rejected. Passing JsRender: true instead of jsRender: true raises no error – the field is stripped and JavaScript rendering never happens.

Values fixed by each tool

Each tool sets some parameters itself, after your input, so a value you pass for one of these is overwritten: In other words, decodo_universal_tool always returns Markdown, and the two search tools always return parsed results without JavaScript rendering. For the full list of API parameters, see Parameters.

Support

Need help or just want to say hello? Our support is available 24/7.
You can also reach us anytime via email at support@decodo.com.

Feedback

Can’t find what you’re looking for? Request an article!
Have feedback? Share your thoughts on how we can improve.