{"openapi":"3.1.0","info":{"title":"Funders Index API","version":"1.0.0"},"servers":[{"url":"/api/v1"}],"paths":{"/towns":{"get":{"operationId":"list_towns","summary":"List towns","parameters":[],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Town"}},"next_cursor":{"type":["string","null"]}}}}}},"400":{"description":"Invalid parameter or cursor","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/towns/{slug}":{"get":{"operationId":"get_town","summary":"Get a town (totals count all money into the town; anchor institutions are large organizations assigned to the town, so their amounts can exceed a single town total)","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/TownDetail"}}}}}},"400":{"description":"Invalid parameter or cursor","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such record","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organizations":{"get":{"operationId":"list_organizations","summary":"List organizations","parameters":[{"name":"town","in":"query","required":false,"schema":{"type":"string"}},{"name":"cause","in":"query","required":false,"schema":{"type":"string"}},{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Organization"}},"next_cursor":{"type":["string","null"]}}}}}},"400":{"description":"Invalid parameter or cursor","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organizations/{key}":{"get":{"operationId":"get_organization","summary":"Get an organization (funders counts every funder in all years; recent is the latest single year only; by_year breaks the total down per year)","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/OrganizationDetail"}}}}}},"400":{"description":"Invalid parameter or cursor","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such record","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organizations/{key}/funders":{"get":{"operationId":"list_organization_funders","summary":"List an organization's funders","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Funder"}},"next_cursor":{"type":["string","null"]}}}}}},"400":{"description":"Invalid parameter or cursor","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such record","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/funders":{"get":{"operationId":"list_funders","summary":"List funders","parameters":[{"name":"town","in":"query","required":false,"schema":{"type":"string"}},{"name":"funder_type","in":"query","required":false,"schema":{"type":"string"}},{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Funder"}},"next_cursor":{"type":["string","null"]}}}}}},"400":{"description":"Invalid parameter or cursor","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/funders/{key}":{"get":{"operationId":"get_funder","summary":"Get a funder","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/FunderDetail"}}}}}},"400":{"description":"Invalid parameter or cursor","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such record","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/funders/{key}/recipients":{"get":{"operationId":"list_funder_recipients","summary":"List a funder's recipients (total_received on each row is the amount from THIS funder, not the recipient's overall total)","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Organization"}},"next_cursor":{"type":["string","null"]}}}}}},"400":{"description":"Invalid parameter or cursor","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such record","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/gifts":{"get":{"operationId":"list_gifts","summary":"List gifts","parameters":[{"name":"year","in":"query","required":false,"schema":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},{"name":"town","in":"query","required":false,"schema":{"type":"string"}},{"name":"cause","in":"query","required":false,"schema":{"type":"string"}},{"name":"funder_type","in":"query","required":false,"schema":{"type":"string"}},{"name":"min_amount","in":"query","required":false,"schema":{"type":"number"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Gift"}},"next_cursor":{"type":["string","null"]}}}}}},"400":{"description":"Invalid parameter or cursor","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/causes":{"get":{"operationId":"list_causes","summary":"List causes","parameters":[],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Cause"}},"next_cursor":{"type":["string","null"]}}}}}},"400":{"description":"Invalid parameter or cursor","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/search":{"get":{"operationId":"search","summary":"Search organizations by name (counts are all-time; a funder with no recipient record can appear with total_received 0)","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500}}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Organization"}},"next_cursor":{"type":["string","null"]}}}}}},"400":{"description":"Invalid parameter or cursor","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"A Funders Index API key (fi_live_...)."}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}}}},"EntityRef":{"type":"object","properties":{"id":{"type":["string","null"]},"name":{"type":["string","null"]},"withheld":{"type":"boolean"},"town":{"type":["string","null"]},"state":{"type":["string","null"]},"ein":{"type":["string","null"]},"url":{"type":["string","null"]}},"required":["id","name","withheld","town","state","ein","url"],"additionalProperties":false},"Town":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"},"tier":{"type":"string"},"lat":{"type":["number","null"]},"lon":{"type":["number","null"]},"url":{"type":"string"}},"required":["slug","name","tier","lat","lon","url"],"additionalProperties":false},"TownDetail":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"},"tier":{"type":"string"},"lat":{"type":["number","null"]},"lon":{"type":["number","null"]},"url":{"type":"string"},"years":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"total_received":{"type":"number"},"organizations":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"funders":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"gifts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"by_year":{"type":"array","items":{"type":"object","properties":{"year":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"amount":{"type":"number"},"funders":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["year","amount","funders"],"additionalProperties":false}},"by_cause":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"label":{"type":"string"},"amount":{"type":"number"},"organizations":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["slug","label","amount","organizations"],"additionalProperties":false}},"by_funder_type":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"label":{"type":"string"},"amount":{"type":"number"},"funders":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["slug","label","amount","funders"],"additionalProperties":false}}},"required":["slug","name","tier","lat","lon","url","years","total_received","organizations","funders","gifts","by_year","by_cause","by_funder_type"],"additionalProperties":false},"Organization":{"type":"object","properties":{"id":{"type":["string","null"]},"name":{"type":["string","null"]},"withheld":{"type":"boolean"},"town":{"type":["string","null"]},"state":{"type":["string","null"]},"ein":{"type":["string","null"]},"url":{"type":["string","null"]},"cause":{"anyOf":[{"type":"object","properties":{"slug":{"type":"string"},"label":{"type":"string"}},"required":["slug","label"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":["string","null"]},"total_received":{"type":"number"},"funders":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","name","withheld","town","state","ein","url","cause","kind","total_received","funders"],"additionalProperties":false},"OrganizationDetail":{"type":"object","properties":{"id":{"type":["string","null"]},"name":{"type":["string","null"]},"withheld":{"type":"boolean"},"town":{"type":["string","null"]},"state":{"type":["string","null"]},"ein":{"type":["string","null"]},"url":{"type":["string","null"]},"cause":{"anyOf":[{"type":"object","properties":{"slug":{"type":"string"},"label":{"type":"string"}},"required":["slug","label"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":["string","null"]},"total_received":{"type":"number"},"funders":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"gifts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"first_year":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"last_year":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"by_year":{"type":"array","items":{"type":"object","properties":{"year":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"amount":{"type":"number"},"gifts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"funders":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["year","amount","gifts","funders"],"additionalProperties":false}},"sources":{"type":"array","items":{"type":"string"}},"recent":{"anyOf":[{"type":"object","properties":{"year":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"gifts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"dollars":{"type":"number"}},"required":["year","gifts","dollars"],"additionalProperties":false},{"type":"null"}]},"is_anchor":{"type":"boolean"},"donor_only":{"type":"boolean"}},"required":["id","name","withheld","town","state","ein","url","cause","kind","total_received","funders","gifts","first_year","last_year","by_year","sources","recent","is_anchor","donor_only"],"additionalProperties":false},"Funder":{"type":"object","properties":{"id":{"type":["string","null"]},"name":{"type":["string","null"]},"withheld":{"type":"boolean"},"town":{"type":["string","null"]},"state":{"type":["string","null"]},"ein":{"type":["string","null"]},"url":{"type":["string","null"]},"funder_type":{"type":"object","properties":{"slug":{"type":"string"},"label":{"type":"string"}},"required":["slug","label"],"additionalProperties":false},"kind":{"type":["string","null"]},"total_given":{"type":"number"},"recipients":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"top_causes":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"label":{"type":"string"},"amount":{"type":"number"}},"required":["slug","label","amount"],"additionalProperties":false}}},"required":["id","name","withheld","town","state","ein","url","funder_type","kind","total_given","recipients","top_causes"],"additionalProperties":false},"FunderDetail":{"type":"object","properties":{"id":{"type":["string","null"]},"name":{"type":["string","null"]},"withheld":{"type":"boolean"},"town":{"type":["string","null"]},"state":{"type":["string","null"]},"ein":{"type":["string","null"]},"url":{"type":["string","null"]},"funder_type":{"type":"object","properties":{"slug":{"type":"string"},"label":{"type":"string"}},"required":["slug","label"],"additionalProperties":false},"kind":{"type":["string","null"]},"total_given":{"type":"number"},"recipients":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"top_causes":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"label":{"type":"string"},"amount":{"type":"number"}},"required":["slug","label","amount"],"additionalProperties":false}},"gifts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"first_year":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"last_year":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"by_year":{"type":"array","items":{"type":"object","properties":{"year":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"amount":{"type":"number"},"gifts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"recipients":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["year","amount","gifts","recipients"],"additionalProperties":false}},"sources":{"type":"array","items":{"type":"string"}},"access":{"anyOf":[{"type":"object","properties":{"status":{"type":"string"},"basis":{"type":"string"},"route_kind":{"type":["string","null"]},"portal_vendor":{"type":["string","null"]}},"required":["status","basis","route_kind","portal_vendor"],"additionalProperties":false},{"type":"null"}]}},"required":["id","name","withheld","town","state","ein","url","funder_type","kind","total_given","recipients","top_causes","gifts","first_year","last_year","by_year","sources","access"],"additionalProperties":false},"Gift":{"type":"object","properties":{"id":{"type":"string"},"year":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"amount":{"type":["number","null"]},"amount_is_range":{"type":"boolean"},"amount_confidence":{"type":"string"},"flow_type":{"type":"string"},"source_id":{"type":"string"},"funder":{"type":"object","properties":{"id":{"type":["string","null"]},"name":{"type":["string","null"]},"withheld":{"type":"boolean"},"town":{"type":["string","null"]},"state":{"type":["string","null"]},"ein":{"type":["string","null"]},"url":{"type":["string","null"]}},"required":["id","name","withheld","town","state","ein","url"],"additionalProperties":false},"recipient":{"type":"object","properties":{"id":{"type":["string","null"]},"name":{"type":["string","null"]},"withheld":{"type":"boolean"},"town":{"type":["string","null"]},"state":{"type":["string","null"]},"ein":{"type":["string","null"]},"url":{"type":["string","null"]}},"required":["id","name","withheld","town","state","ein","url"],"additionalProperties":false}},"required":["id","year","amount","amount_is_range","amount_confidence","flow_type","source_id","funder","recipient"],"additionalProperties":false},"Cause":{"type":"object","properties":{"slug":{"type":"string"},"label":{"type":"string"},"ntee_groups":{"type":"string"},"organizations":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"total_received":{"type":"number"},"url":{"type":["string","null"]}},"required":["slug","label","ntee_groups","organizations","total_received","url"],"additionalProperties":false}}}}