Metadata-Version: 2.4
Name: metalift-langchain
Version: 1.0.3
Summary: LangChain tools for the Metalift web context API
Author-email: Metalift <support@metalift.ai>
License-Expression: LicenseRef-Proprietary
Project-URL: Homepage, https://metalift.ai
Project-URL: Documentation, https://metalift.ai/docs
Project-URL: Repository, https://github.com/Endacoder/scraper-mcp
Project-URL: Issues, https://github.com/Endacoder/scraper-mcp/issues
Project-URL: Changelog, https://github.com/Endacoder/scraper-mcp/releases
Keywords: metalift,langchain,scraping,agents,tools
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: langchain-core>=0.3.0
Requires-Dist: metalift-sdk<2,>=1.0.0
Dynamic: license-file

# Metalift LangChain integration

LangChain tools for [Metalift](https://app.metalift.ai) — a hosted web context API that turns URLs into LLM-ready markdown for agents. This package wraps the Metalift REST API; it does not use `@langchain/community` `RecursiveUrlLoader` or any local server-side HTTP fetch of user-supplied URLs.

## Get an API key

1. [Sign up for Metalift Cloud](https://app.metalift.ai/signup) and verify your email.
2. Complete onboarding on the [dashboard](https://app.metalift.ai/dashboard).
3. Copy your API key from [Dashboard → API keys](https://app.metalift.ai/dashboard/keys).

New accounts receive **1,000 free credits/month** on the Free tier. Use the hosted API at `https://api.metalift.ai`, or point `api_url` at your own self-hosted scrape API.

Do not commit API keys into source code — pass them at runtime or via the `METALIFT_API_KEY` environment variable.

## Security

- All URL fetching runs on the Metalift scrape API with SSRF guards: manual redirect validation, private/metadata IP blocklist, DNS pinning, and Playwright egress isolation.
- Do **not** use LangChain's built-in `RecursiveUrlLoader` (or similar loaders with automatic redirect following) for untrusted URLs — see [CVE-2026-27795](https://cvereports.com/reports/CVE-2026-27795) and [Metalift security](../../docs/security.md).

## Usage

```bash
pip install metalift-langchain
```

```python
from metalift_langchain import get_metalift_tools

tools = get_metalift_tools(api_url="https://api.metalift.ai", api_key="YOUR_API_KEY")
```

Requires the `metalift-sdk` package and a reachable Metalift scrape API.

## Links

- [Documentation](https://app.metalift.ai/docs)
- [Getting started](https://app.metalift.ai/docs/getting-started)
- [Support](mailto:support@metalift.ai)
