🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@metalift/sdk

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@metalift/sdk - npm Package Compare versions

Comparing version
1.0.0
to
1.0.1
+61
README.md
# @metalift/sdk
Official TypeScript/JavaScript SDK for [Metalift](https://app.metalift.ai) — turn any URL into agent-ready markdown, HTML, or structured data.
## Requirements
- **Node.js 20+**
- **ESM only** — use `import`, not `require()`
## Install
```bash
npm install @metalift/sdk
```
## Quick start
```javascript
import Metalift from "@metalift/sdk";
const client = new Metalift({ apiKey: "YOUR_API_KEY" });
const result = await client.scrape({
url: "https://example.com",
formats: ["markdown"],
});
console.log(result.data.markdown);
```
Get an API key from the [Metalift dashboard](https://app.metalift.ai/dashboard/keys).
## Configuration
```javascript
import Metalift from "@metalift/sdk";
const client = new Metalift({
apiUrl: "https://api.metalift.ai", // default
apiKey: process.env.METALIFT_API_KEY,
});
```
| Variable | Description |
|----------|-------------|
| `METALIFT_API_URL` | API base URL (default: `https://api.metalift.ai`) |
| `METALIFT_API_KEY` | Bearer token for authenticated requests |
## CommonJS projects
This package is ESM-only. In CommonJS projects, use dynamic import:
```javascript
const { default: Metalift } = await import("@metalift/sdk");
```
Or add `"type": "module"` to your `package.json`, or use `.mjs` entry files.
## Links
- [Documentation](https://app.metalift.ai/docs)
- [Support](mailto:support@metalift.ai)
+1
-1

@@ -5,3 +5,3 @@ export class Metalift {

constructor(config = {}) {
this.apiUrl = (config.apiUrl || process.env.METALIFT_API_URL || "http://localhost:8080").replace(/\/$/, "");
this.apiUrl = (config.apiUrl || process.env.METALIFT_API_URL || "https://api.metalift.ai").replace(/\/$/, "");
this.apiKey = config.apiKey || process.env.METALIFT_API_KEY;

@@ -8,0 +8,0 @@ }

{
"name": "@metalift/sdk",
"version": "1.0.0",
"version": "1.0.1",
"description": "Metalift TypeScript SDK",

@@ -11,8 +11,5 @@ "license": "SEE LICENSE IN LICENSE",

"build": "tsc",
"prepublishOnly": "npm run build"
"prepublishOnly": "npm run build && node ../../scripts/npm-prepare-publish.mjs strip",
"postpublish": "node ../../scripts/npm-prepare-publish.mjs restore"
},
"devDependencies": {
"@types/node": "^22.10.2",
"typescript": "^5.7.2"
},
"engines": {

@@ -28,3 +25,5 @@ "node": ">=20"

"files": [
"dist"
"dist",
"README.md",
"LICENSE"
],

@@ -31,0 +30,0 @@ "repository": {