§ Developer API · v1

Build something with our pricing data.

A small, read-only JSON API. The same data the calculator runs on — exposed cleanly so contractors, comparison tools, or homeowners’ spreadsheets can pull live numbers.

On GitHub

The OpenAPI 3.1 spec, a thin TypeScript SDK, runnable code examples in curl / Node / Python / browser JS, and the changelog all live in the public Deck-Cost-Toronto/api repository. Open an issue there for bugs, schema requests, or to tell us what you’re building.

The basics

  • Base URL https://deckcosttoronto.com
  • Auth — none. No keys, no signups.
  • Response — JSON. UTF-8. Always wrapped in { version, data }.
  • Caching — endpoints set Cache-Control: public, s-maxage=3600. Cache aggressively.
  • CORS *. Browser-side calls work without a proxy.
  • Spec — machine-readable OpenAPI 3.1 at /api/v1/openapi.json. Generate clients with Redocly, Stoplight, or any OpenAPI-compatible tool.
  • License CC BY 4.0. Use it commercially, attribute deckcosttoronto.com.

Endpoints

GET/api/v1/pricing

All pricing constants — materials, heights, railings, feature add-ons, stairs, demolition, permit fees, and the calculator's input bounds.

Example

curl https://deckcosttoronto.com/api/v1/pricing

Response (truncated)

{
  "version": "v1",
  "currency": "CAD",
  "taxesIncluded": false,
  "region": "Greater Toronto Area",
  "year": 2026,
  "data": {
    "materials": [
      {
        "id": "pressure_treated",
        "label": "Pressure-treated lumber",
        "perSqFt": { "low": 30, "high": 45 },
        "blurb": "Most affordable. Lasts 15–20 years..."
      },
      ...
    ],
    "heights": [...],
    "railings": [...],
    "features": [...],
    "stairsPerStep": { "low": 180, "high": 320 },
    "demolitionPerSqFt": { "low": 4, "high": 8 },
    "permitCost": { "low": 250, "high": 750 },
    "minProjectFloor": { "low": 4500, "high": 6000 }
  }
}
GET/api/v1/cities

List of all 15 GTA cities the calculator covers. Each entry includes slug, region, population, intro copy, and the local permit note.

Example

curl https://deckcosttoronto.com/api/v1/cities

Response (truncated)

{
  "version": "v1",
  "count": 15,
  "data": [
    {
      "slug": "toronto",
      "name": "Toronto",
      "region": "City of Toronto",
      "population": 2930000,
      "intro": "Toronto's deck market is the busiest...",
      "permitNote": "Most attached decks...",
      "neighbourhoods": ["The Beaches", "Leslieville", ...]
    },
    ...
  ]
}
GET/api/v1/cities/{slug}

Full record for a single city, including local-challenge prose and the sample-build framing used on that city's landing page.

Example

curl https://deckcosttoronto.com/api/v1/cities/toronto

Response (truncated)

{
  "version": "v1",
  "data": {
    "slug": "toronto",
    "name": "Toronto",
    "region": "City of Toronto",
    "population": 2930000,
    "intro": "...",
    "contextNotes": ["...", "...", "..."],
    "permitNote": "...",
    "neighbourhoods": [...],
    "localChallenge": "...",
    "sampleBuildIntro": "..."
  }
}
POST/api/v1/estimate

Run the canonical deck-cost calculator. Send a deck spec (size, material, height, railing, stairs, features, demo, permit) and get back the same total range, per-sq-ft, breakdown, and plain-English assumptions the on-site UI displays. Rate-limited to 60 requests per minute per IP.

Example

curl -X POST https://deckcosttoronto.com/api/v1/estimate \
  -H 'content-type: application/json' \
  -d '{
    "lengthFt": 16,
    "widthFt": 12,
    "material": "composite",
    "height": "mid",
    "railing": "aluminum",
    "hasStairs": true,
    "numSteps": 3,
    "features": ["lighting"],
    "demolishExisting": false,
    "includePermit": true
  }'

Response (truncated)

{
  "version": "v1",
  "input": { ... },
  "data": {
    "total": { "low": 18336, "high": 28236 },
    "perSqFt": { "low": 95.5, "high": 147.06 },
    "squareFeet": 192,
    "railingLinearFeet": 36,
    "breakdown": {
      "materialAndLabor": { "low": 12461, "high": 21216 },
      "railing": { "low": 2520, "high": 3960 },
      "stairs": { "low": 540, "high": 960 },
      "features": { "low": 600, "high": 2200 },
      "demolition": { "low": 0, "high": 0 },
      "permit": { "low": 250, "high": 750 }
    },
    "assumptions": [
      "Based on 192 sq ft of deck surface (16′ × 12′).",
      "Material/labor priced at $55–$85/sq ft installed...",
      "..."
    ]
  }
}

Versioning

We’ll keep v1 stable. Breaking changes go to v2 at a new path. Additive changes (new fields) may land in v1 without notice — write your client to ignore unknown keys.

Hit a problem?

Email hello@deckcosttoronto.com. If you’re building something interesting, tell us — we may link to it from /changelog.