📡 DREAMengin Data API

Free datasets + a safe API you can plug into from websites or scripts. Public endpoints are rate-limited. For filtered queries, use an API key.

Catalog (public)

GET /api/data/catalog

Direct file (public)

GET /api/data/get?name=creative_fields  →  { "url": "/datasets/creative_fields.json" }

Filtered query (requires API key)

POST /api/data/query
Headers: x-api-key: <YOUR_KEY>
Body:
{ "name": "us_cities_small", "filter": { "state": "CA" } }

Owner: issue & revoke API keys (or use the UI in /owner.html)

POST /api/keys/issue   (header: x-owner-secret: OWNER_SECRET)
POST /api/keys/revoke  (header: x-owner-secret: OWNER_SECRET)

Security: strict CORS (set API_CORS_ALLOW in env), key checks in KV, rate-limits per key+IP, and whitelisted fields only. No writes to datasets.

← Back to home