Metadata-Version: 2.4
Name: geonode-scraper-langchain
Version: 0.3.0
Summary: LangChain tools for the Geonode Scraper API
Author: Geonode Team
License-Expression: MIT
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Typing :: Typed
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: geonode-scraper-tools-core>=0.3.0
Requires-Dist: langchain-core>=1.0
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == "dev"
Requires-Dist: pytest-cov>=5.0; extra == "dev"
Requires-Dist: ruff>=0.12.11; extra == "dev"

# Geonode Scraper LangChain Tools

LangChain tools for the Geonode Scraper API.

This package depends on `geonode-scraper-tools-core` for the shared service,
schemas, and operation registry.

## Installation

```sh
pip install geonode-scraper-langchain
```

## Usage

```python
from geonode_scraper_langchain import build_langchain_tools
from geonode_scraper_tools_core import ScraperToolSettings

settings = ScraperToolSettings(
    host="https://api.example.com",
    api_key="your-api-key",
)

tools = build_langchain_tools(settings=settings)
```

## Selecting a Subset of Tools

Pass an `operations` list to expose only the tools you need.

```python
tools = build_langchain_tools(
    settings=settings,
    operations=["extract", "map_urls", "create_batch", "wait_for_batch"],
)
```

## Exposed Tools

**Extraction**
- `scraper_extract_content`
- `scraper_get_job_result`
- `scraper_wait_for_job`
- `scraper_list_jobs`

**Batch**
- `scraper_create_batch`
- `scraper_get_batch_status`
- `scraper_wait_for_batch`
- `scraper_list_batch_jobs`

**Crawl**
- `scraper_create_crawl`
- `scraper_get_crawl_status`
- `scraper_wait_for_crawl`
- `scraper_list_crawl_jobs`

**Map**
- `scraper_map_urls`
- `scraper_list_map_jobs`
- `scraper_get_map_job`

**Statistics & Health**
- `scraper_get_statistics`
- `scraper_check_health`
