Web to APK Converter
This endpoint compiles an Android Application Package (APK) on the fly using a provided Website URL. It dynamically wraps the webpage inside an Android WebView, automatically attaching the provided App Name and Icon.
Endpoint
Section titled “Endpoint” POST
/api/v1/tools/web2apk Request Parameters
Section titled “Request Parameters”| Field | Type | Required | Description | Example |
|---|---|---|---|---|
website_url | string | Yes | The destination URL of the website. | https://heavstal.com.ng |
app_name | string | Yes | The name of the installed app. | Heavstal |
icon_url | string | Yes | Direct URL to an image to be used as the app icon. | https://example.com/logo.png |
package_name | string | No | Overrides the default android package name. | com.heavstal.app |
version_name | string | No | The display version (default: 1.0.0). | 1.0.0 |
version_code | number | No | Internal integer version (default: 1). | 1 |
Request Examples
Section titled “Request Examples”curl -X POST https://heavstal.com.ng/api/v1/tools/web2apk \-H "Content-Type: application/json" \-H "x-api-key: <YOUR_API_KEY>" \-d '{"website_url": "https://heavstal.com.ng","app_name": "Heavstal App","icon_url": "https://example.com/icon.png","version_name": "2.1.5","version_code": 14,"package_name": "com.mycustom.app"}'const response = await fetch('https://heavstal.com.ng/api/v1/tools/web2apk', { method: 'POST', headers: { 'Content-Type': 'application/json', 'x-api-key': '<YOUR_API_KEY>' }, body: JSON.stringify({"website_url": "https://heavstal.com.ng","app_name": "Heavstal App","icon_url": "https://example.com/icon.png","version_name": "2.1.5","version_code": 14,"package_name": "com.mycustom.app" })});
const res = await response.json();console.log("Download APK:", res.data.apk_url);import { tools } from '@heavstal/api';
const result = await tools.web2apk( "https://heavstal.com.ng", "Heavstal App", "https://example.com/icon.png", { version_name: "2.1.5", version_code: 14, package_name: "com.mycustom.app" });import requests
url = "https://heavstal.com.ng/api/v1/tools/web2apk"headers = { "Content-Type": "application/json", "x-api-key": "<YOUR_API_KEY>"}payload = {"website_url": "https://heavstal.com.ng","app_name": "Heavstal App","icon_url": "https://example.com/icon.png","version_name": "2.1.5","version_code": 14,"package_name": "com.mycustom.app"}
response = requests.post(url, headers=headers, json=payload)print(response.json()["data"]["apk_url"])Response Examples
Section titled “Response Examples”{ "status": "success", "creator": "HEAVSTAL TECH", "data": { "app_name": "Heavstal App", "package_name": "com.heavstalapp.app", "version": "1.0.0", "apk_url": "https://url.com/downloads/heavstalapp-1.0.0.apk" }}{ "error": "Failed to generate APK", "details": "A time-out error occurred while building the APK.", "status": 500}