Skip to main content
Oxylabs is a market-leading web intelligence collection platform, driven by the highest business, ethics, and compliance standards, enabling companies worldwide to unlock data-driven insights.

Overview

This package contains the LangChain integration with Oxylabs, providing tools to scrape Google search results with Oxylabs Web Scraper API using LangChain’s framework. The following classes are provided by this package:
  • OxylabsSearchRun - A tool that returns scraped Google search results in a formatted text
  • OxylabsSearchResults - A tool that returns scraped Google search results in a JSON format
  • OxylabsSearchAPIWrapper - An API wrapper for initializing Oxylabs API
Pricing
✅ Free 5,000 results for 1 week

Setup

Install the required dependencies.

Credentials

Set up the proper API keys and environment variables. Create your API user credentials: Sign up for a free trial or purchase the product in the Oxylabs dashboard to create your API user credentials (OXYLABS_USERNAME and OXYLABS_PASSWORD).

Instantiation

Invocation

Invoke directly with args

The OxylabsSearchRun tool takes a single “query” argument, which should be a natural language query and returns combined string format result:

Invoke with ToolCall

Use within an agent

Install the required dependencies.

JSON results

OxylabsSearchResults tool can be used as an alternative to OxylabsSearchRun to retrieve results in a JSON format:

API reference

More information about this integration package can be found here: github.com/oxylabs/langchain-oxylabs Oxylabs Web Scraper API documentation: developers.oxylabs.io/scraper-apis/web-scraper-api