{"openapi":"3.1.0","info":{"title":"Alghafat Market API","version":"1.0.0+rules.2026-10-22.2","description":"Read-only market and calculator tools. No model is involved: the same deterministic tools serve the chat, this API and the MCP server. Every result carries provenance and attribution, which must stay visible wherever the result is shown.","license":{"name":"Apache-2.0 (code); data under DATA_LICENSE.md","identifier":"Apache-2.0"}},"servers":[{"url":"https://market.alghafat.com"}],"paths":{"/api/v1/tools":{"get":{"operationId":"listTools","summary":"List the public tools with their input and output JSON Schemas","responses":{"200":{"description":"Tool list"}}}},"/api/v1/tools/market_snapshot":{"post":{"operationId":"market_snapshot","summary":"Market snapshot","description":"Key figures for one area (or the whole market when no area is given): 12-month sales count, median price, median price per sqft, change vs the previous 12 months, off-plan share, median annual rent and gross yield, each with its sample size. Without an area it also lists every known area with its headline figures; use it to discover valid area names.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"area":{"type":"string","minLength":2,"maxLength":80,"description":"Area id or name, as returned by market_snapshot (call it without an area to list all areas)"},"propertyType":{"default":"apartment","description":"apartment or villa","type":"string","enum":["apartment","villa"]}}}}}},"responses":{"200":{"description":"Tool output with provenance and attribution","content":{"application/json":{"schema":{"type":"object","properties":{"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"scope":{"type":"string","enum":["area","market"]},"area":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"mapped":{"type":"boolean"}},"required":["id","name","mapped"],"additionalProperties":false},{"type":"null"}]},"propertyType":{"type":"string"},"period":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false},"kpis":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"value":{"type":["number","null"]},"unit":{"type":"string","enum":["AED","AED_per_sqft","AED_per_year","percent","count","years","km"]},"n":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["key","label","value","unit","n"],"additionalProperties":false}},"areas":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"mapped":{"type":"boolean"},"sales12m":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"medianPsf":{"type":["number","null"]},"psfYoyPct":{"type":["number","null"]},"medianAnnualRent":{"type":["number","null"]}},"required":["id","name","mapped","sales12m","medianPsf","psfYoyPct","medianAnnualRent"],"additionalProperties":false}},"summary":{"type":"array","items":{"type":"string"},"description":"Short factual lines; every number here is also in the structured fields"},"notes":{"type":"array","items":{"type":"string"},"description":"Caveats the answer must keep (coarse data, assumptions, not advice)"},"charts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"subtitle":{"type":"string"},"unit":{"type":"string","enum":["AED","AED_per_sqft","AED_per_year","percent","count","years","km"]},"provenance":{"type":"object","properties":{"source":{"type":"string","description":"Id of the source behind the figures, e.g. synthetic-marts or public-listings"},"basis":{"type":"string","enum":["transactions","asking-prices","rules"]},"datasets":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"publisher":{"type":"string"},"licence":{"type":"string"},"url":{"type":"string"}},"required":["id","name","publisher","licence"],"additionalProperties":false}},"asOf":{"type":"string","description":"Last complete month covered by the data, YYYY-MM, or the rules version date"},"period":{"anyOf":[{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false},{"type":"null"}]},"n":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"Sample size behind the headline figure"},"method":{"type":"string"},"rules":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"lastVerified":{"type":"string"},"confidence":{"type":"string","enum":["primary","secondary","assumption","placeholder"]}},"required":["id","title","url","lastVerified","confidence"],"additionalProperties":false}},"synthetic":{"type":"boolean"},"label":{"description":"Label that must be shown with the figures (SYNTHETIC, or the source's own label)","type":["string","null"]}},"required":["source","basis","datasets","asOf","period","n","method","rules","synthetic","label"],"additionalProperties":false},"attribution":{"type":"string","minLength":1},"synthetic":{"type":"boolean"},"notes":{"default":[],"type":"array","items":{"type":"string"}},"kind":{"type":"string","const":"line"},"xLabel":{"type":"string"},"series":{"minItems":1,"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"style":{"default":"solid","type":"string","enum":["solid","dashed"]},"points":{"type":"array","items":{"type":"object","properties":{"x":{"type":"string"},"y":{"type":["number","null"]},"n":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["x","y"],"additionalProperties":false}}},"required":["key","label","style","points"],"additionalProperties":false}}},"required":["id","title","unit","provenance","attribution","synthetic","notes","kind","xLabel","series"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"subtitle":{"type":"string"},"unit":{"type":"string","enum":["AED","AED_per_sqft","AED_per_year","percent","count","years","km"]},"provenance":{"type":"object","properties":{"source":{"type":"string","description":"Id of the source behind the figures, e.g. synthetic-marts or public-listings"},"basis":{"type":"string","enum":["transactions","asking-prices","rules"]},"datasets":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"publisher":{"type":"string"},"licence":{"type":"string"},"url":{"type":"string"}},"required":["id","name","publisher","licence"],"additionalProperties":false}},"asOf":{"type":"string","description":"Last complete month covered by the data, YYYY-MM, or the rules version date"},"period":{"anyOf":[{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false},{"type":"null"}]},"n":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"Sample size behind the headline figure"},"method":{"type":"string"},"rules":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"lastVerified":{"type":"string"},"confidence":{"type":"string","enum":["primary","secondary","assumption","placeholder"]}},"required":["id","title","url","lastVerified","confidence"],"additionalProperties":false}},"synthetic":{"type":"boolean"},"label":{"description":"Label that must be shown with the figures (SYNTHETIC, or the source's own label)","type":["string","null"]}},"required":["source","basis","datasets","asOf","period","n","method","rules","synthetic","label"],"additionalProperties":false},"attribution":{"type":"string","minLength":1},"synthetic":{"type":"boolean"},"notes":{"default":[],"type":"array","items":{"type":"string"}},"kind":{"type":"string","const":"range"},"rows":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"p10":{"type":"number"},"p25":{"type":"number"},"median":{"type":"number"},"p75":{"type":"number"},"p90":{"type":"number"},"n":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["label","median","n"],"additionalProperties":false}},"marker":{"type":"object","properties":{"value":{"type":"number"},"label":{"type":"string"}},"required":["value","label"],"additionalProperties":false}},"required":["id","title","unit","provenance","attribution","synthetic","notes","kind","rows"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"subtitle":{"type":"string"},"unit":{"type":"string","enum":["AED","AED_per_sqft","AED_per_year","percent","count","years","km"]},"provenance":{"type":"object","properties":{"source":{"type":"string","description":"Id of the source behind the figures, e.g. synthetic-marts or public-listings"},"basis":{"type":"string","enum":["transactions","asking-prices","rules"]},"datasets":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"publisher":{"type":"string"},"licence":{"type":"string"},"url":{"type":"string"}},"required":["id","name","publisher","licence"],"additionalProperties":false}},"asOf":{"type":"string","description":"Last complete month covered by the data, YYYY-MM, or the rules version date"},"period":{"anyOf":[{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false},{"type":"null"}]},"n":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"Sample size behind the headline figure"},"method":{"type":"string"},"rules":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"lastVerified":{"type":"string"},"confidence":{"type":"string","enum":["primary","secondary","assumption","placeholder"]}},"required":["id","title","url","lastVerified","confidence"],"additionalProperties":false}},"synthetic":{"type":"boolean"},"label":{"description":"Label that must be shown with the figures (SYNTHETIC, or the source's own label)","type":["string","null"]}},"required":["source","basis","datasets","asOf","period","n","method","rules","synthetic","label"],"additionalProperties":false},"attribution":{"type":"string","minLength":1},"synthetic":{"type":"boolean"},"notes":{"default":[],"type":"array","items":{"type":"string"}},"kind":{"type":"string","const":"rank"},"direction":{"type":"string","enum":["asc","desc"]},"rows":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"value":{"type":["number","null"]},"n":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"highlight":{"default":false,"type":"boolean"},"tag":{"type":"string"}},"required":["label","value","highlight"],"additionalProperties":false}},"marker":{"type":"object","properties":{"value":{"type":"number"},"label":{"type":"string"}},"required":["value","label"],"additionalProperties":false}},"required":["id","title","unit","provenance","attribution","synthetic","notes","kind","direction","rows"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"subtitle":{"type":"string"},"unit":{"type":"string","enum":["AED","AED_per_sqft","AED_per_year","percent","count","years","km"]},"provenance":{"type":"object","properties":{"source":{"type":"string","description":"Id of the source behind the figures, e.g. synthetic-marts or public-listings"},"basis":{"type":"string","enum":["transactions","asking-prices","rules"]},"datasets":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"publisher":{"type":"string"},"licence":{"type":"string"},"url":{"type":"string"}},"required":["id","name","publisher","licence"],"additionalProperties":false}},"asOf":{"type":"string","description":"Last complete month covered by the data, YYYY-MM, or the rules version date"},"period":{"anyOf":[{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false},{"type":"null"}]},"n":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"Sample size behind the headline figure"},"method":{"type":"string"},"rules":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"lastVerified":{"type":"string"},"confidence":{"type":"string","enum":["primary","secondary","assumption","placeholder"]}},"required":["id","title","url","lastVerified","confidence"],"additionalProperties":false}},"synthetic":{"type":"boolean"},"label":{"description":"Label that must be shown with the figures (SYNTHETIC, or the source's own label)","type":["string","null"]}},"required":["source","basis","datasets","asOf","period","n","method","rules","synthetic","label"],"additionalProperties":false},"attribution":{"type":"string","minLength":1},"synthetic":{"type":"boolean"},"notes":{"default":[],"type":"array","items":{"type":"string"}},"kind":{"type":"string","const":"composition"},"rows":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"parts":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"value":{"type":"number"}},"required":["key","label","value"],"additionalProperties":false}}},"required":["label","parts"],"additionalProperties":false}}},"required":["id","title","unit","provenance","attribution","synthetic","notes","kind","rows"],"additionalProperties":false}]}},"provenance":{"type":"object","properties":{"source":{"type":"string","description":"Id of the source behind the figures, e.g. synthetic-marts or public-listings"},"basis":{"type":"string","enum":["transactions","asking-prices","rules"]},"datasets":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"publisher":{"type":"string"},"licence":{"type":"string"},"url":{"type":"string"}},"required":["id","name","publisher","licence"],"additionalProperties":false}},"asOf":{"type":"string","description":"Last complete month covered by the data, YYYY-MM, or the rules version date"},"period":{"anyOf":[{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false},{"type":"null"}]},"n":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"Sample size behind the headline figure"},"method":{"type":"string"},"rules":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"lastVerified":{"type":"string"},"confidence":{"type":"string","enum":["primary","secondary","assumption","placeholder"]}},"required":["id","title","url","lastVerified","confidence"],"additionalProperties":false}},"synthetic":{"type":"boolean"},"label":{"description":"Label that must be shown with the figures (SYNTHETIC, or the source's own label)","type":["string","null"]}},"required":["source","basis","datasets","asOf","period","n","method","rules","synthetic","label"],"additionalProperties":false},"attribution":{"type":"string","minLength":1},"synthetic":{"type":"boolean"}},"required":["scope","area","propertyType","period","kpis","summary","notes","charts","provenance","attribution","synthetic"],"additionalProperties":false}}}}}},"400":{"description":"Invalid input"},"404":{"description":"Unknown tool"},"429":{"description":"Rate limited"}}}},"/api/v1/tools/area_price_trend":{"post":{"operationId":"area_price_trend","summary":"Area price trend","description":"Monthly history for 1 to 4 areas: median price per sqft, median sale price or median annual rent, for apartments or villas. Returns the series, the first and last values and the change between them, with a line chart. History only, never a forecast.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"areas":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":2,"maxLength":80,"description":"Area id or name, as returned by market_snapshot (call it without an area to list all areas)"}},"propertyType":{"default":"apartment","description":"apartment or villa","type":"string","enum":["apartment","villa"]},"metric":{"default":"price_psf","type":"string","enum":["price_psf","sale_median","rent_median"]},"months":{"default":36,"type":"integer","minimum":6,"maximum":60}},"required":["areas"]}}}},"responses":{"200":{"description":"Tool output with provenance and attribution","content":{"application/json":{"schema":{"type":"object","properties":{"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"metric":{"type":"string","enum":["price_psf","sale_median","rent_median"]},"propertyType":{"type":"string"},"series":{"type":"array","items":{"type":"object","properties":{"areaId":{"type":"string"},"name":{"type":"string"},"points":{"type":"array","items":{"type":"object","properties":{"month":{"type":"string"},"value":{"type":["number","null"]},"n":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["month","value","n"],"additionalProperties":false}},"first":{"anyOf":[{"type":"object","properties":{"month":{"type":"string"},"value":{"type":"number"}},"required":["month","value"],"additionalProperties":false},{"type":"null"}]},"last":{"anyOf":[{"type":"object","properties":{"month":{"type":"string"},"value":{"type":"number"}},"required":["month","value"],"additionalProperties":false},{"type":"null"}]},"changePct":{"type":["number","null"]}},"required":["areaId","name","points","first","last","changePct"],"additionalProperties":false}},"summary":{"type":"array","items":{"type":"string"},"description":"Short factual lines; every number here is also in the structured fields"},"notes":{"type":"array","items":{"type":"string"},"description":"Caveats the answer must keep (coarse data, assumptions, not advice)"},"charts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"subtitle":{"type":"string"},"unit":{"type":"string","enum":["AED","AED_per_sqft","AED_per_year","percent","count","years","km"]},"provenance":{"type":"object","properties":{"source":{"type":"string","description":"Id of the source behind the figures, e.g. synthetic-marts or public-listings"},"basis":{"type":"string","enum":["transactions","asking-prices","rules"]},"datasets":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"publisher":{"type":"string"},"licence":{"type":"string"},"url":{"type":"string"}},"required":["id","name","publisher","licence"],"additionalProperties":false}},"asOf":{"type":"string","description":"Last complete month covered by the data, YYYY-MM, or the rules version date"},"period":{"anyOf":[{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false},{"type":"null"}]},"n":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"Sample size behind the headline figure"},"method":{"type":"string"},"rules":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"lastVerified":{"type":"string"},"confidence":{"type":"string","enum":["primary","secondary","assumption","placeholder"]}},"required":["id","title","url","lastVerified","confidence"],"additionalProperties":false}},"synthetic":{"type":"boolean"},"label":{"description":"Label that must be shown with the figures (SYNTHETIC, or the source's own label)","type":["string","null"]}},"required":["source","basis","datasets","asOf","period","n","method","rules","synthetic","label"],"additionalProperties":false},"attribution":{"type":"string","minLength":1},"synthetic":{"type":"boolean"},"notes":{"default":[],"type":"array","items":{"type":"string"}},"kind":{"type":"string","const":"line"},"xLabel":{"type":"string"},"series":{"minItems":1,"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"style":{"default":"solid","type":"string","enum":["solid","dashed"]},"points":{"type":"array","items":{"type":"object","properties":{"x":{"type":"string"},"y":{"type":["number","null"]},"n":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["x","y"],"additionalProperties":false}}},"required":["key","label","style","points"],"additionalProperties":false}}},"required":["id","title","unit","provenance","attribution","synthetic","notes","kind","xLabel","series"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"subtitle":{"type":"string"},"unit":{"type":"string","enum":["AED","AED_per_sqft","AED_per_year","percent","count","years","km"]},"provenance":{"type":"object","properties":{"source":{"type":"string","description":"Id of the source behind the figures, e.g. synthetic-marts or public-listings"},"basis":{"type":"string","enum":["transactions","asking-prices","rules"]},"datasets":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"publisher":{"type":"string"},"licence":{"type":"string"},"url":{"type":"string"}},"required":["id","name","publisher","licence"],"additionalProperties":false}},"asOf":{"type":"string","description":"Last complete month covered by the data, YYYY-MM, or the rules version date"},"period":{"anyOf":[{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false},{"type":"null"}]},"n":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"Sample size behind the headline figure"},"method":{"type":"string"},"rules":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"lastVerified":{"type":"string"},"confidence":{"type":"string","enum":["primary","secondary","assumption","placeholder"]}},"required":["id","title","url","lastVerified","confidence"],"additionalProperties":false}},"synthetic":{"type":"boolean"},"label":{"description":"Label that must be shown with the figures (SYNTHETIC, or the source's own label)","type":["string","null"]}},"required":["source","basis","datasets","asOf","period","n","method","rules","synthetic","label"],"additionalProperties":false},"attribution":{"type":"string","minLength":1},"synthetic":{"type":"boolean"},"notes":{"default":[],"type":"array","items":{"type":"string"}},"kind":{"type":"string","const":"range"},"rows":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"p10":{"type":"number"},"p25":{"type":"number"},"median":{"type":"number"},"p75":{"type":"number"},"p90":{"type":"number"},"n":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["label","median","n"],"additionalProperties":false}},"marker":{"type":"object","properties":{"value":{"type":"number"},"label":{"type":"string"}},"required":["value","label"],"additionalProperties":false}},"required":["id","title","unit","provenance","attribution","synthetic","notes","kind","rows"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"subtitle":{"type":"string"},"unit":{"type":"string","enum":["AED","AED_per_sqft","AED_per_year","percent","count","years","km"]},"provenance":{"type":"object","properties":{"source":{"type":"string","description":"Id of the source behind the figures, e.g. synthetic-marts or public-listings"},"basis":{"type":"string","enum":["transactions","asking-prices","rules"]},"datasets":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"publisher":{"type":"string"},"licence":{"type":"string"},"url":{"type":"string"}},"required":["id","name","publisher","licence"],"additionalProperties":false}},"asOf":{"type":"string","description":"Last complete month covered by the data, YYYY-MM, or the rules version date"},"period":{"anyOf":[{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false},{"type":"null"}]},"n":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"Sample size behind the headline figure"},"method":{"type":"string"},"rules":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"lastVerified":{"type":"string"},"confidence":{"type":"string","enum":["primary","secondary","assumption","placeholder"]}},"required":["id","title","url","lastVerified","confidence"],"additionalProperties":false}},"synthetic":{"type":"boolean"},"label":{"description":"Label that must be shown with the figures (SYNTHETIC, or the source's own label)","type":["string","null"]}},"required":["source","basis","datasets","asOf","period","n","method","rules","synthetic","label"],"additionalProperties":false},"attribution":{"type":"string","minLength":1},"synthetic":{"type":"boolean"},"notes":{"default":[],"type":"array","items":{"type":"string"}},"kind":{"type":"string","const":"rank"},"direction":{"type":"string","enum":["asc","desc"]},"rows":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"value":{"type":["number","null"]},"n":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"highlight":{"default":false,"type":"boolean"},"tag":{"type":"string"}},"required":["label","value","highlight"],"additionalProperties":false}},"marker":{"type":"object","properties":{"value":{"type":"number"},"label":{"type":"string"}},"required":["value","label"],"additionalProperties":false}},"required":["id","title","unit","provenance","attribution","synthetic","notes","kind","direction","rows"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"subtitle":{"type":"string"},"unit":{"type":"string","enum":["AED","AED_per_sqft","AED_per_year","percent","count","years","km"]},"provenance":{"type":"object","properties":{"source":{"type":"string","description":"Id of the source behind the figures, e.g. synthetic-marts or public-listings"},"basis":{"type":"string","enum":["transactions","asking-prices","rules"]},"datasets":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"publisher":{"type":"string"},"licence":{"type":"string"},"url":{"type":"string"}},"required":["id","name","publisher","licence"],"additionalProperties":false}},"asOf":{"type":"string","description":"Last complete month covered by the data, YYYY-MM, or the rules version date"},"period":{"anyOf":[{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false},{"type":"null"}]},"n":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"Sample size behind the headline figure"},"method":{"type":"string"},"rules":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"lastVerified":{"type":"string"},"confidence":{"type":"string","enum":["primary","secondary","assumption","placeholder"]}},"required":["id","title","url","lastVerified","confidence"],"additionalProperties":false}},"synthetic":{"type":"boolean"},"label":{"description":"Label that must be shown with the figures (SYNTHETIC, or the source's own label)","type":["string","null"]}},"required":["source","basis","datasets","asOf","period","n","method","rules","synthetic","label"],"additionalProperties":false},"attribution":{"type":"string","minLength":1},"synthetic":{"type":"boolean"},"notes":{"default":[],"type":"array","items":{"type":"string"}},"kind":{"type":"string","const":"composition"},"rows":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"parts":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"value":{"type":"number"}},"required":["key","label","value"],"additionalProperties":false}}},"required":["label","parts"],"additionalProperties":false}}},"required":["id","title","unit","provenance","attribution","synthetic","notes","kind","rows"],"additionalProperties":false}]}},"provenance":{"type":"object","properties":{"source":{"type":"string","description":"Id of the source behind the figures, e.g. synthetic-marts or public-listings"},"basis":{"type":"string","enum":["transactions","asking-prices","rules"]},"datasets":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"publisher":{"type":"string"},"licence":{"type":"string"},"url":{"type":"string"}},"required":["id","name","publisher","licence"],"additionalProperties":false}},"asOf":{"type":"string","description":"Last complete month covered by the data, YYYY-MM, or the rules version date"},"period":{"anyOf":[{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false},{"type":"null"}]},"n":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"Sample size behind the headline figure"},"method":{"type":"string"},"rules":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"lastVerified":{"type":"string"},"confidence":{"type":"string","enum":["primary","secondary","assumption","placeholder"]}},"required":["id","title","url","lastVerified","confidence"],"additionalProperties":false}},"synthetic":{"type":"boolean"},"label":{"description":"Label that must be shown with the figures (SYNTHETIC, or the source's own label)","type":["string","null"]}},"required":["source","basis","datasets","asOf","period","n","method","rules","synthetic","label"],"additionalProperties":false},"attribution":{"type":"string","minLength":1},"synthetic":{"type":"boolean"}},"required":["metric","propertyType","series","summary","notes","charts","provenance","attribution","synthetic"],"additionalProperties":false}}}}}},"400":{"description":"Invalid input"},"404":{"description":"Unknown tool"},"429":{"description":"Rate limited"}}}},"/api/v1/tools/compare_areas":{"post":{"operationId":"compare_areas","summary":"Compare areas","description":"Compare 2 to 5 areas side by side: price per sqft, sale median (optionally for a bedroom count), rent median, gross yield, off-plan share, 12-month sales and change vs the previous 12 months, each with n. Pass `areas`, or `anchorArea` plus `nearby` to compare an area with its nearest neighbours (straight-line distance between area anchors). The best value in each row is highlighted only in the direction of the user's goal (lowest rent for rent, lowest price for buy, highest yield for invest); a tie highlights nothing.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"areas":{"minItems":2,"maxItems":5,"type":"array","items":{"type":"string","minLength":2,"maxLength":80,"description":"Area id or name, as returned by market_snapshot (call it without an area to list all areas)"}},"anchorArea":{"type":"string","minLength":2,"maxLength":80,"description":"Area id or name, as returned by market_snapshot (call it without an area to list all areas)"},"nearby":{"default":3,"type":"integer","minimum":1,"maximum":4},"propertyType":{"default":"apartment","description":"apartment or villa","type":"string","enum":["apartment","villa"]},"goal":{"default":"buy","type":"string","enum":["rent","buy","invest"]},"bedrooms":{"description":"0 = studio, 5 = five or more; sale prices only (rents have no bedroom split)","type":"integer","minimum":0,"maximum":5}}}}}},"responses":{"200":{"description":"Tool output with provenance and attribution","content":{"application/json":{"schema":{"type":"object","properties":{"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"goal":{"type":"string","enum":["rent","buy","invest"]},"propertyType":{"type":"string"},"bedrooms":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"anchor":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"areas":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"mapped":{"type":"boolean"},"distanceKm":{"type":["number","null"]}},"required":["id","name","mapped","distanceKm"],"additionalProperties":false}},"rows":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"unit":{"type":"string"},"values":{"type":"array","items":{"type":["number","null"]}},"n":{"type":"array","items":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"direction":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]},"best":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["key","label","unit","values","n","direction","best"],"additionalProperties":false}},"summary":{"type":"array","items":{"type":"string"},"description":"Short factual lines; every number here is also in the structured fields"},"notes":{"type":"array","items":{"type":"string"},"description":"Caveats the answer must keep (coarse data, assumptions, not advice)"},"charts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"subtitle":{"type":"string"},"unit":{"type":"string","enum":["AED","AED_per_sqft","AED_per_year","percent","count","years","km"]},"provenance":{"type":"object","properties":{"source":{"type":"string","description":"Id of the source behind the figures, e.g. synthetic-marts or public-listings"},"basis":{"type":"string","enum":["transactions","asking-prices","rules"]},"datasets":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"publisher":{"type":"string"},"licence":{"type":"string"},"url":{"type":"string"}},"required":["id","name","publisher","licence"],"additionalProperties":false}},"asOf":{"type":"string","description":"Last complete month covered by the data, YYYY-MM, or the rules version date"},"period":{"anyOf":[{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false},{"type":"null"}]},"n":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"Sample size behind the headline figure"},"method":{"type":"string"},"rules":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"lastVerified":{"type":"string"},"confidence":{"type":"string","enum":["primary","secondary","assumption","placeholder"]}},"required":["id","title","url","lastVerified","confidence"],"additionalProperties":false}},"synthetic":{"type":"boolean"},"label":{"description":"Label that must be shown with the figures (SYNTHETIC, or the source's own label)","type":["string","null"]}},"required":["source","basis","datasets","asOf","period","n","method","rules","synthetic","label"],"additionalProperties":false},"attribution":{"type":"string","minLength":1},"synthetic":{"type":"boolean"},"notes":{"default":[],"type":"array","items":{"type":"string"}},"kind":{"type":"string","const":"line"},"xLabel":{"type":"string"},"series":{"minItems":1,"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"style":{"default":"solid","type":"string","enum":["solid","dashed"]},"points":{"type":"array","items":{"type":"object","properties":{"x":{"type":"string"},"y":{"type":["number","null"]},"n":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["x","y"],"additionalProperties":false}}},"required":["key","label","style","points"],"additionalProperties":false}}},"required":["id","title","unit","provenance","attribution","synthetic","notes","kind","xLabel","series"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"subtitle":{"type":"string"},"unit":{"type":"string","enum":["AED","AED_per_sqft","AED_per_year","percent","count","years","km"]},"provenance":{"type":"object","properties":{"source":{"type":"string","description":"Id of the source behind the figures, e.g. synthetic-marts or public-listings"},"basis":{"type":"string","enum":["transactions","asking-prices","rules"]},"datasets":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"publisher":{"type":"string"},"licence":{"type":"string"},"url":{"type":"string"}},"required":["id","name","publisher","licence"],"additionalProperties":false}},"asOf":{"type":"string","description":"Last complete month covered by the data, YYYY-MM, or the rules version date"},"period":{"anyOf":[{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false},{"type":"null"}]},"n":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"Sample size behind the headline figure"},"method":{"type":"string"},"rules":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"lastVerified":{"type":"string"},"confidence":{"type":"string","enum":["primary","secondary","assumption","placeholder"]}},"required":["id","title","url","lastVerified","confidence"],"additionalProperties":false}},"synthetic":{"type":"boolean"},"label":{"description":"Label that must be shown with the figures (SYNTHETIC, or the source's own label)","type":["string","null"]}},"required":["source","basis","datasets","asOf","period","n","method","rules","synthetic","label"],"additionalProperties":false},"attribution":{"type":"string","minLength":1},"synthetic":{"type":"boolean"},"notes":{"default":[],"type":"array","items":{"type":"string"}},"kind":{"type":"string","const":"range"},"rows":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"p10":{"type":"number"},"p25":{"type":"number"},"median":{"type":"number"},"p75":{"type":"number"},"p90":{"type":"number"},"n":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["label","median","n"],"additionalProperties":false}},"marker":{"type":"object","properties":{"value":{"type":"number"},"label":{"type":"string"}},"required":["value","label"],"additionalProperties":false}},"required":["id","title","unit","provenance","attribution","synthetic","notes","kind","rows"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"subtitle":{"type":"string"},"unit":{"type":"string","enum":["AED","AED_per_sqft","AED_per_year","percent","count","years","km"]},"provenance":{"type":"object","properties":{"source":{"type":"string","description":"Id of the source behind the figures, e.g. synthetic-marts or public-listings"},"basis":{"type":"string","enum":["transactions","asking-prices","rules"]},"datasets":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"publisher":{"type":"string"},"licence":{"type":"string"},"url":{"type":"string"}},"required":["id","name","publisher","licence"],"additionalProperties":false}},"asOf":{"type":"string","description":"Last complete month covered by the data, YYYY-MM, or the rules version date"},"period":{"anyOf":[{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false},{"type":"null"}]},"n":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"Sample size behind the headline figure"},"method":{"type":"string"},"rules":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"lastVerified":{"type":"string"},"confidence":{"type":"string","enum":["primary","secondary","assumption","placeholder"]}},"required":["id","title","url","lastVerified","confidence"],"additionalProperties":false}},"synthetic":{"type":"boolean"},"label":{"description":"Label that must be shown with the figures (SYNTHETIC, or the source's own label)","type":["string","null"]}},"required":["source","basis","datasets","asOf","period","n","method","rules","synthetic","label"],"additionalProperties":false},"attribution":{"type":"string","minLength":1},"synthetic":{"type":"boolean"},"notes":{"default":[],"type":"array","items":{"type":"string"}},"kind":{"type":"string","const":"rank"},"direction":{"type":"string","enum":["asc","desc"]},"rows":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"value":{"type":["number","null"]},"n":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"highlight":{"default":false,"type":"boolean"},"tag":{"type":"string"}},"required":["label","value","highlight"],"additionalProperties":false}},"marker":{"type":"object","properties":{"value":{"type":"number"},"label":{"type":"string"}},"required":["value","label"],"additionalProperties":false}},"required":["id","title","unit","provenance","attribution","synthetic","notes","kind","direction","rows"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"subtitle":{"type":"string"},"unit":{"type":"string","enum":["AED","AED_per_sqft","AED_per_year","percent","count","years","km"]},"provenance":{"type":"object","properties":{"source":{"type":"string","description":"Id of the source behind the figures, e.g. synthetic-marts or public-listings"},"basis":{"type":"string","enum":["transactions","asking-prices","rules"]},"datasets":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"publisher":{"type":"string"},"licence":{"type":"string"},"url":{"type":"string"}},"required":["id","name","publisher","licence"],"additionalProperties":false}},"asOf":{"type":"string","description":"Last complete month covered by the data, YYYY-MM, or the rules version date"},"period":{"anyOf":[{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false},{"type":"null"}]},"n":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"Sample size behind the headline figure"},"method":{"type":"string"},"rules":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"lastVerified":{"type":"string"},"confidence":{"type":"string","enum":["primary","secondary","assumption","placeholder"]}},"required":["id","title","url","lastVerified","confidence"],"additionalProperties":false}},"synthetic":{"type":"boolean"},"label":{"description":"Label that must be shown with the figures (SYNTHETIC, or the source's own label)","type":["string","null"]}},"required":["source","basis","datasets","asOf","period","n","method","rules","synthetic","label"],"additionalProperties":false},"attribution":{"type":"string","minLength":1},"synthetic":{"type":"boolean"},"notes":{"default":[],"type":"array","items":{"type":"string"}},"kind":{"type":"string","const":"composition"},"rows":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"parts":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"value":{"type":"number"}},"required":["key","label","value"],"additionalProperties":false}}},"required":["label","parts"],"additionalProperties":false}}},"required":["id","title","unit","provenance","attribution","synthetic","notes","kind","rows"],"additionalProperties":false}]}},"provenance":{"type":"object","properties":{"source":{"type":"string","description":"Id of the source behind the figures, e.g. synthetic-marts or public-listings"},"basis":{"type":"string","enum":["transactions","asking-prices","rules"]},"datasets":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"publisher":{"type":"string"},"licence":{"type":"string"},"url":{"type":"string"}},"required":["id","name","publisher","licence"],"additionalProperties":false}},"asOf":{"type":"string","description":"Last complete month covered by the data, YYYY-MM, or the rules version date"},"period":{"anyOf":[{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false},{"type":"null"}]},"n":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"Sample size behind the headline figure"},"method":{"type":"string"},"rules":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"lastVerified":{"type":"string"},"confidence":{"type":"string","enum":["primary","secondary","assumption","placeholder"]}},"required":["id","title","url","lastVerified","confidence"],"additionalProperties":false}},"synthetic":{"type":"boolean"},"label":{"description":"Label that must be shown with the figures (SYNTHETIC, or the source's own label)","type":["string","null"]}},"required":["source","basis","datasets","asOf","period","n","method","rules","synthetic","label"],"additionalProperties":false},"attribution":{"type":"string","minLength":1},"synthetic":{"type":"boolean"}},"required":["goal","propertyType","bedrooms","anchor","areas","rows","summary","notes","charts","provenance","attribution","synthetic"],"additionalProperties":false}}}}}},"400":{"description":"Invalid input"},"404":{"description":"Unknown tool"},"429":{"description":"Rate limited"}}}},"/api/v1/tools/market_map":{"post":{"operationId":"market_map","summary":"Market map","description":"Areas on a map for one metric (price_psf, sale_median, rent_median, gross_yield, txn_12m, offplan_share). Optionally marks an anchor area and, given a price ceiling, which areas fit under it and which exceed it (on the 12-month median sale price, optionally for a bedroom count). Returns a MapSpec with provenance and attribution, plus GeoJSON. Areas below the minimum sample or without an anchor are left off and counted.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"metric":{"default":"price_psf","type":"string","enum":["price_psf","sale_median","rent_median","gross_yield","txn_12m","offplan_share"]},"propertyType":{"default":"apartment","description":"apartment or villa","type":"string","enum":["apartment","villa"]},"areas":{"description":"Defaults to every area (or the anchor and its neighbours)","maxItems":30,"type":"array","items":{"type":"string","minLength":2,"maxLength":80,"description":"Area id or name, as returned by market_snapshot (call it without an area to list all areas)"}},"anchorArea":{"type":"string","minLength":2,"maxLength":80,"description":"Area id or name, as returned by market_snapshot (call it without an area to list all areas)"},"nearby":{"description":"With anchorArea: show only the anchor and this many nearest areas","type":"integer","minimum":1,"maximum":10},"ceilingAed":{"description":"A price ceiling, e.g. from the affordability tool","type":"number","exclusiveMinimum":0},"bedrooms":{"type":"integer","minimum":0,"maximum":5}}}}}},"responses":{"200":{"description":"Tool output with provenance and attribution","content":{"application/json":{"schema":{"type":"object","properties":{"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"map":{"type":"object","properties":{"kind":{"type":"string","const":"area-map"},"version":{"type":"number","const":1},"id":{"type":"string"},"title":{"type":"string"},"metric":{"type":"object","properties":{"key":{"type":"string","enum":["price_psf","sale_median","rent_median","gross_yield","txn_12m","offplan_share"]},"label":{"type":"string"},"unit":{"type":"string","enum":["AED","AED_per_sqft","AED_per_year","percent","count","years","km"]},"scale":{"type":"string","enum":["sqrt","rank"]}},"required":["key","label","unit","scale"],"additionalProperties":false},"areas":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"lng":{"type":"number"},"lat":{"type":"number"},"value":{"type":["number","null"]},"n":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"role":{"default":"other","type":"string","enum":["anchor","fits","exceeds","other"]},"overCeiling":{"description":"Set on the anchor when it exceeds the user's ceiling","type":"boolean"},"priceForCeiling":{"type":["number","null"]},"distanceKm":{"type":["number","null"]}},"required":["id","name","lng","lat","value","n","role"],"additionalProperties":false}},"suppressed":{"type":"object","properties":{"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"reasons":{"type":"array","items":{"type":"string","enum":["n<5","n<10","no-anchor"]}},"names":{"default":[],"type":"array","items":{"type":"string"}}},"required":["count","reasons","names"],"additionalProperties":false},"ceiling":{"anyOf":[{"type":"object","properties":{"value":{"type":"number"},"basis":{"type":"string"}},"required":["value","basis"],"additionalProperties":false},{"type":"null"}]},"view":{"type":"object","properties":{"mode":{"type":"string","const":"2d"},"bbox":{"type":"array","prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"items":false,"minItems":4,"maxItems":4}},"required":["mode","bbox"],"additionalProperties":false},"provenance":{"type":"object","properties":{"source":{"type":"string","description":"Id of the source behind the figures, e.g. synthetic-marts or public-listings"},"basis":{"type":"string","enum":["transactions","asking-prices","rules"]},"datasets":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"publisher":{"type":"string"},"licence":{"type":"string"},"url":{"type":"string"}},"required":["id","name","publisher","licence"],"additionalProperties":false}},"asOf":{"type":"string","description":"Last complete month covered by the data, YYYY-MM, or the rules version date"},"period":{"anyOf":[{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false},{"type":"null"}]},"n":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"Sample size behind the headline figure"},"method":{"type":"string"},"rules":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"lastVerified":{"type":"string"},"confidence":{"type":"string","enum":["primary","secondary","assumption","placeholder"]}},"required":["id","title","url","lastVerified","confidence"],"additionalProperties":false}},"synthetic":{"type":"boolean"},"label":{"description":"Label that must be shown with the figures (SYNTHETIC, or the source's own label)","type":["string","null"]}},"required":["source","basis","datasets","asOf","period","n","method","rules","synthetic","label"],"additionalProperties":false},"attribution":{"type":"object","properties":{"data":{"type":"string","minLength":1},"basemap":{"type":"string"}},"required":["data"],"additionalProperties":false},"synthetic":{"type":"boolean"}},"required":["kind","version","id","title","metric","areas","suppressed","ceiling","view","provenance","attribution","synthetic"],"additionalProperties":false},"geojson":{"type":"object","properties":{"type":{"type":"string","const":"FeatureCollection"},"features":{"type":"array","items":{}}},"required":["type","features"],"additionalProperties":false},"summary":{"type":"array","items":{"type":"string"},"description":"Short factual lines; every number here is also in the structured fields"},"notes":{"type":"array","items":{"type":"string"},"description":"Caveats the answer must keep (coarse data, assumptions, not advice)"},"charts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"subtitle":{"type":"string"},"unit":{"type":"string","enum":["AED","AED_per_sqft","AED_per_year","percent","count","years","km"]},"provenance":{"type":"object","properties":{"source":{"type":"string","description":"Id of the source behind the figures, e.g. synthetic-marts or public-listings"},"basis":{"type":"string","enum":["transactions","asking-prices","rules"]},"datasets":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"publisher":{"type":"string"},"licence":{"type":"string"},"url":{"type":"string"}},"required":["id","name","publisher","licence"],"additionalProperties":false}},"asOf":{"type":"string","description":"Last complete month covered by the data, YYYY-MM, or the rules version date"},"period":{"anyOf":[{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false},{"type":"null"}]},"n":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"Sample size behind the headline figure"},"method":{"type":"string"},"rules":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"lastVerified":{"type":"string"},"confidence":{"type":"string","enum":["primary","secondary","assumption","placeholder"]}},"required":["id","title","url","lastVerified","confidence"],"additionalProperties":false}},"synthetic":{"type":"boolean"},"label":{"description":"Label that must be shown with the figures (SYNTHETIC, or the source's own label)","type":["string","null"]}},"required":["source","basis","datasets","asOf","period","n","method","rules","synthetic","label"],"additionalProperties":false},"attribution":{"type":"string","minLength":1},"synthetic":{"type":"boolean"},"notes":{"default":[],"type":"array","items":{"type":"string"}},"kind":{"type":"string","const":"line"},"xLabel":{"type":"string"},"series":{"minItems":1,"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"style":{"default":"solid","type":"string","enum":["solid","dashed"]},"points":{"type":"array","items":{"type":"object","properties":{"x":{"type":"string"},"y":{"type":["number","null"]},"n":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["x","y"],"additionalProperties":false}}},"required":["key","label","style","points"],"additionalProperties":false}}},"required":["id","title","unit","provenance","attribution","synthetic","notes","kind","xLabel","series"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"subtitle":{"type":"string"},"unit":{"type":"string","enum":["AED","AED_per_sqft","AED_per_year","percent","count","years","km"]},"provenance":{"type":"object","properties":{"source":{"type":"string","description":"Id of the source behind the figures, e.g. synthetic-marts or public-listings"},"basis":{"type":"string","enum":["transactions","asking-prices","rules"]},"datasets":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"publisher":{"type":"string"},"licence":{"type":"string"},"url":{"type":"string"}},"required":["id","name","publisher","licence"],"additionalProperties":false}},"asOf":{"type":"string","description":"Last complete month covered by the data, YYYY-MM, or the rules version date"},"period":{"anyOf":[{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false},{"type":"null"}]},"n":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"Sample size behind the headline figure"},"method":{"type":"string"},"rules":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"lastVerified":{"type":"string"},"confidence":{"type":"string","enum":["primary","secondary","assumption","placeholder"]}},"required":["id","title","url","lastVerified","confidence"],"additionalProperties":false}},"synthetic":{"type":"boolean"},"label":{"description":"Label that must be shown with the figures (SYNTHETIC, or the source's own label)","type":["string","null"]}},"required":["source","basis","datasets","asOf","period","n","method","rules","synthetic","label"],"additionalProperties":false},"attribution":{"type":"string","minLength":1},"synthetic":{"type":"boolean"},"notes":{"default":[],"type":"array","items":{"type":"string"}},"kind":{"type":"string","const":"range"},"rows":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"p10":{"type":"number"},"p25":{"type":"number"},"median":{"type":"number"},"p75":{"type":"number"},"p90":{"type":"number"},"n":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["label","median","n"],"additionalProperties":false}},"marker":{"type":"object","properties":{"value":{"type":"number"},"label":{"type":"string"}},"required":["value","label"],"additionalProperties":false}},"required":["id","title","unit","provenance","attribution","synthetic","notes","kind","rows"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"subtitle":{"type":"string"},"unit":{"type":"string","enum":["AED","AED_per_sqft","AED_per_year","percent","count","years","km"]},"provenance":{"type":"object","properties":{"source":{"type":"string","description":"Id of the source behind the figures, e.g. synthetic-marts or public-listings"},"basis":{"type":"string","enum":["transactions","asking-prices","rules"]},"datasets":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"publisher":{"type":"string"},"licence":{"type":"string"},"url":{"type":"string"}},"required":["id","name","publisher","licence"],"additionalProperties":false}},"asOf":{"type":"string","description":"Last complete month covered by the data, YYYY-MM, or the rules version date"},"period":{"anyOf":[{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false},{"type":"null"}]},"n":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"Sample size behind the headline figure"},"method":{"type":"string"},"rules":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"lastVerified":{"type":"string"},"confidence":{"type":"string","enum":["primary","secondary","assumption","placeholder"]}},"required":["id","title","url","lastVerified","confidence"],"additionalProperties":false}},"synthetic":{"type":"boolean"},"label":{"description":"Label that must be shown with the figures (SYNTHETIC, or the source's own label)","type":["string","null"]}},"required":["source","basis","datasets","asOf","period","n","method","rules","synthetic","label"],"additionalProperties":false},"attribution":{"type":"string","minLength":1},"synthetic":{"type":"boolean"},"notes":{"default":[],"type":"array","items":{"type":"string"}},"kind":{"type":"string","const":"rank"},"direction":{"type":"string","enum":["asc","desc"]},"rows":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"value":{"type":["number","null"]},"n":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"highlight":{"default":false,"type":"boolean"},"tag":{"type":"string"}},"required":["label","value","highlight"],"additionalProperties":false}},"marker":{"type":"object","properties":{"value":{"type":"number"},"label":{"type":"string"}},"required":["value","label"],"additionalProperties":false}},"required":["id","title","unit","provenance","attribution","synthetic","notes","kind","direction","rows"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"subtitle":{"type":"string"},"unit":{"type":"string","enum":["AED","AED_per_sqft","AED_per_year","percent","count","years","km"]},"provenance":{"type":"object","properties":{"source":{"type":"string","description":"Id of the source behind the figures, e.g. synthetic-marts or public-listings"},"basis":{"type":"string","enum":["transactions","asking-prices","rules"]},"datasets":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"publisher":{"type":"string"},"licence":{"type":"string"},"url":{"type":"string"}},"required":["id","name","publisher","licence"],"additionalProperties":false}},"asOf":{"type":"string","description":"Last complete month covered by the data, YYYY-MM, or the rules version date"},"period":{"anyOf":[{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false},{"type":"null"}]},"n":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"Sample size behind the headline figure"},"method":{"type":"string"},"rules":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"lastVerified":{"type":"string"},"confidence":{"type":"string","enum":["primary","secondary","assumption","placeholder"]}},"required":["id","title","url","lastVerified","confidence"],"additionalProperties":false}},"synthetic":{"type":"boolean"},"label":{"description":"Label that must be shown with the figures (SYNTHETIC, or the source's own label)","type":["string","null"]}},"required":["source","basis","datasets","asOf","period","n","method","rules","synthetic","label"],"additionalProperties":false},"attribution":{"type":"string","minLength":1},"synthetic":{"type":"boolean"},"notes":{"default":[],"type":"array","items":{"type":"string"}},"kind":{"type":"string","const":"composition"},"rows":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"parts":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"value":{"type":"number"}},"required":["key","label","value"],"additionalProperties":false}}},"required":["label","parts"],"additionalProperties":false}}},"required":["id","title","unit","provenance","attribution","synthetic","notes","kind","rows"],"additionalProperties":false}]}},"provenance":{"type":"object","properties":{"source":{"type":"string","description":"Id of the source behind the figures, e.g. synthetic-marts or public-listings"},"basis":{"type":"string","enum":["transactions","asking-prices","rules"]},"datasets":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"publisher":{"type":"string"},"licence":{"type":"string"},"url":{"type":"string"}},"required":["id","name","publisher","licence"],"additionalProperties":false}},"asOf":{"type":"string","description":"Last complete month covered by the data, YYYY-MM, or the rules version date"},"period":{"anyOf":[{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false},{"type":"null"}]},"n":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"Sample size behind the headline figure"},"method":{"type":"string"},"rules":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"lastVerified":{"type":"string"},"confidence":{"type":"string","enum":["primary","secondary","assumption","placeholder"]}},"required":["id","title","url","lastVerified","confidence"],"additionalProperties":false}},"synthetic":{"type":"boolean"},"label":{"description":"Label that must be shown with the figures (SYNTHETIC, or the source's own label)","type":["string","null"]}},"required":["source","basis","datasets","asOf","period","n","method","rules","synthetic","label"],"additionalProperties":false},"attribution":{"type":"string","minLength":1},"synthetic":{"type":"boolean"}},"required":["map","geojson","summary","notes","charts","provenance","attribution","synthetic"],"additionalProperties":false}}}}}},"400":{"description":"Invalid input"},"404":{"description":"Unknown tool"},"429":{"description":"Rate limited"}}}},"/api/v1/tools/rent_options":{"post":{"operationId":"rent_options","summary":"Rent options","description":"What homes rent for, by area and property type: P10, P25, median, P75 and P90 of annual rent over the last 12 months, with n (areas need n >= 10). Pass areas, or anchorArea plus nearby, or neither to scan all areas. With a budget it marks where the median, or at least the cheaper quarter, fits. Coarse: no bedroom split.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"areas":{"maxItems":8,"type":"array","items":{"type":"string","minLength":2,"maxLength":80,"description":"Area id or name, as returned by market_snapshot (call it without an area to list all areas)"}},"anchorArea":{"type":"string","minLength":2,"maxLength":80,"description":"Area id or name, as returned by market_snapshot (call it without an area to list all areas)"},"nearby":{"default":3,"type":"integer","minimum":1,"maximum":6},"propertyType":{"default":"apartment","description":"apartment or villa","type":"string","enum":["apartment","villa"]},"budgetAnnual":{"description":"The user's annual rent budget in AED","type":"number","exclusiveMinimum":0}}}}}},"responses":{"200":{"description":"Tool output with provenance and attribution","content":{"application/json":{"schema":{"type":"object","properties":{"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"propertyType":{"type":"string"},"budgetAnnual":{"type":["number","null"]},"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"n":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"p10":{"type":["number","null"]},"p25":{"type":"number"},"median":{"type":"number"},"p75":{"type":"number"},"p90":{"type":["number","null"]},"fit":{"anyOf":[{"type":"string","enum":["median","lower-quarter","none"]},{"type":"null"}]}},"required":["id","name","n","p10","p25","median","p75","p90","fit"],"additionalProperties":false}},"leftOut":{"type":"array","items":{"type":"string"}},"summary":{"type":"array","items":{"type":"string"},"description":"Short factual lines; every number here is also in the structured fields"},"notes":{"type":"array","items":{"type":"string"},"description":"Caveats the answer must keep (coarse data, assumptions, not advice)"},"charts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"subtitle":{"type":"string"},"unit":{"type":"string","enum":["AED","AED_per_sqft","AED_per_year","percent","count","years","km"]},"provenance":{"type":"object","properties":{"source":{"type":"string","description":"Id of the source behind the figures, e.g. synthetic-marts or public-listings"},"basis":{"type":"string","enum":["transactions","asking-prices","rules"]},"datasets":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"publisher":{"type":"string"},"licence":{"type":"string"},"url":{"type":"string"}},"required":["id","name","publisher","licence"],"additionalProperties":false}},"asOf":{"type":"string","description":"Last complete month covered by the data, YYYY-MM, or the rules version date"},"period":{"anyOf":[{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false},{"type":"null"}]},"n":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"Sample size behind the headline figure"},"method":{"type":"string"},"rules":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"lastVerified":{"type":"string"},"confidence":{"type":"string","enum":["primary","secondary","assumption","placeholder"]}},"required":["id","title","url","lastVerified","confidence"],"additionalProperties":false}},"synthetic":{"type":"boolean"},"label":{"description":"Label that must be shown with the figures (SYNTHETIC, or the source's own label)","type":["string","null"]}},"required":["source","basis","datasets","asOf","period","n","method","rules","synthetic","label"],"additionalProperties":false},"attribution":{"type":"string","minLength":1},"synthetic":{"type":"boolean"},"notes":{"default":[],"type":"array","items":{"type":"string"}},"kind":{"type":"string","const":"line"},"xLabel":{"type":"string"},"series":{"minItems":1,"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"style":{"default":"solid","type":"string","enum":["solid","dashed"]},"points":{"type":"array","items":{"type":"object","properties":{"x":{"type":"string"},"y":{"type":["number","null"]},"n":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["x","y"],"additionalProperties":false}}},"required":["key","label","style","points"],"additionalProperties":false}}},"required":["id","title","unit","provenance","attribution","synthetic","notes","kind","xLabel","series"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"subtitle":{"type":"string"},"unit":{"type":"string","enum":["AED","AED_per_sqft","AED_per_year","percent","count","years","km"]},"provenance":{"type":"object","properties":{"source":{"type":"string","description":"Id of the source behind the figures, e.g. synthetic-marts or public-listings"},"basis":{"type":"string","enum":["transactions","asking-prices","rules"]},"datasets":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"publisher":{"type":"string"},"licence":{"type":"string"},"url":{"type":"string"}},"required":["id","name","publisher","licence"],"additionalProperties":false}},"asOf":{"type":"string","description":"Last complete month covered by the data, YYYY-MM, or the rules version date"},"period":{"anyOf":[{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false},{"type":"null"}]},"n":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"Sample size behind the headline figure"},"method":{"type":"string"},"rules":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"lastVerified":{"type":"string"},"confidence":{"type":"string","enum":["primary","secondary","assumption","placeholder"]}},"required":["id","title","url","lastVerified","confidence"],"additionalProperties":false}},"synthetic":{"type":"boolean"},"label":{"description":"Label that must be shown with the figures (SYNTHETIC, or the source's own label)","type":["string","null"]}},"required":["source","basis","datasets","asOf","period","n","method","rules","synthetic","label"],"additionalProperties":false},"attribution":{"type":"string","minLength":1},"synthetic":{"type":"boolean"},"notes":{"default":[],"type":"array","items":{"type":"string"}},"kind":{"type":"string","const":"range"},"rows":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"p10":{"type":"number"},"p25":{"type":"number"},"median":{"type":"number"},"p75":{"type":"number"},"p90":{"type":"number"},"n":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["label","median","n"],"additionalProperties":false}},"marker":{"type":"object","properties":{"value":{"type":"number"},"label":{"type":"string"}},"required":["value","label"],"additionalProperties":false}},"required":["id","title","unit","provenance","attribution","synthetic","notes","kind","rows"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"subtitle":{"type":"string"},"unit":{"type":"string","enum":["AED","AED_per_sqft","AED_per_year","percent","count","years","km"]},"provenance":{"type":"object","properties":{"source":{"type":"string","description":"Id of the source behind the figures, e.g. synthetic-marts or public-listings"},"basis":{"type":"string","enum":["transactions","asking-prices","rules"]},"datasets":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"publisher":{"type":"string"},"licence":{"type":"string"},"url":{"type":"string"}},"required":["id","name","publisher","licence"],"additionalProperties":false}},"asOf":{"type":"string","description":"Last complete month covered by the data, YYYY-MM, or the rules version date"},"period":{"anyOf":[{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false},{"type":"null"}]},"n":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"Sample size behind the headline figure"},"method":{"type":"string"},"rules":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"lastVerified":{"type":"string"},"confidence":{"type":"string","enum":["primary","secondary","assumption","placeholder"]}},"required":["id","title","url","lastVerified","confidence"],"additionalProperties":false}},"synthetic":{"type":"boolean"},"label":{"description":"Label that must be shown with the figures (SYNTHETIC, or the source's own label)","type":["string","null"]}},"required":["source","basis","datasets","asOf","period","n","method","rules","synthetic","label"],"additionalProperties":false},"attribution":{"type":"string","minLength":1},"synthetic":{"type":"boolean"},"notes":{"default":[],"type":"array","items":{"type":"string"}},"kind":{"type":"string","const":"rank"},"direction":{"type":"string","enum":["asc","desc"]},"rows":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"value":{"type":["number","null"]},"n":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"highlight":{"default":false,"type":"boolean"},"tag":{"type":"string"}},"required":["label","value","highlight"],"additionalProperties":false}},"marker":{"type":"object","properties":{"value":{"type":"number"},"label":{"type":"string"}},"required":["value","label"],"additionalProperties":false}},"required":["id","title","unit","provenance","attribution","synthetic","notes","kind","direction","rows"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"subtitle":{"type":"string"},"unit":{"type":"string","enum":["AED","AED_per_sqft","AED_per_year","percent","count","years","km"]},"provenance":{"type":"object","properties":{"source":{"type":"string","description":"Id of the source behind the figures, e.g. synthetic-marts or public-listings"},"basis":{"type":"string","enum":["transactions","asking-prices","rules"]},"datasets":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"publisher":{"type":"string"},"licence":{"type":"string"},"url":{"type":"string"}},"required":["id","name","publisher","licence"],"additionalProperties":false}},"asOf":{"type":"string","description":"Last complete month covered by the data, YYYY-MM, or the rules version date"},"period":{"anyOf":[{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false},{"type":"null"}]},"n":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"Sample size behind the headline figure"},"method":{"type":"string"},"rules":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"lastVerified":{"type":"string"},"confidence":{"type":"string","enum":["primary","secondary","assumption","placeholder"]}},"required":["id","title","url","lastVerified","confidence"],"additionalProperties":false}},"synthetic":{"type":"boolean"},"label":{"description":"Label that must be shown with the figures (SYNTHETIC, or the source's own label)","type":["string","null"]}},"required":["source","basis","datasets","asOf","period","n","method","rules","synthetic","label"],"additionalProperties":false},"attribution":{"type":"string","minLength":1},"synthetic":{"type":"boolean"},"notes":{"default":[],"type":"array","items":{"type":"string"}},"kind":{"type":"string","const":"composition"},"rows":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"parts":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"value":{"type":"number"}},"required":["key","label","value"],"additionalProperties":false}}},"required":["label","parts"],"additionalProperties":false}}},"required":["id","title","unit","provenance","attribution","synthetic","notes","kind","rows"],"additionalProperties":false}]}},"provenance":{"type":"object","properties":{"source":{"type":"string","description":"Id of the source behind the figures, e.g. synthetic-marts or public-listings"},"basis":{"type":"string","enum":["transactions","asking-prices","rules"]},"datasets":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"publisher":{"type":"string"},"licence":{"type":"string"},"url":{"type":"string"}},"required":["id","name","publisher","licence"],"additionalProperties":false}},"asOf":{"type":"string","description":"Last complete month covered by the data, YYYY-MM, or the rules version date"},"period":{"anyOf":[{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false},{"type":"null"}]},"n":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"Sample size behind the headline figure"},"method":{"type":"string"},"rules":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"lastVerified":{"type":"string"},"confidence":{"type":"string","enum":["primary","secondary","assumption","placeholder"]}},"required":["id","title","url","lastVerified","confidence"],"additionalProperties":false}},"synthetic":{"type":"boolean"},"label":{"description":"Label that must be shown with the figures (SYNTHETIC, or the source's own label)","type":["string","null"]}},"required":["source","basis","datasets","asOf","period","n","method","rules","synthetic","label"],"additionalProperties":false},"attribution":{"type":"string","minLength":1},"synthetic":{"type":"boolean"}},"required":["propertyType","budgetAnnual","rows","leftOut","summary","notes","charts","provenance","attribution","synthetic"],"additionalProperties":false}}}}}},"400":{"description":"Invalid input"},"404":{"description":"Unknown tool"},"429":{"description":"Rate limited"}}}},"/api/v1/tools/rental_yield":{"post":{"operationId":"rental_yield","summary":"Rental yield","description":"Gross rental yield per area for apartments or villas: median annual rent / median sale price over the last 12 months, with an IQR-based band and both sample sizes. Labelled gross and coarse. Without areas it ranks every area with enough data.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"areas":{"maxItems":10,"type":"array","items":{"type":"string","minLength":2,"maxLength":80,"description":"Area id or name, as returned by market_snapshot (call it without an area to list all areas)"}},"propertyType":{"default":"apartment","description":"apartment or villa","type":"string","enum":["apartment","villa"]}}}}}},"responses":{"200":{"description":"Tool output with provenance and attribution","content":{"application/json":{"schema":{"type":"object","properties":{"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"propertyType":{"type":"string"},"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"grossYieldPct":{"type":"number"},"bandLowPct":{"type":["number","null"]},"bandHighPct":{"type":["number","null"]},"medianPrice":{"type":"number"},"medianAnnualRent":{"type":"number"},"saleN":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"rentN":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","name","grossYieldPct","bandLowPct","bandHighPct","medianPrice","medianAnnualRent","saleN","rentN"],"additionalProperties":false}},"leftOut":{"type":"array","items":{"type":"string"}},"summary":{"type":"array","items":{"type":"string"},"description":"Short factual lines; every number here is also in the structured fields"},"notes":{"type":"array","items":{"type":"string"},"description":"Caveats the answer must keep (coarse data, assumptions, not advice)"},"charts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"subtitle":{"type":"string"},"unit":{"type":"string","enum":["AED","AED_per_sqft","AED_per_year","percent","count","years","km"]},"provenance":{"type":"object","properties":{"source":{"type":"string","description":"Id of the source behind the figures, e.g. synthetic-marts or public-listings"},"basis":{"type":"string","enum":["transactions","asking-prices","rules"]},"datasets":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"publisher":{"type":"string"},"licence":{"type":"string"},"url":{"type":"string"}},"required":["id","name","publisher","licence"],"additionalProperties":false}},"asOf":{"type":"string","description":"Last complete month covered by the data, YYYY-MM, or the rules version date"},"period":{"anyOf":[{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false},{"type":"null"}]},"n":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"Sample size behind the headline figure"},"method":{"type":"string"},"rules":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"lastVerified":{"type":"string"},"confidence":{"type":"string","enum":["primary","secondary","assumption","placeholder"]}},"required":["id","title","url","lastVerified","confidence"],"additionalProperties":false}},"synthetic":{"type":"boolean"},"label":{"description":"Label that must be shown with the figures (SYNTHETIC, or the source's own label)","type":["string","null"]}},"required":["source","basis","datasets","asOf","period","n","method","rules","synthetic","label"],"additionalProperties":false},"attribution":{"type":"string","minLength":1},"synthetic":{"type":"boolean"},"notes":{"default":[],"type":"array","items":{"type":"string"}},"kind":{"type":"string","const":"line"},"xLabel":{"type":"string"},"series":{"minItems":1,"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"style":{"default":"solid","type":"string","enum":["solid","dashed"]},"points":{"type":"array","items":{"type":"object","properties":{"x":{"type":"string"},"y":{"type":["number","null"]},"n":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["x","y"],"additionalProperties":false}}},"required":["key","label","style","points"],"additionalProperties":false}}},"required":["id","title","unit","provenance","attribution","synthetic","notes","kind","xLabel","series"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"subtitle":{"type":"string"},"unit":{"type":"string","enum":["AED","AED_per_sqft","AED_per_year","percent","count","years","km"]},"provenance":{"type":"object","properties":{"source":{"type":"string","description":"Id of the source behind the figures, e.g. synthetic-marts or public-listings"},"basis":{"type":"string","enum":["transactions","asking-prices","rules"]},"datasets":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"publisher":{"type":"string"},"licence":{"type":"string"},"url":{"type":"string"}},"required":["id","name","publisher","licence"],"additionalProperties":false}},"asOf":{"type":"string","description":"Last complete month covered by the data, YYYY-MM, or the rules version date"},"period":{"anyOf":[{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false},{"type":"null"}]},"n":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"Sample size behind the headline figure"},"method":{"type":"string"},"rules":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"lastVerified":{"type":"string"},"confidence":{"type":"string","enum":["primary","secondary","assumption","placeholder"]}},"required":["id","title","url","lastVerified","confidence"],"additionalProperties":false}},"synthetic":{"type":"boolean"},"label":{"description":"Label that must be shown with the figures (SYNTHETIC, or the source's own label)","type":["string","null"]}},"required":["source","basis","datasets","asOf","period","n","method","rules","synthetic","label"],"additionalProperties":false},"attribution":{"type":"string","minLength":1},"synthetic":{"type":"boolean"},"notes":{"default":[],"type":"array","items":{"type":"string"}},"kind":{"type":"string","const":"range"},"rows":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"p10":{"type":"number"},"p25":{"type":"number"},"median":{"type":"number"},"p75":{"type":"number"},"p90":{"type":"number"},"n":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["label","median","n"],"additionalProperties":false}},"marker":{"type":"object","properties":{"value":{"type":"number"},"label":{"type":"string"}},"required":["value","label"],"additionalProperties":false}},"required":["id","title","unit","provenance","attribution","synthetic","notes","kind","rows"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"subtitle":{"type":"string"},"unit":{"type":"string","enum":["AED","AED_per_sqft","AED_per_year","percent","count","years","km"]},"provenance":{"type":"object","properties":{"source":{"type":"string","description":"Id of the source behind the figures, e.g. synthetic-marts or public-listings"},"basis":{"type":"string","enum":["transactions","asking-prices","rules"]},"datasets":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"publisher":{"type":"string"},"licence":{"type":"string"},"url":{"type":"string"}},"required":["id","name","publisher","licence"],"additionalProperties":false}},"asOf":{"type":"string","description":"Last complete month covered by the data, YYYY-MM, or the rules version date"},"period":{"anyOf":[{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false},{"type":"null"}]},"n":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"Sample size behind the headline figure"},"method":{"type":"string"},"rules":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"lastVerified":{"type":"string"},"confidence":{"type":"string","enum":["primary","secondary","assumption","placeholder"]}},"required":["id","title","url","lastVerified","confidence"],"additionalProperties":false}},"synthetic":{"type":"boolean"},"label":{"description":"Label that must be shown with the figures (SYNTHETIC, or the source's own label)","type":["string","null"]}},"required":["source","basis","datasets","asOf","period","n","method","rules","synthetic","label"],"additionalProperties":false},"attribution":{"type":"string","minLength":1},"synthetic":{"type":"boolean"},"notes":{"default":[],"type":"array","items":{"type":"string"}},"kind":{"type":"string","const":"rank"},"direction":{"type":"string","enum":["asc","desc"]},"rows":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"value":{"type":["number","null"]},"n":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"highlight":{"default":false,"type":"boolean"},"tag":{"type":"string"}},"required":["label","value","highlight"],"additionalProperties":false}},"marker":{"type":"object","properties":{"value":{"type":"number"},"label":{"type":"string"}},"required":["value","label"],"additionalProperties":false}},"required":["id","title","unit","provenance","attribution","synthetic","notes","kind","direction","rows"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"subtitle":{"type":"string"},"unit":{"type":"string","enum":["AED","AED_per_sqft","AED_per_year","percent","count","years","km"]},"provenance":{"type":"object","properties":{"source":{"type":"string","description":"Id of the source behind the figures, e.g. synthetic-marts or public-listings"},"basis":{"type":"string","enum":["transactions","asking-prices","rules"]},"datasets":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"publisher":{"type":"string"},"licence":{"type":"string"},"url":{"type":"string"}},"required":["id","name","publisher","licence"],"additionalProperties":false}},"asOf":{"type":"string","description":"Last complete month covered by the data, YYYY-MM, or the rules version date"},"period":{"anyOf":[{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false},{"type":"null"}]},"n":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"Sample size behind the headline figure"},"method":{"type":"string"},"rules":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"lastVerified":{"type":"string"},"confidence":{"type":"string","enum":["primary","secondary","assumption","placeholder"]}},"required":["id","title","url","lastVerified","confidence"],"additionalProperties":false}},"synthetic":{"type":"boolean"},"label":{"description":"Label that must be shown with the figures (SYNTHETIC, or the source's own label)","type":["string","null"]}},"required":["source","basis","datasets","asOf","period","n","method","rules","synthetic","label"],"additionalProperties":false},"attribution":{"type":"string","minLength":1},"synthetic":{"type":"boolean"},"notes":{"default":[],"type":"array","items":{"type":"string"}},"kind":{"type":"string","const":"composition"},"rows":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"parts":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"value":{"type":"number"}},"required":["key","label","value"],"additionalProperties":false}}},"required":["label","parts"],"additionalProperties":false}}},"required":["id","title","unit","provenance","attribution","synthetic","notes","kind","rows"],"additionalProperties":false}]}},"provenance":{"type":"object","properties":{"source":{"type":"string","description":"Id of the source behind the figures, e.g. synthetic-marts or public-listings"},"basis":{"type":"string","enum":["transactions","asking-prices","rules"]},"datasets":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"publisher":{"type":"string"},"licence":{"type":"string"},"url":{"type":"string"}},"required":["id","name","publisher","licence"],"additionalProperties":false}},"asOf":{"type":"string","description":"Last complete month covered by the data, YYYY-MM, or the rules version date"},"period":{"anyOf":[{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false},{"type":"null"}]},"n":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"Sample size behind the headline figure"},"method":{"type":"string"},"rules":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"lastVerified":{"type":"string"},"confidence":{"type":"string","enum":["primary","secondary","assumption","placeholder"]}},"required":["id","title","url","lastVerified","confidence"],"additionalProperties":false}},"synthetic":{"type":"boolean"},"label":{"description":"Label that must be shown with the figures (SYNTHETIC, or the source's own label)","type":["string","null"]}},"required":["source","basis","datasets","asOf","period","n","method","rules","synthetic","label"],"additionalProperties":false},"attribution":{"type":"string","minLength":1},"synthetic":{"type":"boolean"}},"required":["propertyType","rows","leftOut","summary","notes","charts","provenance","attribution","synthetic"],"additionalProperties":false}}}}}},"400":{"description":"Invalid input"},"404":{"description":"Unknown tool"},"429":{"description":"Rate limited"}}}},"/api/v1/tools/affordability":{"post":{"operationId":"affordability","summary":"Affordability (regulatory ceiling)","description":"The regulatory price ceiling under CBUAE Circular 31/2013 for the user's own numbers: LTV, 50% debt-burden ratio (stress-tested), loan multiple, and cash needed including DLD fees. Lists which areas' 12-month median price (optionally for a bedroom count) is under the ceiling. This is never a lending decision: say 'regulatory ceiling, not a lending decision', never 'you qualify'.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"monthlyIncome":{"type":"number","exclusiveMinimum":0,"description":"Gross household income per month, AED"},"savings":{"type":"number","minimum":0,"description":"Cash available for the purchase, AED"},"monthlyDebts":{"default":0,"description":"Existing loan and card payments per month, AED","type":"number","minimum":0},"buyer":{"default":"expat","type":"string","enum":["expat","national"]},"firstHome":{"default":true,"type":"boolean"},"offplan":{"default":false,"type":"boolean"},"propertyType":{"default":"apartment","description":"apartment or villa","type":"string","enum":["apartment","villa"]},"bedrooms":{"type":"integer","minimum":0,"maximum":5},"areas":{"description":"Areas to check against the ceiling; default all","maxItems":30,"type":"array","items":{"type":"string","minLength":2,"maxLength":80,"description":"Area id or name, as returned by market_snapshot (call it without an area to list all areas)"}},"ratePct":{"description":"Annual mortgage rate in %; default = dated EIBOR value + assumed margin","type":"number","minimum":0,"maximum":20},"marginPct":{"description":"Bank margin over EIBOR in %, if no ratePct","type":"number","minimum":0,"maximum":10},"tenorYears":{"type":"integer","minimum":1,"maximum":25}},"required":["monthlyIncome","savings"]}}}},"responses":{"200":{"description":"Tool output with provenance and attribution","content":{"application/json":{"schema":{"type":"object","properties":{"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"ceilingPrice":{"type":"number"},"bindingConstraint":{"type":"string","enum":["cash","debt-burden","income-multiple"]},"loan":{"type":"number"},"ltvPct":{"type":"number"},"downPayment":{"type":"number"},"fees":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"amount":{"type":"number"}},"required":["key","label","amount"],"additionalProperties":false}},"cashNeeded":{"type":"number"},"monthlyPayment":{"type":"number"},"ratePct":{"type":"number"},"stressedRatePct":{"type":"number"},"limits":{"type":"object","properties":{"loanByDebtBurden":{"type":"number"},"loanByIncomeMultiple":{"type":"number"},"maxMonthlyPayment":{"type":"number"}},"required":["loanByDebtBurden","loanByIncomeMultiple","maxMonthlyPayment"],"additionalProperties":false},"areasThatFit":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"medianPrice":{"type":"number"},"n":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","name","medianPrice","n"],"additionalProperties":false}},"areasAbove":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"medianPrice":{"type":"number"},"n":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","name","medianPrice","n"],"additionalProperties":false}},"firstHomeProgramme":{"type":"object","properties":{"status":{"type":"string"},"url":{"type":"string"}},"required":["status","url"],"additionalProperties":false},"summary":{"type":"array","items":{"type":"string"},"description":"Short factual lines; every number here is also in the structured fields"},"notes":{"type":"array","items":{"type":"string"},"description":"Caveats the answer must keep (coarse data, assumptions, not advice)"},"charts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"subtitle":{"type":"string"},"unit":{"type":"string","enum":["AED","AED_per_sqft","AED_per_year","percent","count","years","km"]},"provenance":{"type":"object","properties":{"source":{"type":"string","description":"Id of the source behind the figures, e.g. synthetic-marts or public-listings"},"basis":{"type":"string","enum":["transactions","asking-prices","rules"]},"datasets":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"publisher":{"type":"string"},"licence":{"type":"string"},"url":{"type":"string"}},"required":["id","name","publisher","licence"],"additionalProperties":false}},"asOf":{"type":"string","description":"Last complete month covered by the data, YYYY-MM, or the rules version date"},"period":{"anyOf":[{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false},{"type":"null"}]},"n":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"Sample size behind the headline figure"},"method":{"type":"string"},"rules":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"lastVerified":{"type":"string"},"confidence":{"type":"string","enum":["primary","secondary","assumption","placeholder"]}},"required":["id","title","url","lastVerified","confidence"],"additionalProperties":false}},"synthetic":{"type":"boolean"},"label":{"description":"Label that must be shown with the figures (SYNTHETIC, or the source's own label)","type":["string","null"]}},"required":["source","basis","datasets","asOf","period","n","method","rules","synthetic","label"],"additionalProperties":false},"attribution":{"type":"string","minLength":1},"synthetic":{"type":"boolean"},"notes":{"default":[],"type":"array","items":{"type":"string"}},"kind":{"type":"string","const":"line"},"xLabel":{"type":"string"},"series":{"minItems":1,"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"style":{"default":"solid","type":"string","enum":["solid","dashed"]},"points":{"type":"array","items":{"type":"object","properties":{"x":{"type":"string"},"y":{"type":["number","null"]},"n":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["x","y"],"additionalProperties":false}}},"required":["key","label","style","points"],"additionalProperties":false}}},"required":["id","title","unit","provenance","attribution","synthetic","notes","kind","xLabel","series"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"subtitle":{"type":"string"},"unit":{"type":"string","enum":["AED","AED_per_sqft","AED_per_year","percent","count","years","km"]},"provenance":{"type":"object","properties":{"source":{"type":"string","description":"Id of the source behind the figures, e.g. synthetic-marts or public-listings"},"basis":{"type":"string","enum":["transactions","asking-prices","rules"]},"datasets":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"publisher":{"type":"string"},"licence":{"type":"string"},"url":{"type":"string"}},"required":["id","name","publisher","licence"],"additionalProperties":false}},"asOf":{"type":"string","description":"Last complete month covered by the data, YYYY-MM, or the rules version date"},"period":{"anyOf":[{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false},{"type":"null"}]},"n":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"Sample size behind the headline figure"},"method":{"type":"string"},"rules":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"lastVerified":{"type":"string"},"confidence":{"type":"string","enum":["primary","secondary","assumption","placeholder"]}},"required":["id","title","url","lastVerified","confidence"],"additionalProperties":false}},"synthetic":{"type":"boolean"},"label":{"description":"Label that must be shown with the figures (SYNTHETIC, or the source's own label)","type":["string","null"]}},"required":["source","basis","datasets","asOf","period","n","method","rules","synthetic","label"],"additionalProperties":false},"attribution":{"type":"string","minLength":1},"synthetic":{"type":"boolean"},"notes":{"default":[],"type":"array","items":{"type":"string"}},"kind":{"type":"string","const":"range"},"rows":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"p10":{"type":"number"},"p25":{"type":"number"},"median":{"type":"number"},"p75":{"type":"number"},"p90":{"type":"number"},"n":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["label","median","n"],"additionalProperties":false}},"marker":{"type":"object","properties":{"value":{"type":"number"},"label":{"type":"string"}},"required":["value","label"],"additionalProperties":false}},"required":["id","title","unit","provenance","attribution","synthetic","notes","kind","rows"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"subtitle":{"type":"string"},"unit":{"type":"string","enum":["AED","AED_per_sqft","AED_per_year","percent","count","years","km"]},"provenance":{"type":"object","properties":{"source":{"type":"string","description":"Id of the source behind the figures, e.g. synthetic-marts or public-listings"},"basis":{"type":"string","enum":["transactions","asking-prices","rules"]},"datasets":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"publisher":{"type":"string"},"licence":{"type":"string"},"url":{"type":"string"}},"required":["id","name","publisher","licence"],"additionalProperties":false}},"asOf":{"type":"string","description":"Last complete month covered by the data, YYYY-MM, or the rules version date"},"period":{"anyOf":[{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false},{"type":"null"}]},"n":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"Sample size behind the headline figure"},"method":{"type":"string"},"rules":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"lastVerified":{"type":"string"},"confidence":{"type":"string","enum":["primary","secondary","assumption","placeholder"]}},"required":["id","title","url","lastVerified","confidence"],"additionalProperties":false}},"synthetic":{"type":"boolean"},"label":{"description":"Label that must be shown with the figures (SYNTHETIC, or the source's own label)","type":["string","null"]}},"required":["source","basis","datasets","asOf","period","n","method","rules","synthetic","label"],"additionalProperties":false},"attribution":{"type":"string","minLength":1},"synthetic":{"type":"boolean"},"notes":{"default":[],"type":"array","items":{"type":"string"}},"kind":{"type":"string","const":"rank"},"direction":{"type":"string","enum":["asc","desc"]},"rows":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"value":{"type":["number","null"]},"n":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"highlight":{"default":false,"type":"boolean"},"tag":{"type":"string"}},"required":["label","value","highlight"],"additionalProperties":false}},"marker":{"type":"object","properties":{"value":{"type":"number"},"label":{"type":"string"}},"required":["value","label"],"additionalProperties":false}},"required":["id","title","unit","provenance","attribution","synthetic","notes","kind","direction","rows"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"subtitle":{"type":"string"},"unit":{"type":"string","enum":["AED","AED_per_sqft","AED_per_year","percent","count","years","km"]},"provenance":{"type":"object","properties":{"source":{"type":"string","description":"Id of the source behind the figures, e.g. synthetic-marts or public-listings"},"basis":{"type":"string","enum":["transactions","asking-prices","rules"]},"datasets":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"publisher":{"type":"string"},"licence":{"type":"string"},"url":{"type":"string"}},"required":["id","name","publisher","licence"],"additionalProperties":false}},"asOf":{"type":"string","description":"Last complete month covered by the data, YYYY-MM, or the rules version date"},"period":{"anyOf":[{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false},{"type":"null"}]},"n":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"Sample size behind the headline figure"},"method":{"type":"string"},"rules":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"lastVerified":{"type":"string"},"confidence":{"type":"string","enum":["primary","secondary","assumption","placeholder"]}},"required":["id","title","url","lastVerified","confidence"],"additionalProperties":false}},"synthetic":{"type":"boolean"},"label":{"description":"Label that must be shown with the figures (SYNTHETIC, or the source's own label)","type":["string","null"]}},"required":["source","basis","datasets","asOf","period","n","method","rules","synthetic","label"],"additionalProperties":false},"attribution":{"type":"string","minLength":1},"synthetic":{"type":"boolean"},"notes":{"default":[],"type":"array","items":{"type":"string"}},"kind":{"type":"string","const":"composition"},"rows":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"parts":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"value":{"type":"number"}},"required":["key","label","value"],"additionalProperties":false}}},"required":["label","parts"],"additionalProperties":false}}},"required":["id","title","unit","provenance","attribution","synthetic","notes","kind","rows"],"additionalProperties":false}]}},"provenance":{"type":"object","properties":{"source":{"type":"string","description":"Id of the source behind the figures, e.g. synthetic-marts or public-listings"},"basis":{"type":"string","enum":["transactions","asking-prices","rules"]},"datasets":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"publisher":{"type":"string"},"licence":{"type":"string"},"url":{"type":"string"}},"required":["id","name","publisher","licence"],"additionalProperties":false}},"asOf":{"type":"string","description":"Last complete month covered by the data, YYYY-MM, or the rules version date"},"period":{"anyOf":[{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false},{"type":"null"}]},"n":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"Sample size behind the headline figure"},"method":{"type":"string"},"rules":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"lastVerified":{"type":"string"},"confidence":{"type":"string","enum":["primary","secondary","assumption","placeholder"]}},"required":["id","title","url","lastVerified","confidence"],"additionalProperties":false}},"synthetic":{"type":"boolean"},"label":{"description":"Label that must be shown with the figures (SYNTHETIC, or the source's own label)","type":["string","null"]}},"required":["source","basis","datasets","asOf","period","n","method","rules","synthetic","label"],"additionalProperties":false},"attribution":{"type":"string","minLength":1},"synthetic":{"type":"boolean"}},"required":["ceilingPrice","bindingConstraint","loan","ltvPct","downPayment","fees","cashNeeded","monthlyPayment","ratePct","stressedRatePct","limits","areasThatFit","areasAbove","firstHomeProgramme","summary","notes","charts","provenance","attribution","synthetic"],"additionalProperties":false}}}}}},"400":{"description":"Invalid input"},"404":{"description":"Unknown tool"},"429":{"description":"Rate limited"}}}},"/api/v1/tools/rent_vs_buy":{"post":{"operationId":"rent_vs_buy","summary":"Rent vs buy","description":"Cumulative net cost of renting vs buying the same home over a horizon, with the break-even year under low, base and high home-value growth assumptions (user-editable; not forecasts). Buying counts down payment, fees, mortgage payments, service charges and maintenance, minus equity after selling costs; renting counts rent and letting fees, minus the return the buyer's upfront cash would have earned. Use prices and rents from the market tools or the user.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"price":{"type":"number","exclusiveMinimum":0},"annualRent":{"type":"number","exclusiveMinimum":0,"description":"Rent for a comparable home, AED per year"},"years":{"default":5,"type":"integer","minimum":1,"maximum":25},"buyer":{"default":"expat","type":"string","enum":["expat","national"]},"firstHome":{"default":true,"type":"boolean"},"downPaymentPct":{"description":"Default: the minimum under the CBUAE LTV","type":"number","minimum":0,"maximum":100},"propertyType":{"default":"apartment","description":"apartment or villa","type":"string","enum":["apartment","villa"]},"sizeSqft":{"description":"For service charges; without it service charges are left out","type":"number","exclusiveMinimum":0},"serviceChargePerSqft":{"type":"number","minimum":0},"priceGrowthPct":{"type":"object","properties":{"low":{"type":"number"},"base":{"type":"number"},"high":{"type":"number"}},"required":["low","base","high"]},"rentGrowthPct":{"type":"number","minimum":-10,"maximum":20},"cashReturnPct":{"type":"number","minimum":0,"maximum":20},"ratePct":{"description":"Annual mortgage rate in %; default = dated EIBOR value + assumed margin","type":"number","minimum":0,"maximum":20},"marginPct":{"description":"Bank margin over EIBOR in %, if no ratePct","type":"number","minimum":0,"maximum":10},"tenorYears":{"type":"integer","minimum":1,"maximum":25}},"required":["price","annualRent"]}}}},"responses":{"200":{"description":"Tool output with provenance and attribution","content":{"application/json":{"schema":{"type":"object","properties":{"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"horizonYears":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"ratePct":{"type":"number"},"downPayment":{"type":"number"},"loan":{"type":"number"},"upfrontFees":{"type":"number"},"monthlyPayment":{"type":"number"},"bands":{"type":"array","items":{"type":"object","properties":{"band":{"type":"string","enum":["low","base","high"]},"priceGrowthPct":{"type":"number"},"breakEvenYear":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"buyNetCostAtHorizon":{"type":"number"},"rentNetCostAtHorizon":{"type":"number"}},"required":["band","priceGrowthPct","breakEvenYear","buyNetCostAtHorizon","rentNetCostAtHorizon"],"additionalProperties":false}},"yearly":{"type":"array","items":{"type":"object","properties":{"year":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"rentNet":{"type":"number"},"buyNetLow":{"type":"number"},"buyNetBase":{"type":"number"},"buyNetHigh":{"type":"number"}},"required":["year","rentNet","buyNetLow","buyNetBase","buyNetHigh"],"additionalProperties":false}},"assumptions":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"value":{"type":"string"},"confidence":{"type":"string"}},"required":["label","value","confidence"],"additionalProperties":false}},"summary":{"type":"array","items":{"type":"string"},"description":"Short factual lines; every number here is also in the structured fields"},"notes":{"type":"array","items":{"type":"string"},"description":"Caveats the answer must keep (coarse data, assumptions, not advice)"},"charts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"subtitle":{"type":"string"},"unit":{"type":"string","enum":["AED","AED_per_sqft","AED_per_year","percent","count","years","km"]},"provenance":{"type":"object","properties":{"source":{"type":"string","description":"Id of the source behind the figures, e.g. synthetic-marts or public-listings"},"basis":{"type":"string","enum":["transactions","asking-prices","rules"]},"datasets":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"publisher":{"type":"string"},"licence":{"type":"string"},"url":{"type":"string"}},"required":["id","name","publisher","licence"],"additionalProperties":false}},"asOf":{"type":"string","description":"Last complete month covered by the data, YYYY-MM, or the rules version date"},"period":{"anyOf":[{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false},{"type":"null"}]},"n":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"Sample size behind the headline figure"},"method":{"type":"string"},"rules":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"lastVerified":{"type":"string"},"confidence":{"type":"string","enum":["primary","secondary","assumption","placeholder"]}},"required":["id","title","url","lastVerified","confidence"],"additionalProperties":false}},"synthetic":{"type":"boolean"},"label":{"description":"Label that must be shown with the figures (SYNTHETIC, or the source's own label)","type":["string","null"]}},"required":["source","basis","datasets","asOf","period","n","method","rules","synthetic","label"],"additionalProperties":false},"attribution":{"type":"string","minLength":1},"synthetic":{"type":"boolean"},"notes":{"default":[],"type":"array","items":{"type":"string"}},"kind":{"type":"string","const":"line"},"xLabel":{"type":"string"},"series":{"minItems":1,"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"style":{"default":"solid","type":"string","enum":["solid","dashed"]},"points":{"type":"array","items":{"type":"object","properties":{"x":{"type":"string"},"y":{"type":["number","null"]},"n":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["x","y"],"additionalProperties":false}}},"required":["key","label","style","points"],"additionalProperties":false}}},"required":["id","title","unit","provenance","attribution","synthetic","notes","kind","xLabel","series"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"subtitle":{"type":"string"},"unit":{"type":"string","enum":["AED","AED_per_sqft","AED_per_year","percent","count","years","km"]},"provenance":{"type":"object","properties":{"source":{"type":"string","description":"Id of the source behind the figures, e.g. synthetic-marts or public-listings"},"basis":{"type":"string","enum":["transactions","asking-prices","rules"]},"datasets":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"publisher":{"type":"string"},"licence":{"type":"string"},"url":{"type":"string"}},"required":["id","name","publisher","licence"],"additionalProperties":false}},"asOf":{"type":"string","description":"Last complete month covered by the data, YYYY-MM, or the rules version date"},"period":{"anyOf":[{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false},{"type":"null"}]},"n":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"Sample size behind the headline figure"},"method":{"type":"string"},"rules":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"lastVerified":{"type":"string"},"confidence":{"type":"string","enum":["primary","secondary","assumption","placeholder"]}},"required":["id","title","url","lastVerified","confidence"],"additionalProperties":false}},"synthetic":{"type":"boolean"},"label":{"description":"Label that must be shown with the figures (SYNTHETIC, or the source's own label)","type":["string","null"]}},"required":["source","basis","datasets","asOf","period","n","method","rules","synthetic","label"],"additionalProperties":false},"attribution":{"type":"string","minLength":1},"synthetic":{"type":"boolean"},"notes":{"default":[],"type":"array","items":{"type":"string"}},"kind":{"type":"string","const":"range"},"rows":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"p10":{"type":"number"},"p25":{"type":"number"},"median":{"type":"number"},"p75":{"type":"number"},"p90":{"type":"number"},"n":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["label","median","n"],"additionalProperties":false}},"marker":{"type":"object","properties":{"value":{"type":"number"},"label":{"type":"string"}},"required":["value","label"],"additionalProperties":false}},"required":["id","title","unit","provenance","attribution","synthetic","notes","kind","rows"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"subtitle":{"type":"string"},"unit":{"type":"string","enum":["AED","AED_per_sqft","AED_per_year","percent","count","years","km"]},"provenance":{"type":"object","properties":{"source":{"type":"string","description":"Id of the source behind the figures, e.g. synthetic-marts or public-listings"},"basis":{"type":"string","enum":["transactions","asking-prices","rules"]},"datasets":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"publisher":{"type":"string"},"licence":{"type":"string"},"url":{"type":"string"}},"required":["id","name","publisher","licence"],"additionalProperties":false}},"asOf":{"type":"string","description":"Last complete month covered by the data, YYYY-MM, or the rules version date"},"period":{"anyOf":[{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false},{"type":"null"}]},"n":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"Sample size behind the headline figure"},"method":{"type":"string"},"rules":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"lastVerified":{"type":"string"},"confidence":{"type":"string","enum":["primary","secondary","assumption","placeholder"]}},"required":["id","title","url","lastVerified","confidence"],"additionalProperties":false}},"synthetic":{"type":"boolean"},"label":{"description":"Label that must be shown with the figures (SYNTHETIC, or the source's own label)","type":["string","null"]}},"required":["source","basis","datasets","asOf","period","n","method","rules","synthetic","label"],"additionalProperties":false},"attribution":{"type":"string","minLength":1},"synthetic":{"type":"boolean"},"notes":{"default":[],"type":"array","items":{"type":"string"}},"kind":{"type":"string","const":"rank"},"direction":{"type":"string","enum":["asc","desc"]},"rows":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"value":{"type":["number","null"]},"n":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"highlight":{"default":false,"type":"boolean"},"tag":{"type":"string"}},"required":["label","value","highlight"],"additionalProperties":false}},"marker":{"type":"object","properties":{"value":{"type":"number"},"label":{"type":"string"}},"required":["value","label"],"additionalProperties":false}},"required":["id","title","unit","provenance","attribution","synthetic","notes","kind","direction","rows"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"subtitle":{"type":"string"},"unit":{"type":"string","enum":["AED","AED_per_sqft","AED_per_year","percent","count","years","km"]},"provenance":{"type":"object","properties":{"source":{"type":"string","description":"Id of the source behind the figures, e.g. synthetic-marts or public-listings"},"basis":{"type":"string","enum":["transactions","asking-prices","rules"]},"datasets":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"publisher":{"type":"string"},"licence":{"type":"string"},"url":{"type":"string"}},"required":["id","name","publisher","licence"],"additionalProperties":false}},"asOf":{"type":"string","description":"Last complete month covered by the data, YYYY-MM, or the rules version date"},"period":{"anyOf":[{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false},{"type":"null"}]},"n":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"Sample size behind the headline figure"},"method":{"type":"string"},"rules":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"lastVerified":{"type":"string"},"confidence":{"type":"string","enum":["primary","secondary","assumption","placeholder"]}},"required":["id","title","url","lastVerified","confidence"],"additionalProperties":false}},"synthetic":{"type":"boolean"},"label":{"description":"Label that must be shown with the figures (SYNTHETIC, or the source's own label)","type":["string","null"]}},"required":["source","basis","datasets","asOf","period","n","method","rules","synthetic","label"],"additionalProperties":false},"attribution":{"type":"string","minLength":1},"synthetic":{"type":"boolean"},"notes":{"default":[],"type":"array","items":{"type":"string"}},"kind":{"type":"string","const":"composition"},"rows":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"parts":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"value":{"type":"number"}},"required":["key","label","value"],"additionalProperties":false}}},"required":["label","parts"],"additionalProperties":false}}},"required":["id","title","unit","provenance","attribution","synthetic","notes","kind","rows"],"additionalProperties":false}]}},"provenance":{"type":"object","properties":{"source":{"type":"string","description":"Id of the source behind the figures, e.g. synthetic-marts or public-listings"},"basis":{"type":"string","enum":["transactions","asking-prices","rules"]},"datasets":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"publisher":{"type":"string"},"licence":{"type":"string"},"url":{"type":"string"}},"required":["id","name","publisher","licence"],"additionalProperties":false}},"asOf":{"type":"string","description":"Last complete month covered by the data, YYYY-MM, or the rules version date"},"period":{"anyOf":[{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false},{"type":"null"}]},"n":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"Sample size behind the headline figure"},"method":{"type":"string"},"rules":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"lastVerified":{"type":"string"},"confidence":{"type":"string","enum":["primary","secondary","assumption","placeholder"]}},"required":["id","title","url","lastVerified","confidence"],"additionalProperties":false}},"synthetic":{"type":"boolean"},"label":{"description":"Label that must be shown with the figures (SYNTHETIC, or the source's own label)","type":["string","null"]}},"required":["source","basis","datasets","asOf","period","n","method","rules","synthetic","label"],"additionalProperties":false},"attribution":{"type":"string","minLength":1},"synthetic":{"type":"boolean"}},"required":["horizonYears","ratePct","downPayment","loan","upfrontFees","monthlyPayment","bands","yearly","assumptions","summary","notes","charts","provenance","attribution","synthetic"],"additionalProperties":false}}}}}},"400":{"description":"Invalid input"},"404":{"description":"Unknown tool"},"429":{"description":"Rate limited"}}}},"/api/v1/tools/offplan_cashflow":{"post":{"operationId":"offplan_cashflow","summary":"Off-plan cashflow","description":"Cash out over time for an off-plan payment plan (preset 60/40, 70/30, 50/50 or custom instalments) vs buying a ready home with a mortgage now. Applies Oqood 4% and the 50% off-plan LTV cap for any mortgage at handover; handover delay is a user input. Optionally shows the area's off-plan share of sales.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"price":{"type":"number","exclusiveMinimum":0},"plan":{"default":"60/40","type":"string","enum":["60/40","70/30","50/50","custom"]},"instalments":{"description":"For plan=custom; percentages must sum to 100","maxItems":24,"type":"array","items":{"type":"object","properties":{"label":{"type":"string","maxLength":60},"pct":{"type":"number","minimum":0,"maximum":100},"month":{"type":"integer","minimum":0,"maximum":120}},"required":["label","pct","month"]}},"handoverMonths":{"default":36,"type":"integer","minimum":1,"maximum":84},"handoverDelayMonths":{"default":0,"type":"integer","minimum":0,"maximum":48},"mortgageAtHandover":{"default":true,"type":"boolean"},"buyer":{"default":"expat","type":"string","enum":["expat","national"]},"area":{"type":"string","minLength":2,"maxLength":80,"description":"Area id or name, as returned by market_snapshot (call it without an area to list all areas)"},"propertyType":{"default":"apartment","description":"apartment or villa","type":"string","enum":["apartment","villa"]},"ratePct":{"description":"Annual mortgage rate in %; default = dated EIBOR value + assumed margin","type":"number","minimum":0,"maximum":20},"marginPct":{"description":"Bank margin over EIBOR in %, if no ratePct","type":"number","minimum":0,"maximum":10},"tenorYears":{"type":"integer","minimum":1,"maximum":25}},"required":["price"]}}}},"responses":{"200":{"description":"Tool output with provenance and attribution","content":{"application/json":{"schema":{"type":"object","properties":{"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"plan":{"type":"string"},"handoverMonth":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"offplan":{"type":"object","properties":{"schedule":{"type":"array","items":{"type":"object","properties":{"month":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"label":{"type":"string"},"amount":{"type":"number"}},"required":["month","label","amount"],"additionalProperties":false}},"cashBeforeHandover":{"type":"number"},"handoverPayment":{"type":"number"},"handoverLoan":{"type":"number"},"cashTotalToHandover":{"type":"number"}},"required":["schedule","cashBeforeHandover","handoverPayment","handoverLoan","cashTotalToHandover"],"additionalProperties":false},"ready":{"type":"object","properties":{"downPayment":{"type":"number"},"fees":{"type":"number"},"loan":{"type":"number"},"monthlyPayment":{"type":"number"},"cashUpfront":{"type":"number"}},"required":["downPayment","fees","loan","monthlyPayment","cashUpfront"],"additionalProperties":false},"areaOffplanSharePct":{"type":["number","null"]},"summary":{"type":"array","items":{"type":"string"},"description":"Short factual lines; every number here is also in the structured fields"},"notes":{"type":"array","items":{"type":"string"},"description":"Caveats the answer must keep (coarse data, assumptions, not advice)"},"charts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"subtitle":{"type":"string"},"unit":{"type":"string","enum":["AED","AED_per_sqft","AED_per_year","percent","count","years","km"]},"provenance":{"type":"object","properties":{"source":{"type":"string","description":"Id of the source behind the figures, e.g. synthetic-marts or public-listings"},"basis":{"type":"string","enum":["transactions","asking-prices","rules"]},"datasets":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"publisher":{"type":"string"},"licence":{"type":"string"},"url":{"type":"string"}},"required":["id","name","publisher","licence"],"additionalProperties":false}},"asOf":{"type":"string","description":"Last complete month covered by the data, YYYY-MM, or the rules version date"},"period":{"anyOf":[{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false},{"type":"null"}]},"n":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"Sample size behind the headline figure"},"method":{"type":"string"},"rules":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"lastVerified":{"type":"string"},"confidence":{"type":"string","enum":["primary","secondary","assumption","placeholder"]}},"required":["id","title","url","lastVerified","confidence"],"additionalProperties":false}},"synthetic":{"type":"boolean"},"label":{"description":"Label that must be shown with the figures (SYNTHETIC, or the source's own label)","type":["string","null"]}},"required":["source","basis","datasets","asOf","period","n","method","rules","synthetic","label"],"additionalProperties":false},"attribution":{"type":"string","minLength":1},"synthetic":{"type":"boolean"},"notes":{"default":[],"type":"array","items":{"type":"string"}},"kind":{"type":"string","const":"line"},"xLabel":{"type":"string"},"series":{"minItems":1,"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"style":{"default":"solid","type":"string","enum":["solid","dashed"]},"points":{"type":"array","items":{"type":"object","properties":{"x":{"type":"string"},"y":{"type":["number","null"]},"n":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["x","y"],"additionalProperties":false}}},"required":["key","label","style","points"],"additionalProperties":false}}},"required":["id","title","unit","provenance","attribution","synthetic","notes","kind","xLabel","series"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"subtitle":{"type":"string"},"unit":{"type":"string","enum":["AED","AED_per_sqft","AED_per_year","percent","count","years","km"]},"provenance":{"type":"object","properties":{"source":{"type":"string","description":"Id of the source behind the figures, e.g. synthetic-marts or public-listings"},"basis":{"type":"string","enum":["transactions","asking-prices","rules"]},"datasets":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"publisher":{"type":"string"},"licence":{"type":"string"},"url":{"type":"string"}},"required":["id","name","publisher","licence"],"additionalProperties":false}},"asOf":{"type":"string","description":"Last complete month covered by the data, YYYY-MM, or the rules version date"},"period":{"anyOf":[{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false},{"type":"null"}]},"n":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"Sample size behind the headline figure"},"method":{"type":"string"},"rules":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"lastVerified":{"type":"string"},"confidence":{"type":"string","enum":["primary","secondary","assumption","placeholder"]}},"required":["id","title","url","lastVerified","confidence"],"additionalProperties":false}},"synthetic":{"type":"boolean"},"label":{"description":"Label that must be shown with the figures (SYNTHETIC, or the source's own label)","type":["string","null"]}},"required":["source","basis","datasets","asOf","period","n","method","rules","synthetic","label"],"additionalProperties":false},"attribution":{"type":"string","minLength":1},"synthetic":{"type":"boolean"},"notes":{"default":[],"type":"array","items":{"type":"string"}},"kind":{"type":"string","const":"range"},"rows":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"p10":{"type":"number"},"p25":{"type":"number"},"median":{"type":"number"},"p75":{"type":"number"},"p90":{"type":"number"},"n":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["label","median","n"],"additionalProperties":false}},"marker":{"type":"object","properties":{"value":{"type":"number"},"label":{"type":"string"}},"required":["value","label"],"additionalProperties":false}},"required":["id","title","unit","provenance","attribution","synthetic","notes","kind","rows"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"subtitle":{"type":"string"},"unit":{"type":"string","enum":["AED","AED_per_sqft","AED_per_year","percent","count","years","km"]},"provenance":{"type":"object","properties":{"source":{"type":"string","description":"Id of the source behind the figures, e.g. synthetic-marts or public-listings"},"basis":{"type":"string","enum":["transactions","asking-prices","rules"]},"datasets":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"publisher":{"type":"string"},"licence":{"type":"string"},"url":{"type":"string"}},"required":["id","name","publisher","licence"],"additionalProperties":false}},"asOf":{"type":"string","description":"Last complete month covered by the data, YYYY-MM, or the rules version date"},"period":{"anyOf":[{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false},{"type":"null"}]},"n":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"Sample size behind the headline figure"},"method":{"type":"string"},"rules":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"lastVerified":{"type":"string"},"confidence":{"type":"string","enum":["primary","secondary","assumption","placeholder"]}},"required":["id","title","url","lastVerified","confidence"],"additionalProperties":false}},"synthetic":{"type":"boolean"},"label":{"description":"Label that must be shown with the figures (SYNTHETIC, or the source's own label)","type":["string","null"]}},"required":["source","basis","datasets","asOf","period","n","method","rules","synthetic","label"],"additionalProperties":false},"attribution":{"type":"string","minLength":1},"synthetic":{"type":"boolean"},"notes":{"default":[],"type":"array","items":{"type":"string"}},"kind":{"type":"string","const":"rank"},"direction":{"type":"string","enum":["asc","desc"]},"rows":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"value":{"type":["number","null"]},"n":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"highlight":{"default":false,"type":"boolean"},"tag":{"type":"string"}},"required":["label","value","highlight"],"additionalProperties":false}},"marker":{"type":"object","properties":{"value":{"type":"number"},"label":{"type":"string"}},"required":["value","label"],"additionalProperties":false}},"required":["id","title","unit","provenance","attribution","synthetic","notes","kind","direction","rows"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"subtitle":{"type":"string"},"unit":{"type":"string","enum":["AED","AED_per_sqft","AED_per_year","percent","count","years","km"]},"provenance":{"type":"object","properties":{"source":{"type":"string","description":"Id of the source behind the figures, e.g. synthetic-marts or public-listings"},"basis":{"type":"string","enum":["transactions","asking-prices","rules"]},"datasets":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"publisher":{"type":"string"},"licence":{"type":"string"},"url":{"type":"string"}},"required":["id","name","publisher","licence"],"additionalProperties":false}},"asOf":{"type":"string","description":"Last complete month covered by the data, YYYY-MM, or the rules version date"},"period":{"anyOf":[{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false},{"type":"null"}]},"n":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"Sample size behind the headline figure"},"method":{"type":"string"},"rules":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"lastVerified":{"type":"string"},"confidence":{"type":"string","enum":["primary","secondary","assumption","placeholder"]}},"required":["id","title","url","lastVerified","confidence"],"additionalProperties":false}},"synthetic":{"type":"boolean"},"label":{"description":"Label that must be shown with the figures (SYNTHETIC, or the source's own label)","type":["string","null"]}},"required":["source","basis","datasets","asOf","period","n","method","rules","synthetic","label"],"additionalProperties":false},"attribution":{"type":"string","minLength":1},"synthetic":{"type":"boolean"},"notes":{"default":[],"type":"array","items":{"type":"string"}},"kind":{"type":"string","const":"composition"},"rows":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"parts":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"value":{"type":"number"}},"required":["key","label","value"],"additionalProperties":false}}},"required":["label","parts"],"additionalProperties":false}}},"required":["id","title","unit","provenance","attribution","synthetic","notes","kind","rows"],"additionalProperties":false}]}},"provenance":{"type":"object","properties":{"source":{"type":"string","description":"Id of the source behind the figures, e.g. synthetic-marts or public-listings"},"basis":{"type":"string","enum":["transactions","asking-prices","rules"]},"datasets":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"publisher":{"type":"string"},"licence":{"type":"string"},"url":{"type":"string"}},"required":["id","name","publisher","licence"],"additionalProperties":false}},"asOf":{"type":"string","description":"Last complete month covered by the data, YYYY-MM, or the rules version date"},"period":{"anyOf":[{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false},{"type":"null"}]},"n":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"Sample size behind the headline figure"},"method":{"type":"string"},"rules":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"lastVerified":{"type":"string"},"confidence":{"type":"string","enum":["primary","secondary","assumption","placeholder"]}},"required":["id","title","url","lastVerified","confidence"],"additionalProperties":false}},"synthetic":{"type":"boolean"},"label":{"description":"Label that must be shown with the figures (SYNTHETIC, or the source's own label)","type":["string","null"]}},"required":["source","basis","datasets","asOf","period","n","method","rules","synthetic","label"],"additionalProperties":false},"attribution":{"type":"string","minLength":1},"synthetic":{"type":"boolean"}},"required":["plan","handoverMonth","offplan","ready","areaOffplanSharePct","summary","notes","charts","provenance","attribution","synthetic"],"additionalProperties":false}}}}}},"400":{"description":"Invalid input"},"404":{"description":"Unknown tool"},"429":{"description":"Rate limited"}}}},"/api/v1/tools/renewal_check":{"post":{"operationId":"renewal_check","summary":"Renewal check","description":"For renters facing a renewal: computes the maximum rent increase under Decree 43/2013 from the AVERAGE THE USER ENTERS from the official DLD Smart Rental Index for their unit (never from market medians), and checks the 90-day notice rule when dates are given. Ask the user for the official index result; link them to it.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"currentAnnualRent":{"type":"number","exclusiveMinimum":0},"officialIndexAverage":{"type":"number","exclusiveMinimum":0,"description":"Average annual rent for similar units from the official DLD Smart Rental Index, as entered by the user"},"proposedAnnualRent":{"type":"number","exclusiveMinimum":0},"contractEndDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"noticeReceivedDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["currentAnnualRent","officialIndexAverage"]}}}},"responses":{"200":{"description":"Tool output with provenance and attribution","content":{"application/json":{"schema":{"type":"object","properties":{"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"belowAveragePct":{"type":"number"},"maxIncreasePct":{"type":"number"},"maxNewAnnualRent":{"type":"number"},"proposedIncreasePct":{"type":["number","null"]},"proposedWithinBand":{"type":["boolean","null"]},"notice":{"anyOf":[{"type":"object","properties":{"daysBeforeExpiry":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"requiredDays":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"meetsRequirement":{"type":"boolean"}},"required":["daysBeforeExpiry","requiredDays","meetsRequirement"],"additionalProperties":false},{"type":"null"}]},"links":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string"}},"required":["label","url"],"additionalProperties":false}},"summary":{"type":"array","items":{"type":"string"},"description":"Short factual lines; every number here is also in the structured fields"},"notes":{"type":"array","items":{"type":"string"},"description":"Caveats the answer must keep (coarse data, assumptions, not advice)"},"charts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"subtitle":{"type":"string"},"unit":{"type":"string","enum":["AED","AED_per_sqft","AED_per_year","percent","count","years","km"]},"provenance":{"type":"object","properties":{"source":{"type":"string","description":"Id of the source behind the figures, e.g. synthetic-marts or public-listings"},"basis":{"type":"string","enum":["transactions","asking-prices","rules"]},"datasets":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"publisher":{"type":"string"},"licence":{"type":"string"},"url":{"type":"string"}},"required":["id","name","publisher","licence"],"additionalProperties":false}},"asOf":{"type":"string","description":"Last complete month covered by the data, YYYY-MM, or the rules version date"},"period":{"anyOf":[{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false},{"type":"null"}]},"n":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"Sample size behind the headline figure"},"method":{"type":"string"},"rules":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"lastVerified":{"type":"string"},"confidence":{"type":"string","enum":["primary","secondary","assumption","placeholder"]}},"required":["id","title","url","lastVerified","confidence"],"additionalProperties":false}},"synthetic":{"type":"boolean"},"label":{"description":"Label that must be shown with the figures (SYNTHETIC, or the source's own label)","type":["string","null"]}},"required":["source","basis","datasets","asOf","period","n","method","rules","synthetic","label"],"additionalProperties":false},"attribution":{"type":"string","minLength":1},"synthetic":{"type":"boolean"},"notes":{"default":[],"type":"array","items":{"type":"string"}},"kind":{"type":"string","const":"line"},"xLabel":{"type":"string"},"series":{"minItems":1,"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"style":{"default":"solid","type":"string","enum":["solid","dashed"]},"points":{"type":"array","items":{"type":"object","properties":{"x":{"type":"string"},"y":{"type":["number","null"]},"n":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["x","y"],"additionalProperties":false}}},"required":["key","label","style","points"],"additionalProperties":false}}},"required":["id","title","unit","provenance","attribution","synthetic","notes","kind","xLabel","series"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"subtitle":{"type":"string"},"unit":{"type":"string","enum":["AED","AED_per_sqft","AED_per_year","percent","count","years","km"]},"provenance":{"type":"object","properties":{"source":{"type":"string","description":"Id of the source behind the figures, e.g. synthetic-marts or public-listings"},"basis":{"type":"string","enum":["transactions","asking-prices","rules"]},"datasets":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"publisher":{"type":"string"},"licence":{"type":"string"},"url":{"type":"string"}},"required":["id","name","publisher","licence"],"additionalProperties":false}},"asOf":{"type":"string","description":"Last complete month covered by the data, YYYY-MM, or the rules version date"},"period":{"anyOf":[{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false},{"type":"null"}]},"n":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"Sample size behind the headline figure"},"method":{"type":"string"},"rules":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"lastVerified":{"type":"string"},"confidence":{"type":"string","enum":["primary","secondary","assumption","placeholder"]}},"required":["id","title","url","lastVerified","confidence"],"additionalProperties":false}},"synthetic":{"type":"boolean"},"label":{"description":"Label that must be shown with the figures (SYNTHETIC, or the source's own label)","type":["string","null"]}},"required":["source","basis","datasets","asOf","period","n","method","rules","synthetic","label"],"additionalProperties":false},"attribution":{"type":"string","minLength":1},"synthetic":{"type":"boolean"},"notes":{"default":[],"type":"array","items":{"type":"string"}},"kind":{"type":"string","const":"range"},"rows":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"p10":{"type":"number"},"p25":{"type":"number"},"median":{"type":"number"},"p75":{"type":"number"},"p90":{"type":"number"},"n":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["label","median","n"],"additionalProperties":false}},"marker":{"type":"object","properties":{"value":{"type":"number"},"label":{"type":"string"}},"required":["value","label"],"additionalProperties":false}},"required":["id","title","unit","provenance","attribution","synthetic","notes","kind","rows"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"subtitle":{"type":"string"},"unit":{"type":"string","enum":["AED","AED_per_sqft","AED_per_year","percent","count","years","km"]},"provenance":{"type":"object","properties":{"source":{"type":"string","description":"Id of the source behind the figures, e.g. synthetic-marts or public-listings"},"basis":{"type":"string","enum":["transactions","asking-prices","rules"]},"datasets":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"publisher":{"type":"string"},"licence":{"type":"string"},"url":{"type":"string"}},"required":["id","name","publisher","licence"],"additionalProperties":false}},"asOf":{"type":"string","description":"Last complete month covered by the data, YYYY-MM, or the rules version date"},"period":{"anyOf":[{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false},{"type":"null"}]},"n":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"Sample size behind the headline figure"},"method":{"type":"string"},"rules":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"lastVerified":{"type":"string"},"confidence":{"type":"string","enum":["primary","secondary","assumption","placeholder"]}},"required":["id","title","url","lastVerified","confidence"],"additionalProperties":false}},"synthetic":{"type":"boolean"},"label":{"description":"Label that must be shown with the figures (SYNTHETIC, or the source's own label)","type":["string","null"]}},"required":["source","basis","datasets","asOf","period","n","method","rules","synthetic","label"],"additionalProperties":false},"attribution":{"type":"string","minLength":1},"synthetic":{"type":"boolean"},"notes":{"default":[],"type":"array","items":{"type":"string"}},"kind":{"type":"string","const":"rank"},"direction":{"type":"string","enum":["asc","desc"]},"rows":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"value":{"type":["number","null"]},"n":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"highlight":{"default":false,"type":"boolean"},"tag":{"type":"string"}},"required":["label","value","highlight"],"additionalProperties":false}},"marker":{"type":"object","properties":{"value":{"type":"number"},"label":{"type":"string"}},"required":["value","label"],"additionalProperties":false}},"required":["id","title","unit","provenance","attribution","synthetic","notes","kind","direction","rows"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"subtitle":{"type":"string"},"unit":{"type":"string","enum":["AED","AED_per_sqft","AED_per_year","percent","count","years","km"]},"provenance":{"type":"object","properties":{"source":{"type":"string","description":"Id of the source behind the figures, e.g. synthetic-marts or public-listings"},"basis":{"type":"string","enum":["transactions","asking-prices","rules"]},"datasets":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"publisher":{"type":"string"},"licence":{"type":"string"},"url":{"type":"string"}},"required":["id","name","publisher","licence"],"additionalProperties":false}},"asOf":{"type":"string","description":"Last complete month covered by the data, YYYY-MM, or the rules version date"},"period":{"anyOf":[{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false},{"type":"null"}]},"n":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"Sample size behind the headline figure"},"method":{"type":"string"},"rules":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"lastVerified":{"type":"string"},"confidence":{"type":"string","enum":["primary","secondary","assumption","placeholder"]}},"required":["id","title","url","lastVerified","confidence"],"additionalProperties":false}},"synthetic":{"type":"boolean"},"label":{"description":"Label that must be shown with the figures (SYNTHETIC, or the source's own label)","type":["string","null"]}},"required":["source","basis","datasets","asOf","period","n","method","rules","synthetic","label"],"additionalProperties":false},"attribution":{"type":"string","minLength":1},"synthetic":{"type":"boolean"},"notes":{"default":[],"type":"array","items":{"type":"string"}},"kind":{"type":"string","const":"composition"},"rows":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"parts":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"value":{"type":"number"}},"required":["key","label","value"],"additionalProperties":false}}},"required":["label","parts"],"additionalProperties":false}}},"required":["id","title","unit","provenance","attribution","synthetic","notes","kind","rows"],"additionalProperties":false}]}},"provenance":{"type":"object","properties":{"source":{"type":"string","description":"Id of the source behind the figures, e.g. synthetic-marts or public-listings"},"basis":{"type":"string","enum":["transactions","asking-prices","rules"]},"datasets":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"publisher":{"type":"string"},"licence":{"type":"string"},"url":{"type":"string"}},"required":["id","name","publisher","licence"],"additionalProperties":false}},"asOf":{"type":"string","description":"Last complete month covered by the data, YYYY-MM, or the rules version date"},"period":{"anyOf":[{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false},{"type":"null"}]},"n":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"Sample size behind the headline figure"},"method":{"type":"string"},"rules":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"lastVerified":{"type":"string"},"confidence":{"type":"string","enum":["primary","secondary","assumption","placeholder"]}},"required":["id","title","url","lastVerified","confidence"],"additionalProperties":false}},"synthetic":{"type":"boolean"},"label":{"description":"Label that must be shown with the figures (SYNTHETIC, or the source's own label)","type":["string","null"]}},"required":["source","basis","datasets","asOf","period","n","method","rules","synthetic","label"],"additionalProperties":false},"attribution":{"type":"string","minLength":1},"synthetic":{"type":"boolean"}},"required":["belowAveragePct","maxIncreasePct","maxNewAnnualRent","proposedIncreasePct","proposedWithinBand","notice","links","summary","notes","charts","provenance","attribution","synthetic"],"additionalProperties":false}}}}}},"400":{"description":"Invalid input"},"404":{"description":"Unknown tool"},"429":{"description":"Rate limited"}}}}}}