🔌 Jagalayar API
REST-ish JSON API untuk integrasi monitoring domain TrustPositif/Komdigi, smart rotator anti-blokir, dan AI keyword sniffer. Cocok untuk integrasi dengan custom dashboard, automation tool, atau aplikasi pihak ketiga.
🔐 Authentication
Semua endpoint kecuali public rotator (/api/go.php) butuh API key di header:
Authorization: Bearer YOUR_API_KEY
Generate API key di Dashboard → API Shop. Key bersifat akun-spesifik dan tidak bisa di-share.
Jangan hardcode API key di client-side JavaScript. Gunakan backend proxy untuk panggil API ini, atau pakai server-side script (PHP/Node/Python).
📋 Rate Limiting
Limit per akun, scaling sesuai paket aktif:
| Tier | Limit Harian | Rate Per Menit |
|---|---|---|
| Free | 100 | 10 |
| Starter | 500 | 30 |
| Pro | 2.000 | 60 |
| Sultan | 10.000 | 120 |
Setiap response include header rate limit:
X-RateLimit-Limit: 2000
X-RateLimit-Remaining: 1872
X-RateLimit-Reset: 1714521600
Kalau lewat limit → response 429 Too Many Requests.
📦 Response Format
Success Response
{
"ok": true,
"data": { ... },
"meta": { "ts": "2026-04-21T12:34:56+07:00" }
}
Error Response
{
"ok": false,
"error": {
"code": "INVALID_DOMAIN",
"message": "Format domain tidak valid"
}
}
🛡️ Endpoints
GET 1. Check Nawala Status
Cek apakah domain kena blokir TrustPositif/Komdigi.
Endpoint: https://jagalayar.com/api/nawala_check.php?domain=example.com
Request:
curl -H "Authorization: Bearer YOUR_KEY" \
"https://jagalayar.com/api/nawala_check.php?domain=example.com"
Response 200:
{
"ok": true,
"data": {
"domain": "example.com",
"status": "SAFE",
"checked_at": "2026-04-21T12:34:56+07:00",
"request_id": "REQ-a3f9b1c2"
}
}
Status values:
SAFE— tidak di blocklistBLOCKED— kena Nawala/TrustPositifERROR— cek gagal (network/timeout issue)
GET 2. Rotator Redirect (Public)
Public endpoint (tanpa auth). Redirect ke URL target sesuai Smart Rules anda.
Endpoint: https://jagalayar.com/api/go.php?s={slug}
s — slug rotator (8 char alphanumeric).
Response:
- 302 Found dengan
Location:header ke target URL - Atau HTML interstitial kalau aktif FB/TikTok pixel
Cloaking Behavior:
- Bot (UA mengandung
bot,crawler,facebookexternal) → redirect kesafe_url - Human → ikuti Smart Rules (ISP/time/lang/weight)
POST 3. AI Keyword Sniffer
Analisa domain kompetitor — output top 3 keyword + sample ad copy via AI (LLM).
Endpoint: https://jagalayar.com/api/sniff_keywords.php
Request body:
{
"domain": "competitor.com"
}
Response 200:
{
"ok": true,
"data": {
"domain": "competitor.com",
"keywords": [
"keyword 1",
"keyword 2",
"keyword 3"
],
"ad_copy": "Sample ad headline yg di-generate AI...",
"confidence": 0.87
}
}
Endpoint ini consume credit AI (LLM call). Cek balance kredit sebelum bulk request. Rate-limited lebih ketat: 10 req/jam/akun.
⚠️ Error Codes
| HTTP | Code | Arti |
|---|---|---|
200 | — | OK |
400 | INVALID_INPUT | Format request salah (domain invalid, body malformed) |
401 | INVALID_API_KEY | API key kosong/salah/expired |
403 | QUOTA_EXCEEDED | Limit harian habis (upgrade plan) |
404 | NOT_FOUND | Resource tidak ditemukan |
429 | RATE_LIMITED | Lewat rate per menit |
500 | SERVER_ERROR | Internal error (laporkan ke support) |
💻 SDK & Code Examples
PHP
$apiKey = 'YOUR_API_KEY';
$ch = curl_init('https://jagalayar.com/api/nawala_check.php?domain=example.com');
curl_setopt_array($ch, [
CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . $apiKey],
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 10,
]);
$res = json_decode(curl_exec($ch), true);
curl_close($ch);
if ($res['ok'] ?? false) {
echo "Status: " . $res['data']['status'];
}
Python
import requests
api_key = 'YOUR_API_KEY'
r = requests.get(
'https://jagalayar.com/api/nawala_check.php',
headers={'Authorization': f'Bearer {api_key}'},
params={'domain': 'example.com'},
timeout=10,
)
data = r.json()
if data.get('ok'):
print('Status:', data['data']['status'])
Node.js
const apiKey = 'YOUR_API_KEY';
const res = await fetch(
'https://jagalayar.com/api/nawala_check.php?domain=example.com',
{ headers: { 'Authorization': `Bearer ${apiKey}` } }
);
const data = await res.json();
if (data.ok) {
console.log('Status:', data.data.status);
}
📝 Changelog
| Version | Date | Changes |
|---|---|---|
| v1.4 | 2026-04-21 | AI Keyword Sniffer endpoint baru |
| v1.3 | 2026-03-15 | Rate limit headers ditambah |
| v1.2 | 2026-02-01 | Smart Rotator dengan cloaking |
| v1.1 | 2026-01-10 | Bearer auth (sebelumnya query string) |
| v1.0 | 2025-12-01 | Initial release — Nawala check |