Quickstart¶
This guide shows how to retrieve data from the Solar Lake Enterprise API in just a few minutes.
You will learn how to:
- Retrieve a single building
- Load data for a map viewport
- Perform a filtered request
- Extract buildings in bulk
Base URL and subscription key¶
All API endpoints are relative to:
https://ua-api-solar-lake-enterprise.azurewebsites.net
Replace YOUR_KEY with your actual subscription key.
1️⃣ Retrieve a Single Building¶
The simplest request is retrieving a building by ID.
curl "https://ua-api-solar-lake-enterprise.azurewebsites.net/building?building_id=01c02e568d94065d29c7fd9e&subscription_key=YOUR_KEY"
Response (simplified):
{
"building_id": "01c02e568d94065d29c7fd9e",
"street": "Hauptstraße",
"postcode": "90461",
"roof_area": 120,
"pv": false,
"geometry": { ... }
}
2️⃣ Load Data for a Map Viewport (Simple)¶
For interactive maps, use a bounding box request.
curl "https://ua-api-solar-lake-enterprise.azurewebsites.net/bbox/h3s?min_lon=11.5&min_lat=48.1&max_lon=11.51&max_lat=48.11&subscription_key=YOUR_KEY"
This returns aggregated H3 cells covering the requested area.
You can also load buildings directly:
curl "https://ua-api-solar-lake-enterprise.azurewebsites.net/bbox/buildings?min_lon=11.5&min_lat=48.1&max_lon=11.51&max_lat=48.11&subscription_key=YOUR_KEY"
3️⃣ Filter and Select Fields for a Map Viewport (Advanced)¶
For better performance and more control, use the POST version of bbox endpoints.
curl -X POST "https://ua-api-solar-lake-enterprise.azurewebsites.net/bbox/buildings?subscription_key=YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"bbox": {
"min_lon": 11.5,
"min_lat": 48.1,
"max_lon": 11.51,
"max_lat": 48.11
},
"filter": {
"pv": false,
"roof_area": { "$gte": 80 }
},
"options": {
"select": ["building_id", "roof_area", "pv"],
"limit": 1000
}
}'
This request:
- Filters for buildings without PV
- Requires a roof area ≥ 80 m²
- Returns only selected fields
- Limits the result size
4️⃣ Bulk Extraction (Campaign Workflow)¶
To extract large sets of buildings (e.g., for campaigns), use:
POST /query/buildings
Example:
curl -X POST "https://ua-api-solar-lake-enterprise.azurewebsites.net/query/buildings?subscription_key=YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"region": {
"postcode_in": ["90461", "90471"]
},
"filter": {
"pv": false,
"building_type": { "$in": ["single-family house", "terraced house"] }
},
"options": {
"select": ["building_id", "postcode", "roof_area"],
"limit": 5000
}
}'
Response (simplified):
{
"returned": 5000,
"next_after_building_id": "a81c82ebb2f46da58c237741",
"items": [
{ "building_id": "...", "postcode": "90461", "roof_area": 110 },
...
]
}
If next_after_building_id is present, use it to fetch the next page:
{
"region": { "postcode_in": ["90461", "90471"] },
"options": {
"limit": 5000,
"after_building_id": "a81c82ebb2f46da58c237741"
}
}
Repeat until no next_after_building_id is returned.
Performance Recommendations¶
For best performance:
- Always use
options.selectto request only required fields - Prefer cursor paging (
after_building_id) for large exports - Use POST bbox endpoints for filtered or incremental map loading
- Avoid unnecessarily large bounding boxes
Next Steps¶
- Review Filters for advanced filter syntax
- See Usage Patterns for frontend integration patterns
- Explore the OpenAPI Reference for full schema details