Repository
v4 · REST

API Docs

Akses script langsung dari terminal, otomasi, atau aplikasi Anda. Endpoint publik tanpa autentikasi — cukup HTTP GET.

Base URL
https://exsalacode.web.id
GET /raw/:slug Public

Return raw text/plain dari sebuah script. Cocok untuk curl | bash atau di-fetch dari script lain.

# Fetch raw code
curl https://exsalacode.web.id/raw/my-script

# Pipe ke node
curl -s https://exsalacode.web.id/raw/my-script | node

# Save ke file
curl -s https://exsalacode.web.id/raw/my-script -o script.js

Response headers include X-Script-Title, X-Script-Author, X-Script-Locked (1 jika encrypted).

GET /api/list Public

Daftar semua script yang tersedia (live mirror dari Pastebin, cache 60 detik).

curl https://exsalacode.web.id/api/list

Response:

{
  "status": true,
  "data": [
    {
      "id": "tiktok-watermark",
      "slug": "tiktok-watermark",
      "filename": "tiktok-watermark.js",
      "title": "TikTok Watermark Remover",
      "desc": "Quick scraper for tiktok cdn",
      "author": "ExsalaCode",
      "type": "js",
      "views": 142,
      "likes": 18,
      "isLocked": false,
      "created_at": 1700000000000
    }
  ]
}

Append ?refresh=1 untuk bypass cache (tidak direkomendasikan untuk production).

GET /files/:filename Public

Halaman HTML dengan code viewer, syntax highlight, copy button, dan komentar. Untuk konsumsi programmatic, pakai /raw/:slug.

open https://exsalacode.web.id/files/my-script.js
GET /feed.xml Public

RSS 2.0 feed berisi 50 script terbaru. Subscribe di Feedly, Inoreader, atau RSS reader favorit Anda.

curl https://exsalacode.web.id/feed.xml
Integration Examples

Langsung di-fetch dari kode Anda:

Node.js / Bun:

const code = await fetch('https://exsalacode.web.id/raw/my-script')
  .then(r => r.text());

eval(code); // ⚠ jangan jalanin code yang gak Anda kontrol

Python:

import requests

code = requests.get('https://exsalacode.web.id/raw/my-script').text
exec(code)

Browser fetch (CORS):

const list = await fetch('https://exsalacode.web.id/api/list')
  .then(r => r.json());
console.table(list.data);
Error Codes
Code Meaning
404Script tidak ditemukan
429Rate limit (30/min/IP per endpoint)
403Bot/automation tool blocked or IP banned
500Pastebin/Redis error
503Pastebin source unreachable
Apa yang sync dengan Pastebin?
Aksi Hasil
Post script baru via web → Otomatis dibuat di akun Pastebin Anda (unlisted), metadata di Redis
Post baru langsung di pastebin.com → Otomatis muncul di web max 60 detik (live mirror)
Edit via web → Paste lama di Pastebin dihapus, paste baru dibuat. URL web (slug) tetap stabil.
Hapus via web → Paste juga dihapus dari Pastebin Anda (kalau username/password ter-set di env)
Hapus langsung di pastebin.com → Setelah max 60 detik tidak muncul di web (cache expire)
Encrypt via web (set password) → Konten di Pastebin sudah berupa AES cipher. Web minta password untuk decrypt. Pastebin sendiri tidak punya fitur password.
Like / Unlike → Hanya di Redis (Pastebin tidak punya fitur like)
Comment → Hanya di Redis (Pastebin tidak punya fitur comment)
Views counter → Web tracking sendiri, plus sync dari Pastebin hits counter (mengambil maksimumnya)

TL;DR: Pastebin = source of truth untuk source code. Redis = source of truth untuk semua interaksi sosial (like, comment, views).

Built by Gienetic · Pastebin · Upstash Redis