# API Reference

# API Reference — Sovereign Climate Data Wiki

All pages in this book are publicly accessible via the BookStack REST API. No authentication is required for read access.

## Base URL

```
https://wiki.cleantechhub.net/api
```

## Common Queries

<table id="bkmrk-purposeendpoint-list"> <thead><tr><th>Purpose</th><th>Endpoint</th></tr></thead> <tbody> <tr><td>List all principles pages</td><td>`GET /api/pages?filter[book_slug]=sovereign-climate-data`</td></tr> <tr><td>Get a principle by slug</td><td>`GET /api/pages?filter[slug]=verifiability-by-design`</td></tr> <tr><td>Get full page content</td><td>`GET /api/pages/{id}`</td></tr> <tr><td>Search all principles</td><td>`GET /api/search?query=CBAM+embedded+carbon`</td></tr> <tr><td>List chapters</td><td>`GET /api/chapters?filter[book_id]=860`</td></tr> <tr><td>Get book metadata</td><td>`GET /api/books/860`</td></tr> </tbody></table>

## Static Machine-Readable Files

<table id="bkmrk-formaturluse-case-fl"> <thead><tr><th>Format</th><th>URL</th><th>Use case</th></tr></thead> <tbody> <tr><td>Flat JSON</td><td>`https://wiki.cleantechhub.net/data/principles.json`</td><td>General API consumers, dashboards</td></tr> <tr><td>JSON-LD (schema.org)</td><td>`https://wiki.cleantechhub.net/data/principles_jsonld.json`</td><td>AI agents, Google Dataset Search, semantic web</td></tr> </tbody></table>

## Example: Fetch Principle P01 as JSON

```
curl -s "https://wiki.cleantechhub.net/api/pages?filter[slug]=verifiability-by-design" \
  | python3 -c "import sys,json; d=json.load(sys.stdin); print(d['data'][0]['name'])"
```

## Example: Search for CBAM-related principles

```
curl -s "https://wiki.cleantechhub.net/api/search?query=CBAM" \
  | python3 -m json.tool | grep -A3 '"name"'
```

## Example: Pull principles.json for RAG ingestion

```
import requests
data = requests.get("https://wiki.cleantechhub.net/data/principles.json").json()
for p in data["principles"]:
    print(p["id"], p["title"])
```

## Rate Limits

BookStack imposes no rate limit on read-only API calls. Be courteous: add a 100ms delay between calls in scripts.

## Licence

All content in this wiki is published under [CC-BY 4.0](https://creativecommons.org/licenses/by/4.0/). Cite as: CleantechHUB (2026). *Sovereign Climate Data Principles, v1.0.0*.