{"components":{"schemas":{"Program":{"$id":"https://www.thegrantmap.com/api/dataset/schema","$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":true,"properties":{"category":{"type":"string"},"contractor":{"description":"Serve-time contractor + money-mechanics classification inferred from the program text. Booleans are MEASURED signals: True means the program text states it; False means our text does not state it (the official page may still require it), not a confirmed negative.","properties":{"contractorRequired":{"description":"Text says the work must use a licensed/approved contractor.","type":"boolean"},"disbursement":{"description":"How the money reaches the work; 'unknown' when our text has no signal (~27%).","enum":["reimbursement","forgivable-loan","voucher","point-of-sale","tax-benefit","rebate","matching","deferred","direct-pay","lien","grant","loan","unknown"],"type":"string"},"fundsContractorWork":{"description":"Funds work a contractor performs (~92% of the corpus).","type":"boolean"},"hasCashGap":{"description":"Homeowner fronts the cost and is reimbursed after the work (the deepest affordability friction).","type":"boolean"},"repayment":{"enum":["forgivable","rebate","loan","grant"],"type":"string"},"requirement":{"description":"How strongly the program needs a licensed contractor at apply time.","enum":["required","likely","none"],"type":"string"},"requiresBidToApply":{"description":"Text explicitly requires a contractor bid/estimate to apply (strict; per-program).","type":"boolean"}},"required":["requirement","disbursement"],"type":"object"},"deadline":{"type":["string","null"]},"deadline_es":{"type":["string","null"]},"description":{"type":"string"},"description_es":{"type":"string"},"eligibilityType":{"description":"e.g. homeowner, renter, business","items":{"type":"string"},"type":"array"},"freshness":{"description":"Serve-time provenance attached by The Grant Map.","properties":{"confidence":{"description":"source-verified = the official page was fetched and a judge confirmed this program AND its stated dollar amount, with the quote stored (the top non-federal rung); federal-canonical = normalized federal/state canon; link-verified = live official link to a SPECIFIC program page; link-resolves-unverified = the official link works but is a generic agency landing page that does not itself confirm this program or amount; unverified = link dead/bot-blocked/unchecked.","enum":["source-verified","federal-canonical","link-verified","link-resolves-unverified","unverified"],"type":"string"},"lastChecked":{"format":"date","type":["string","null"]},"linkStatus":{"enum":["live","dead","bot-blocked","unchecked"],"type":"string"},"sourceEvidence":{"description":"Short quote from the official page confirming the program/amount (present only when sourceVerified true).","type":["string","null"]},"sourceVerified":{"description":"Present only after the record has been checked by the source-verification pipeline. True = official page confirmed the program and amount.","type":"boolean"},"sourceVerifiedAmount":{"description":"The amount the official page actually stated, when confirmable (present only when sourceVerified true).","type":["string","null"]},"sourceVerifiedAt":{"description":"Date the source check ran.","format":"date","type":["string","null"]}},"required":["linkStatus","confidence"],"type":"object"},"fundingStatus":{"description":"The program's own stated status. AND with freshness.linkStatus for apply-now.","enum":["available","waitlist","closed"],"type":"string"},"id":{"description":"Stable program identifier within its city","type":"string"},"incomeRequirement":{"enum":["verylow","low","moderate","any"],"type":"string"},"matchRate":{"type":["string","null"]},"maxAmount":{"type":["number","null"]},"maxAmountLabel":{"type":"string"},"maxAmountLabel_es":{"type":"string"},"name":{"description":"Program name (English; names are not translated)","type":"string"},"phone":{"type":["string","null"]},"projectTypes":{"items":{"type":"string"},"type":"array"},"source":{"description":"Administering agency","type":"string"},"specialPopulations":{"description":"e.g. seniors, veterans, disabled","items":{"type":"string"},"type":"array"},"url":{"description":"Official program page; surface to end users (license requires it)","format":"uri","type":"string"}},"required":["id","name","source","eligibilityType","fundingStatus","url"],"title":"Grant Map Program Record","type":"object"}},"securitySchemes":{"ApiKeyAuth":{"in":"header","name":"X-Api-Key","type":"apiKey"}}},"info":{"contact":{"email":"mike@thegrantmap.com","name":"The Grant Map","url":"https://www.thegrantmap.com/data"},"description":"Structured home improvement grant, rebate, and forgivable-loan programs across US cities, bilingual (EN/ES), with per-record link-health provenance. Authenticate with the X-Api-Key header. License at https://www.thegrantmap.com/data.","license":{"name":"The Grant Map Dataset License","url":"https://www.thegrantmap.com/terms"},"title":"The Grant Map Dataset API","version":"1.0.0"},"openapi":"3.1.0","paths":{"/api/changes":{"get":{"parameters":[{"in":"query","name":"since","schema":{"format":"date","type":"string"}},{"in":"query","name":"city","schema":{"type":"string"}},{"in":"query","name":"limit","schema":{"maximum":1000,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"}},"summary":"Change events detected by weekly verification"}},"/api/cities":{"get":{"parameters":[{"in":"query","name":"status","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"}},"summary":"Every covered city with population and metadata"}},"/api/cities/counts":{"get":{"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"}},"summary":"Cities with per-city program counts and the dataset total"}},"/api/dataset/health":{"get":{"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"}},"security":[],"summary":"Coverage + link-health stats (public, no key)"}},"/api/programs/national":{"get":{"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"city":{"type":"string"},"count":{"type":"integer"},"programs":{"items":{"$ref":"#/components/schemas/Program"},"type":"array"},"version":{"type":["string","null"]}},"type":"object"}}},"description":"OK"}},"summary":"The deduped federal/state national layer"}},"/api/programs/{city}":{"get":{"parameters":[{"in":"path","name":"city","required":true,"schema":{"type":"string"}},{"in":"query","name":"category","schema":{"type":"string"}},{"in":"query","name":"project","schema":{"type":"string"}},{"in":"query","name":"income","schema":{"type":"string"}},{"in":"query","name":"status","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"city":{"type":"string"},"count":{"type":"integer"},"programs":{"items":{"$ref":"#/components/schemas/Program"},"type":"array"},"version":{"type":["string","null"]}},"type":"object"}}},"description":"OK"}},"summary":"Every program for a city, filterable"}},"/api/programs/{city}/{programId}":{"get":{"parameters":[{"in":"path","name":"city","required":true,"schema":{"type":"string"}},{"in":"path","name":"programId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Program"}}},"description":"OK"}},"summary":"One program, full detail"}},"/api/sample":{"get":{"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"city":{"type":"string"},"count":{"type":"integer"},"programs":{"items":{"$ref":"#/components/schemas/Program"},"type":"array"},"version":{"type":["string","null"]}},"type":"object"}}},"description":"OK"}},"security":[],"summary":"One full city, no key required"}}},"security":[{"ApiKeyAuth":[]}],"servers":[{"url":"https://www.thegrantmap.com"}]}
