Metadata-Version: 2.3
Name: langchain-scraperapi
Version: 0.1.0
Summary: An integration package connecting ScraperAPI and LangChain
License: MIT
Author: scraperapi
Requires-Python: >=3.9,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Dist: aiohttp (>=3.11.16,<4.0.0)
Requires-Dist: langchain (>=0.3.20,<0.4.0)
Requires-Dist: langchain-core (>=0.3.15,<0.4.0)
Requires-Dist: scraperapi-sdk (>=1.5.3,<2.0.0)
Project-URL: Repository, https://github.com/langchain-ai/langchain
Project-URL: Release Notes, https://github.com/langchain-ai/langchain/releases?q=tag%3A%22scraperapi%3D%3D0%22&expanded=true
Project-URL: Source Code, https://github.com/langchain-ai/langchain/tree/master/libs/partners/scraperapi
Description-Content-Type: text/markdown

# Langchain ScraperAPI Integration

This package contains the LangChain integration with ScraperAPI.

## Installation

```bash
pip install -U langchain-scraperapi
```

And you should configure credentials by setting the environment variable `SCRAPERAPI_API_KEY`.

## Tools

### ScraperAPITool

`ScraperAPITool` exposes the web scraping tool from ScraperAPI.

```python
from langchain_scraperapi import ScraperAPITool

tool = ScraperAPITool()
tool.invoke("url: http://example.com", "output_format": "markdown")
```

### ScraperAPIGoogleSearchTool

`ScraperAPIGoogleSearchTool` allows the scraping of Google search results in `json` or `csv` format.

```python
from langchain_scraperapi import ScraperAPIGoogleSearchTool

tool = ScraperAPIGoogleSearchTool()
tool.invoke("query": "What is ScraperAPI?")
```

### ScraperAPIAmazonSearchTool

`ScraperAPIAmazonSearchTool` allows the scraping of Amazon search results in `json` or `csv` format.

```python
from langchain_scraperapi import ScraperAPIAmazonSearchTool

tool = ScraperAPIAmazonSearchTool()
tool.invoke("query": "office chairs", "output_format": "csv")
```

For a full list of parameters and more information, refer to the ScraperAPI Python docs: https://docs.scraperapi.com/python/making-requests/structured-data-collection-method
