Developer Documentation
Build With Transparent Links
Integrate linktowebpage.com into your applications with simple, copy-paste code snippets. No API keys required.
JavaScript
Generate transparent links in the browser or Node.js. Works with any JavaScript runtime.
linktowebpage.js
/**
* Creates a transparent linktowebpage.com URL
* @param {string} targetUrl - The destination URL
* @returns {string} The transparent link
*/
function createTransparentLink(targetUrl) {
// Remove protocol prefix for cleaner URLs
let cleanUrl = targetUrl
.replace(/^https?:\/\//, '');
return `https://linktowebpage.com/${cleanUrl}`;
}
// Example usage
const originalUrl = 'https://example.com/my-page';
const transparentLink = createTransparentLink(originalUrl);
console.log(transparentLink);
// Output: https://linktowebpage.com/example.com/my-page
Python
Generate transparent links in Python scripts, Django, Flask, or any Python application.
linktowebpage.py
import re
from urllib.parse import urlparse
def create_transparent_link(target_url: str) -> str:
"""
Creates a transparent linktowebpage.com URL.
Args:
target_url: The destination URL
Returns:
The transparent link URL
"""
# Remove protocol prefix for cleaner URLs
clean_url = re.sub(r'^https?://', '', target_url)
return f'https://linktowebpage.com/{clean_url}'
# Example usage
if __name__ == '__main__':
original_url = 'https://example.com/my-page'
transparent_link = create_transparent_link(original_url)
print(transparent_link)
# Output: https://linktowebpage.com/example.com/my-page
URL Format Reference
How transparent links work under the hood
REDIRECT
https://linktowebpage.com/{target}
Any path after the domain is used as the redirect target. The service performs an instant redirect to the specified URL.
| Component | Description | Example |
|---|---|---|
{target} |
The destination URL without protocol | example.com/page |
| Full Link | Complete transparent link | https://linktowebpage.com/example.com/page |
| Redirects To | Final destination (https assumed) | https://example.com/page |