DEV Community

siddharth hariramani
siddharth hariramani

Posted on

Free TeraBox API — Stream TeraBox Videos Programmatically

Free TeraBox API — Stream TeraBox Videos Programmatically

PlayTeraBox provides a free, unofficial TeraBox streaming API that any developer can use without authentication.

Base URL

https://playterabox.online
Enter fullscreen mode Exit fullscreen mode

Endpoints

1. Extract Stream URL

GET /api/extract?url={terabox_share_url}
Enter fullscreen mode Exit fullscreen mode

Example:

curl "https://playterabox.online/api/extract?url=https://1024terabox.com/s/example"
Enter fullscreen mode Exit fullscreen mode

Response:

{
  "success": true,
  "title": "Video Title",
  "thumbnail": "https://...",
  "streams": {
    "hls": "https://...m3u8",
    "mp4": "https://...mp4"
  }
}
Enter fullscreen mode Exit fullscreen mode

2. Direct Stream

GET /api/stream?url={terabox_share_url}
Enter fullscreen mode Exit fullscreen mode

Redirects directly to the HLS stream. Use this in <video> tags or HLS.js.

JavaScript Example

async function getTeraBoxStream(teraboxUrl) {
  const res = await fetch(
    `https://playterabox.online/api/extract?url=${encodeURIComponent(teraboxUrl)}`
  );
  const data = await res.json();
  return data.streams.hls; // HLS stream URL
}

// Usage with HLS.js
const streamUrl = await getTeraBoxStream('https://1024terabox.com/s/...');
const hls = new Hls();
hls.loadSource(streamUrl);
hls.attachMedia(videoElement);
Enter fullscreen mode Exit fullscreen mode

Python Example

import requests

def get_terabox_stream(terabox_url: str) -> str:
    response = requests.get(
        'https://playterabox.online/api/extract',
        params={'url': terabox_url}
    )
    data = response.json()
    return data['streams']['hls']

# Usage
stream_url = get_terabox_stream('https://1024terabox.com/s/...')
print(stream_url)  # Returns HLS stream URL
Enter fullscreen mode Exit fullscreen mode

Free Tier Limits

  • 1,000 requests/day per IP
  • No API key required
  • No rate limiting for reasonable use

Embed Widget

You can also embed TeraBox videos on any website:

<iframe 
  src="https://playterabox.online/embed?url=YOUR_TERABOX_URL"
  width="100%" height="480" frameborder="0" allowfullscreen>
</iframe>
Enter fullscreen mode Exit fullscreen mode

Useful Links

Free for non-commercial use. Please don't abuse the API.

Top comments (0)