0xtbug
unofficial-pddikti-api
Reverse-engineered API for PDDIKTI — Indonesian Higher Education Database. Provides access to universities, study programs, lecturers, and students data.
Documentation snapshot
README 快照
翻译暂时拿不到。
机器翻译的项目简介,仅供参考。原文在下方,也可以直接用浏览器自带的整页翻译 (Chrome / Edge 点地址栏右侧的翻译图标,或用右键菜单里的「翻译成中文」)。
下面正文是项目自己的英文 README。想读全文就用浏览器自带的整页翻译: Chrome / Edge 点地址栏右侧的翻译图标,或用右键菜单里的「翻译成中文」; 手机浏览器一般在菜单里。
本页保存的是公开项目资料快照,阅读过程不需要连接 GitHub。
PDDIKTI Unofficial API
Reverse-engineered API for PDDIKTI — Indonesian Higher Education Database.
Provides access to universities, study programs, lecturers, and students data.
Quick Start
Manual Setup
# 1. Clone repository
git clone https://github.com/0xtbug/unofficial-pddikti-api
cd unofficial-pddikti-api
# 2. Start FlareSolverr (required)
docker run -d --name flaresolverr -p 8191:8191 --restart unless-stopped \
ghcr.io/flaresolverr/flaresolverr:latest
# 3. Run
# Option A: Run directly with Go
go mod tidy
go run ./cmd/main.go
# Option B: Build & run binary
go build -o pddikti-api.exe ./cmd/main.go
./pddikti-api.exe
# 4. Test
curl http://localhost:8080/api/stats
Docker Compose (Recommended)
# Production mode
docker-compose up -d
# Development mode (hot-reload with Air)
docker-compose up
# Stop all services
docker-compose down
Makefile Commands
| Command | Description |
|---|---|
make help | Show all available commands |
make run | Start production (Docker) |
make dev | Start development with hot-reload |
make stop | Stop all containers |
make logs | View container logs |
make build | Build Docker images |
make swagger | Regenerate Swagger docs |
make build-local | Build binary locally |
make test | Run tests |
Config
| Env | Default | Description |
|---|---|---|
PORT | 8080 | Server port |
FLARESOLVERR_URL | http://localhost:8191 | FlareSolverr URL (http://flaresolverr:8191 in Docker) |
UPSTREAM_BASE_URL | https://pddikti.kemdiktisaintek.go.id/api | PDDIKTI upstream |
AUTH_ENABLED | false | Enable Bearer token authentication (true/false) |
API_TOKEN | "" | Valid Bearer token when auth is enabled |
Authentication
The API supports optional token authentication. When enabled, all /api endpoints require a valid token via the Authorization header. Both Authorization: Bearer and Authorization: (raw token) formats are accepted.
In Swagger UI, just enter the token value directly in the authorization dialog — no Bearer prefix needed.
| Env | Default | Description |
|---|---|---|
AUTH_ENABLED | false | Enable/disable authentication (true/false) |
API_TOKEN | "" | The valid Bearer token |
Example usage:
# Start server with auth enabled
AUTH_ENABLED=true API_TOKEN=my-secret-token go run ./cmd/main.go
# Make authenticated requests
curl -H "Authorization: Bearer my-secret-token" http://localhost:8080/api/stats
# Without auth (default)
go run ./cmd/main.go
curl http://localhost:8080/api/stats
When auth is disabled (AUTH_ENABLED=false), all requests pass through without a token.
Endpoints
Swagger UI: http://localhost:8080/swagger/index.html
Testing
# Run all tests with coverage
go test ./internal/... -cover -count=1 -timeout 120s
# Run specific package tests
go test ./internal/api/... -v
go test ./internal/middleware/... -v
go test ./internal/config/... -v
Docs
- Swagger JSON — OpenAPI 3.0 spec
Stars History
Official distribution
获取与安装
暂未发现可确认的官方软件包地址
当前 README 快照没有出现 npm、PyPI、Crates.io、pub.dev 等官方包页链接。本站不会根据仓库名称猜测下载地址。
本站不托管项目文件;需要安装时,请以项目维护者发布的官方文档为准。
Before installing
使用前核验
本站保存公开资料用于阅读,不代表安全审计或功能背书。安装前请核对许可证、依赖来源和发布签名,不要直接运行来源不明的二进制文件或高权限脚本。