API Documentation

Integrate TeraBox features into your applications.

Back to Player
POST /api/download | GET

1. Get File Information

Retrieves metadata, thumbnails, and direct download links (dlink) for files.

Request Parameters (JSON Payload or Query Params)

Field Type Required Description
url string Yes The TeraBox share URL.
cookies string No Netscape formatted cookies (optional).

Request Examples

Method A: POST (Payload)

{
  "url": "https://terabox.com/s/1A2b3C...",
  "cookies": "# Netscape HTTP Cookie File..."
}

Method B: GET (URL)

// Standard
/api/download?url=https://terabox.com/s/1A2b3C...

// With Cookies (URLEncoded)
/api/download?url=...&cookies=%23%20Netscape...

Response Example

// 200 OK
{
  "status": "success",
  "ShortLink": "https://terabox.com/s/...",
  "cookie_used": true,
  "Extracted Info": [
    {
      "Title": "video.mp4",
      "Size": "150 MB",
      "Direct Download Link": "https://d.terabox.app/...",
      "streaming_url": "https://...",
      "Thumbnails": { ... }
    }
  ]
}
POST /api/play | GET

2. Get Streaming Information

Optimized endpoint specifically for video players to get the m3u8 playlist URL.

Request Parameters

Field Type Required Description
url string Yes The TeraBox share URL.
cookies string No Netscape formatted cookies (optional).

Request Examples

Method A: POST (Payload)

{
  "url": "https://terabox.com/s/1A2b3C...",
  "cookies": "# Netscape HTTP Cookie File..."
}

Method B: GET (URL)

// Standard
/api/play?url=https://terabox.com/s/1A2b3C...

// With Cookies (URLEncoded)
/api/play?url=...&cookies=%23%20Netscape...

Response Example

// 200 OK
{
  "ok": true,
  "list": [
    "https://ab-m3u8.terabox.com/..." // The .m3u8 URL
  ],
  "token": "..."
}
GET /proxy

3. Universal Proxy

Acts as a bridge to stream TeraBox content. Requires url and optionally cookies. It injects the required Referer headers that standard players cannot add.

Request Parameters (Query)

Param Required Description
url Yes The Target URL (dlink or m3u8) obtained from API #1 or #2.
cookies No Base64 encoded Netscape cookies. If missing, it falls back to Server Internal Cookies.

Request Examples (GET)

// Simple (Uses Internal Cookies)
/proxy?url=https://d.terabox.app/file/...

// Advanced (With Custom Cookies)
/proxy?url=https://...&cookies=TXkgQ29va2llc...

Usage format

// Construct the URL like this:
http://your-server.com/proxy?url=ENCODED_TARGET_URL&cookies=BASE64_COOKIES