Skip to main content

🔌 API Documentation

REST API for Coolock Village civic data. Schema.org compliant. CORS enabled.

Quick Start

bash
# List all businesses
curl https://coolockvillage.ie/api/v1/businesses

# Search for restaurants
curl "https://coolockvillage.ie/api/v1/businesses?schemaType=Restaurant"

# Get a specific business
curl https://coolockvillage.ie/api/v1/businesses/spar-malahide-road

# Check for changes since a date
curl "https://coolockvillage.ie/api/v1/diff?since=2026-02-01"

Features

🏷️ Schema.org

Full JSON-LD with @context, @type, and @id for every entity.

⚡ ETag / 304

Conditional requests via If-None-Match. Save bandwidth.

🌐 CORS Enabled

Access-Control-Allow-Origin: * with OPTIONS preflight.

Endpoints

GET /api/v1/businesses

List all businesses with optional filtering

Parameters

Name Type Description
category string Filter by display category (e.g. "Food & Drink")
schemaType string Filter by schema.org type (e.g. "Restaurant")
q string Free-text search (max 200 chars)
Response: application/json (schema.org ItemList) Cache: max-age=3600, s-maxage=86400
GET /api/v1/businesses/{id}

Get a single business by canonical ID

Parameters

Name Type Description
id string URL-safe canonical business ID (e.g. "spar-malahide-road")
Response: application/json (schema.org LocalBusiness) Cache: max-age=3600, s-maxage=86400
GET /api/v1/diff

Dataset changes since a given date. For sync/ingestion.

Parameters

Name Type Description
since string ISO 8601 date (e.g. "2026-02-01")
Response: application/json Cache: max-age=300

Static Exports

Response Headers

Header Description
ETagDataset version hash. Use with If-None-Match for 304 responses.
Cache-ControlCDN and browser caching directives.
VaryAccept-Encoding — for proper CDN cache keys.
X-Dataset-VersionSemVer of the dataset schema (list endpoint only).
Access-Control-Allow-Origin* — open CORS for all origins.