metalift-sdk
Official Python SDK for Metalift — turn any URL into agent-ready markdown, HTML, or structured data.
Install
pip install metalift-sdk
Requires Python 3.10+.
Quick start
from metalift_sdk import Metalift
client = Metalift(api_key="YOUR_API_KEY")
result = client.scrape(
"https://example.com",
formats=["markdown"],
)
print(result["data"]["markdown"])
Get an API key from the Metalift dashboard. New accounts receive 1,000 free credits/month.
Web search (decoupled from scrape)
Search returns top 10 SERP snippets (2 credits). See Release notes for availability on Metalift Cloud.
serp = client.search("docker docs")
page = client.scrape(serp["results"][0]["url"], formats=["markdown"])
If search returns Not Found on api.metalift.ai, upgrade to metalift-sdk>=1.0.6 for a clearer error message.
Agents / MCP
REST batch / crawl below match MCP tools metalift_batch_scrape / metalift_crawl (API key). Keyless agents: Agentic Wallet or Charge-over-MCP https://mcp.metalift.ai/sse (@metalift/mcp ≥ 1.0.19 on the host). Do not mix wallet + Metalift MCP for the same job.
Configuration
from metalift_sdk import Metalift
client = Metalift(
api_url="https://api.metalift.ai", # default
api_key="YOUR_API_KEY",
timeout=60.0,
)
Environment variables are also supported:
| Variable | Description |
|---|---|
METALIFT_API_URL |
API base URL (default: https://api.metalift.ai) |
METALIFT_API_KEY |
Bearer token for authenticated requests |
Metalift Cloud requires X-B2B-Attestation: I-confirm-B2B-use on authenticated requests. metalift-sdk ≥ 1.0.11 sends this header automatically.
API
Scrape
client.scrape(
"https://example.com",
formats=["markdown"],
render="auto",
only_main_content=True,
strategy="default",
)
Batch scrape
client.batch(
["https://example.com", "https://example.org"],
async_=True,
scrape_options={"formats": ["markdown"]},
)
Crawl and map
crawl_job = client.crawl("https://example.com", limit=50)
map_result = client.map("https://example.com", limit=100)
Async jobs
job = client.crawl("https://example.com", limit=20)
completed = client.wait_for_job(job["job_id"])
print(completed["status"], completed.get("data"))
Strategies and protected sites
strategies = client.list_strategies()
protection = client.list_protection_types()
client.scrape(
"https://www.walmart.com/ip/EXAMPLE",
strategy="retail",
formats=["markdown"],
)
client.fetch_session(url="https://www.walmart.com/", domain="www.walmart.com")
Session cookies
client.seed_session(
domain="example.com",
cookies=[{"name": "session", "value": "...", "domain": "example.com", "path": "/"}],
)
Errors
API failures raise MetaliftError:
from metalift_sdk import Metalift, MetaliftError
try:
client.scrape("https://example.com")
except MetaliftError as exc:
print(exc.status_code, exc.detail)
Links
License & distribution
metalift-sdk is proprietary software licensed under the terms in LICENSE. Use, copying, modification, and redistribution are not permitted except as expressly authorized by Metalift.
The package is published on the public Python Package Index (PyPI) so customers can install it with pip install metalift-sdk. Publishing on PyPI does not make the software open source: the wheel and source archive are publicly downloadable, but legal use remains governed by the proprietary license.
Do not commit API keys or other credentials into your application code. Pass them at runtime via the api_key argument or the METALIFT_API_KEY environment variable.
Metadata
Release files for metalift-sdk 1.0.13
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| metalift_sdk-1.0.13.tar.gz | 8.6 kB | Without provenance | Details for metalift_sdk-1.0.13.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| metalift_sdk-1.0.13-py3-none-any.whl | Python 3 | none | any | Details for metalift_sdk-1.0.13-py3-none-any.whl |
Total release size: 17.5 kB
Release files / metalift_sdk-1.0.13.tar.gz
| Download URL | metalift_sdk-1.0.13.tar.gz |
|---|---|
| Size | 8.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ba8e39d07cc50248a80dbfc8e01364c22f761d8a3f5de4558233092913724117
|
|
BLAKE2b-256 checksum How to use checksums |
aebf9bf309495d39cb9371e6282f53f480cc5daf8a02af1c680b8655d817cba8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / metalift_sdk-1.0.13-py3-none-any.whl
| Download URL | metalift_sdk-1.0.13-py3-none-any.whl |
|---|---|
| Size | 8.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c8bf9d589987b572792a80f622b371dd88e45adce894f89ecab0844926fd784c
|
|
BLAKE2b-256 checksum How to use checksums |
d40982ef8f6d5fdb5810233245d057b37e319a44c4a8693aeba909a75aec3775
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Security for metalift-sdk 1.0.13
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.