Documentation menu
Docs / Reference / Pro: estimated construction value for 1..N permits (by record id or attributes)

Pro: estimated construction value for 1..N permits (by record id or attributes)

POST/permit/estimate

Estimated construction value for permits that carry none. Send up to 100 per call, as record ids from /permit or as attribute objects for permits you hold yourself. Each result has a low, median and high estimate in dollars, a confidence of high or low, and the model that produced it. Paid plans only; a free key gets 403.

Request body

FieldTypeDescription
record_idsarray of stringPermit record ids, as /permit returns them.
permitsarray of objectPermits described by their attributes: municipality, permit_type_canonical, description, area_m2 or area_ft2, dwelling_units, proposed_use, lat, lng. Send what you have; more scope gives a tighter range.

Request

curl --request POST \
  --url 'https://api.builddata.ca/permit/estimate' \
  --header 'X-API-Key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{"permits": [{"municipality": "calgary", "permit_type_canonical": "new_construction", "description": "New single detached dwelling with attached garage", "area_m2": 210}]}'
import requests

url = "https://api.builddata.ca/permit/estimate"
headers = {"X-API-Key": "YOUR_API_KEY"}
body = {
  "permits": [
    {
      "municipality": "calgary",
      "permit_type_canonical": "new_construction",
      "description": "New single detached dwelling with attached garage",
      "area_m2": 210
    }
  ]
}
resp = requests.post(url, headers=headers, json=body)
print(resp.json())
const res = await fetch("https://api.builddata.ca/permit/estimate", {
  method: "POST",
  headers: {
    "X-API-Key": "YOUR_API_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
  "permits": [
    {
      "municipality": "calgary",
      "permit_type_canonical": "new_construction",
      "description": "New single detached dwelling with attached garage",
      "area_m2": 210
    }
  ]
}),
});
console.log(await res.json());

Example response

{
  "count": 1,
  "results": [
    {
      "input": {
        "municipality": "calgary",
        "permit_type_canonical": "new_construction",
        "description": "New single detached dwelling with attached garage",
        "area_m2": 210
      },
      "estimate": {
        "low": 101237,
        "median": 290992,
        "high": 592483,
        "confidence": "high",
        "basis": "description model"
      }
    }
  ]
}

Errors

Every error returns {"detail": "…"}, a sentence naming what was wrong and, where there is one, the fix.

StatusWhen
400The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.
403Missing or invalid API key.
404No such endpoint, or no record with that id.
422A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.
429Rate limit or plan quota exceeded.
500Unexpected server error.
504The query took too long. Narrow it with a municipality or a date range.
Ready to build?Create a free key and start calling BuildData in minutes. No card required.
Get your API key →