Skip to content

@heavstal/api

NPM VersionTest StatusLicense

A zero-dependency multi-purpose SDK client for interacting with Heavstal Tech APIs.


Install the Heavstal API SDK using your preferred package manager:

Terminal window
npm i @heavstal/api

To use this SDK, you must have a valid API Key from the Heavstal Tech Credentials dashboard. The SDK supports two methods of authentication.

Section titled “Method 1: Environment Variable (Recommended)”

The SDK will automatically detect your API key if it is set in your environment variables. This keeps your credentials secure and out of your source code.

  1. Create a .env file in the root of your project.
  2. Add your API key to the file:
    .env
    HEAVSTAL_API_KEY=ht_live_your_api_key_here
  3. Initialize the SDK without passing any configuration.

If you prefer not to use environment variables, or if you need to switch keys dynamically at runtime, you can pass a configuration object as the final argument to any function.

index.js
import { downloader } from '@heavstal/api';
const config = { apiKey: "ht_live_your_api_key_here" };
// Pass the config object as the final argument
const result = await downloader.tiktok("https://vt.tiktok.com/...", config);

This library is a hybrid module, meaning it seamlessly supports both ES Modules (import) and CommonJS (require).

// Import categorical classes
import { downloader, search, tools, ai, movies } from '@heavstal/api';
// Or import specific standalone methods for tree-shaking
import { tiktok, apk, unzip } from '@heavstal/api';

Every method in the @heavstal/api SDK maps directly to a Heavstal REST API endpoint. For detailed information on available parameters, success responses, and error handling for each method, please refer to the specific API documentation pages, here are some:


This project is licensed under the MIT License.

If you encounter any issues, experience rate-limiting, or need to upgrade your API tier, please refer to the following resources: