API Documentation
API documentation for Yearly Premium subscribers. Two read-only APIs: Ghost Content API (CRPG article archive) and regulationvault (Indonesian regulation search). Subject to the terms of use.
Authentication
You receive two keys when your yearly subscription is provisioned:
- Ghost Content API key — 26-character alphanumeric key, passed as the
keyquery parameter. - regulationvault token — string starting with
crpg_, passed as an HTTPAuthorization: Bearerheader.
Ghost Content API
Base URL: https://crpg.info/ghost/api/content/
List recent posts
curl "https://crpg.info/ghost/api/content/posts/?key=YOUR_CONTENT_KEY&limit=10"
Single post by slug
curl "https://crpg.info/ghost/api/content/posts/slug/some-article-slug/?key=YOUR_CONTENT_KEY"
Full Ghost Content API documentation: ghost.org/docs/content-api/.
regulationvault API
Base URL: https://cloud.crpg.info/regvault/
All endpoints accept POST with a JSON body. Rate limits: 2,000 requests / day and 30 requests / minute per token. Over-limit responses return HTTP 429 with a Retry-After header.
Search regulations
curl -X POST \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"query":"water resources","limit":10}' \
"https://cloud.crpg.info/regvault/search_regulations"
Get one regulation
curl -X POST \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"regulation_id":"KEPPRES_1_2023"}' \
"https://cloud.crpg.info/regvault/get_regulation"
Get one article within a regulation
curl -X POST \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"regulation_id":"KEPPRES_1_2023","article_number":5}' \
"https://cloud.crpg.info/regvault/get_article"
Search inside one regulation
curl -X POST \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"regulation_id":"KEPPRES_1_2023","query":"irrigation"}' \
"https://cloud.crpg.info/regvault/search_within_regulation"
Error responses
401 Unauthorized— token missing, unknown, or revoked. Check theX-Auth-Reasonresponse header for detail.404 Not Foundon/regvault/...— the tool you requested is not in the exposed subset. Scraper tools and any non-listed endpoints return 404 by design.429 Too Many Requests— rate limit hit. InspectX-Rate-Limit-Reason(rate_limit_minuteorrate_limit_day) andRetry-Afterseconds.
Code samples
Python (requests)
import requests
TOKEN = "crpg_..."
r = requests.post(
"https://cloud.crpg.info/regvault/search_regulations",
json={"query": "water resources", "limit": 10},
headers={"Authorization": f"Bearer {TOKEN}"},
timeout=15,
)
r.raise_for_status()
print(r.json())
Node.js (fetch)
const TOKEN = "crpg_...";
const r = await fetch(
"https://cloud.crpg.info/regvault/search_regulations",
{
method: "POST",
headers: {
Authorization: `Bearer ${TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ query: "water resources", limit: 10 }),
}
);
console.log(await r.json());
Revocation
Keys are revoked automatically within 5 minutes of subscription cancellation. You can request manual revocation or rotation at cs@crpg.id.