A quick tutorial for hackerspace operators on how to get your space listed in the SpaceAPI directory.
SpaceAPI is a standardized way for hackerspaces to share information like:
- Open/closed status - Is your space currently open?
- Location - Address and GPS coordinates
- Contact info - Email, IRC, social media
- Events - Recent activities
- Sensors - Temperature, humidity, door sensors
- ✅ Web server - Can host a simple JSON file
- ✅ HTTP endpoint - Accessible via HTTPS (recommended)
- ✅ JSON format - Follow SpaceAPI schema
- ✅ Real-time updates - Status changes should be current
- ✅ Space name - Your hackerspace's name
- ✅ Location data - Address or coordinates
- ✅ API version - Specify which SpaceAPI version you use
- ✅ Contact method - At least one way to reach you
Create a file called spaceapi.json on your web server:
{
"api": "0.13",
"space": "My Hackerspace",
"url": "https://myhackerspace.org",
"location": {
"address": "123 Maker Street, City, Country",
"lat": 52.5200,
"lon": 13.4050
},
"contact": {
"email": "info@myhackerspace.org",
"twitter": "@myhackerspace"
},
"state": {
"open": false,
"lastchange": 1640995200,
"icon": {
"open": "https://myhackerspace.org/img/open.png",
"closed": "https://myhackerspace.org/img/closed.png"
}
}
}Upload to your web server so it's available at:
https://YOUR-DOMAIN/spaceapi.json
Replace YOUR-DOMAIN with your actual domain name, for example:
https://milklab.ie/spaceapi.json(Irish hackerspace)https://ccc.de/spaceapi.json(German hackerspace)https://tokyomakerspace.jp/spaceapi.json(Japanese hackerspace)https://makerspace.local/spaceapi.json(Local development)
Test it: curl https://YOUR-DOMAIN/spaceapi.json
- Go to: SpaceAPI Directory
- Find submission info - Usually in GitHub issues or wiki
- Submit your endpoint - Provide your space name and URL
- Wait for review - Maintainers will validate your endpoint
Instead of manually updating spaceapi.json, make it dynamic:
# Example with Flask (Python)
from flask import Flask, jsonify
import json
import time
app = Flask(__name__)
@app.route('/spaceapi.json')
def spaceapi():
# Check if space is open (your logic here)
is_open = check_door_sensor()
return jsonify({
"api": "0.13",
"space": "My Hackerspace",
"location": {"address": "123 Maker Street"},
"state": {
"open": is_open,
"lastchange": int(time.time())
}
}){
"sensors": {
"temperature": [
{
"name": "Room Temperature",
"unit": "°C",
"value": 22.5
}
],
"door_locked": [
{
"name": "Front Door",
"value": false
}
]
}
}{
"events": [
{
"name": "Weekly Meeting",
"type": "meeting",
"timestamp": 1640995200,
"extra": {
"description": "Weekly members meeting"
}
}
]
}- Pros: Simple, no programming required
- Cons: Manual updates, not real-time
- Best for: Small spaces with basic needs
- Pros: Real-time data, automated updates
- Cons: Requires programming
- Best for: Most spaces with technical members
Home Automation Integration:
- Home Assistant - Has SpaceAPI component
- OpenHAB - Can generate SpaceAPI via REST API
- Custom scripts - Hook into your door system
Before submitting, verify your endpoint:
# Should return 200 OK
curl -I https://myhackerspace.org/spaceapi.json
# Should be valid JSON
curl https://myhackerspace.org/spaceapi.json | jq .
# Should have required fields
curl https://myhackerspace.org/spaceapi.json | jq '.space, .location, .state'- ✅
apiorapi_compatibility- Version info - ✅
space- Space name - ✅
location- Address or coordinates - ✅
state.open- Current status (can be null)
- ✅
url- Your website - ✅
contact- How to reach you - ✅
state.lastchange- Last status change timestamp
- ❌ Use HTTP only (use HTTPS)
- ❌ Return HTML instead of JSON
- ❌ Forget required fields
- ❌ Use invalid timestamps
- ❌ Hardcode wrong coordinates
- ✅ Test your endpoint regularly
- ✅ Keep status updates current
- ✅ Use proper JSON syntax
- ✅ Include contact information
- ✅ Monitor for errors
- IRC: #spaceapi on Libera.chat
- GitHub: SpaceAPI organization
- Documentation: spaceapi.io
- JSON Lint: jsonlint.com
- SpaceAPI Validator: spaceapi.io/validator
- Community Review: Ask on IRC #spaceapi for feedback
Once listed:
- 🌍 Global visibility - Your space appears on maps and directories
- 📊 Data analysis - Contribute to hackerspace research
- 🤝 Community - Join the SpaceAPI ecosystem
- 🔄 Real-time status - Help others know when you're open
After getting listed:
- Add sensors - Temperature, door status, etc.
- Integrate events - Meeting schedules, activities
- Join community - Participate in SpaceAPI development
- Help others - Share your implementation experience
This guide covers the essentials. For complete schema documentation, visit spaceapi.io/docs.