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

@enconvert/sdk

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

@enconvert/sdk

JavaScript / TypeScript SDK for the Enconvert file conversion API

latest
Source
npmnpm
Version
0.0.1
Version published
Maintainers
1
Created
Source

enconvert

JavaScript / TypeScript SDK for the Enconvert file conversion API.

Convert URLs to PDFs, capture screenshots, transform images, and convert documents — all with a single API call. Node 18+.

Install

npm install enconvert

Quick Start

import { Enconvert } from "enconvert";

const client = new Enconvert({ apiKey: "sk_..." });

URL to PDF

const result = await client.convertUrlToPdf("https://example.com", {
  saveTo: "page.pdf",
});
console.log(result.presignedUrl);

URL to Screenshot

const result = await client.convertUrlToScreenshot("https://example.com", {
  viewportWidth: 1440,
  saveTo: "screenshot.png",
});

URL to Markdown

Extract clean GitHub-Flavored Markdown from any URL — strips nav/footer/ads/scripts, keeps the main article content, and adds YAML frontmatter (title, description, url, links, images).

const result = await client.convertUrlToMarkdown("https://example.com/article", {
  saveTo: "article.md",
});

Image Conversion

const result = await client.convertImage("photo.heic", {
  outputFormat: "webp",
  saveTo: "photo.webp",
});

Supported formats: jpeg, png, svg, heic, webp

Document Conversion

await client.convertDocument("report.docx", { saveTo: "report.pdf" });
await client.convertDocument("data.json", { outputFormat: "yaml", saveTo: "data.yaml" });

Supported inputs: doc/docx, xls/xlsx, ppt/pptx, html, odt, ods, odp, epub, markdown, csv, json, xml, yaml, toml

Job Status (async polling)

const status = await client.getJobStatus("job_abc123");
if (status.status === "success") {
  console.log(status.presignedUrl);
}

PDF Options

const result = await client.convertUrlToPdf("https://example.com", {
  pdfOptions: {
    pageSize: "A4",
    orientation: "landscape",
    margins: { top: 10, bottom: 10, left: 15, right: 15 },
  },
  saveTo: "report.pdf",
});

Error Handling

import { Enconvert, AuthenticationError, RateLimitError, APIError } from "enconvert";

try {
  await client.convertUrlToPdf("https://example.com");
} catch (e) {
  if (e instanceof AuthenticationError) console.error("Invalid API key");
  else if (e instanceof RateLimitError) console.error("Too many requests — slow down");
  else if (e instanceof APIError) console.error(`API error [${e.statusCode}]: ${e.message}`);
  else throw e;
}

Configuration

const client = new Enconvert({
  apiKey: "sk_...",
  timeout: 300_000, // ms, default
});

Get an API Key

Sign up at enconvert.com to get your API key.

License

MIT

Keywords

enconvert

FAQs

Package last updated on 27 Apr 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts