Skip to main content

LangChain tools for the Metalift web context API

Project description

Metalift LangChain integration

LangChain tools for Metalift — 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 and verify your email.
  2. Complete onboarding on the dashboard.
  3. Copy your API key from Dashboard → API 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 and Metalift security.

Usage

pip install metalift-langchain
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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

metalift_langchain-1.0.1.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

metalift_langchain-1.0.1-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file metalift_langchain-1.0.1.tar.gz.

File metadata

  • Download URL: metalift_langchain-1.0.1.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for metalift_langchain-1.0.1.tar.gz
Algorithm Hash digest
SHA256 855ae0ced13e52120fee71698d414747b1789e19739dd8c1a4a35b5ef9035188
MD5 3267f328a1924638f0d1c5965295dca1
BLAKE2b-256 11dd7f128f69bf58b6b7d3e63b0266032e91bd8cbce2832f756844b72cdc3181

See more details on using hashes here.

File details

Details for the file metalift_langchain-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for metalift_langchain-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fe235cc5a7198675faf214b8125097781b15c708f5d570f71adbc17fc4bf1923
MD5 9c179c0c90d1562e27ab7c691c2be900
BLAKE2b-256 7df7e55fe66611b45d2aff762192b3213039ddae28fa0aad66753f4353dc1a44

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page