This API serves data for maps on different zoom levels on mietenwatch.de
- install Node dependencies
npm install
- run API
node ./www/bin
- send GET request to
http://localhost:4000
using routes as described below
Fetches aggregated affordability data for Berlin and for its so called Ortsteile (medium sized administratative districts).
-
Request
GET
/api/affordability/berlin/:income/:rooms/:socialHousing
income
(integer): income to use to calculate affordabilityrooms
(integer): number of rooms to use to filter offerssocialHousing
: if set toexcludeSocialHousing
offers requiring a so called Wohnberechtigungsschein (permit for subsidized housing) will be excluded from the response
-
Response
-
berlinData
: data for Berlin totalberlin_totalFlats
(integer): count of total flats for the filter params used in the requestberlin_affordableFlats
(integer): count of affordable flats for the filter params used in the requestberlin_soaf
(float): share of affordable flats for the filter params used in the request
-
resData
: data for respective Ortsteileot_id
(integer): ID of the Ortsteilot_name
(string): name of the Ortsteilot_totalFlats
(integer): count of total flats within respective Ortsteilot_affordableFlats
(integer): count of affordable flats within respective Ortsteilot_soaf
(float): share of affordable flats
-
Fetches offers data for requested bounding box.
-
Request
GET
/api/affordability/:bbox/:income/:rooms/:socialHousing
bbox
(string): string setting the bounding boxNW latitude, NW longitude, SE latitude, SE longitude
e.g.52.501750,13.358173,52.510788,13.40023
rooms
(integer): number of rooms to use to filter offerssocialHousing
: if set toexcludeSocialHousing
offers requiring a so called Wohnberechtigungsschein (permit for subsidized housing) will be excluded from the responseincome
: income to use to calculate affordability
-
Response
-
resData
: data for respective bounding boxgeo_lon
(float): longitude of the offergeo_lat
(float): latitude of the offerobj_flatSize
(float): flat size of the offerobj_rooms
(float): number of rooms of the offercst_totalCosts
(float): total cost of the offercst_affordable
(boolean): is flat affordable
-
Fetches data for average incomes excludes subsidized offers.
Fetches aggregated affordability data for Berlin and for its so called Ortsteile (medium sized administratative districts).
-
Request
GET
/api/affordabilityAVG/berlin/:income/:persons/:socialHousing
income
(integer): income to use to calculate affordabilitypersons
(integer): number of persons to use to filter offerssocialHousing
: if set toexcludeSocialHousing
offers requiring a so called Wohnberechtigungsschein (permit for subsidized housing) will be excluded from the response
-
Response
-
berlinData
: data for Berlin totalberlin_totalFlats
(integer): count of total flats for the filter params used in the requestberlin_affordableFlats
(integer): count of affordable flats for the filter params used in the requestberlin_soaf
(float): share of affordable flats for the filter params used in the request
-
resData
: data for respective Ortsteileot_id
(integer): ID of the Ortsteilot_name
(string): name of the Ortsteilot_totalFlats
(integer): count of total flats within respective Ortsteilot_affordableFlats
(integer): count of affordable flats within respective Ortsteilot_soaf
(float): share of affordable flats
-
Fetches offers data for requested bounding box.
-
Request
GET
/api/affordabilityAVG/:bbox/:income/:persons
bbox
(string): string setting the bounding boxNW latitude, NW longitude, SE latitude, SE longitude
e.g.52.501750,13.358173,52.510788,13.40023
persons
(integer): number of persons to use to filter offersincome
: income to use to calculate affordability
-
Response
-
resData
: data for respective bounding boxgeo_lon
(float): longitude of the offergeo_lat
(float): latitude of the offerobj_flatSize
(float): flat size of the offerobj_rooms
(float): number of rooms of the offercst_totalCosts
(float): total cost of the offercst_affordable
(boolean): is flat affordable
-
Fetches offers data for requested bounding box.
-
Request
GET
/api/affordabilityAVG/:bbox/:income/:persons
bbox
(string): string setting the bounding boxNW latitude, NW longitude, SE latitude, SE longitude
e.g.52.501750,13.358173,52.510788,13.40023
persons
(integer): number of persons to use to filter offersincome
(nteger): income to use to calculate affordability
-
Response
-
resData
: data for respective bouding boxgeo_lon
(float): longitude of the offergeo_lat
(float): latitude of the offerobj_flatSize
(float): flat size of the offerobj_rooms
(float): number of rooms of the offercst_totalCosts
(float): total cost of the offercst_affordable
(boolean): is flat affordable
-
Fetches data affordability data for maximum rent costs paid for people receiving Hartz IV social welfare.
Fetches aggregated affordability data for Berlin and for its so called Ortsteile (medium sized administratative districts).
-
Request
GET
/api/affordabilityH4/berlin/:income/:persons/
income
(integer): income to use to calculate affordabilitypersons
(integer): number of persons to use to filter offersincome
: income to use to calculate affordability (in this case maximum Kosten der Unterkunft covered)
-
Response
-
berlinData
: data for Berlin totalberlin_totalFlats
(integer): count of total flats for the filter params used in the requestberlin_affordableFlats
(integer): count of affordable flats for the filter params used in the requestberlin_soaf
(float): share of affordable flats for the filter params used in the request
-
resData
: data for respective Ortsteileot_id
(integer): ID of the Ortsteilot_name
(string): name of the Ortsteilot_totalFlats
(integer): count of total flats within respective Ortsteilot_affordableFlats
(integer): count of affordable flats within respective Ortsteilot_soaf
(float): share of affordable flats
-
Fetches offers data for requested bounding box.
-
Request
GET
/api/affordabilityH4/:bbox/:income/:rooms/:socialHousing
bbox
(string): string setting the bounding boxNW latitude, NW longitude, SE latitude, SE longitude
e.g.52.501750,13.358173,52.510788,13.40023
rooms
(integer): number of rooms to use to filter offersincome
: income to use to calculate affordability (in this case maximum Kosten der Unterkunft covered)
-
Response
-
resData
: data for respective bouding boxgeo_lon
(float): longitude of the offergeo_lat
(float): latitude of the offerobj_flatSize
(float): flat size of the offerobj_rooms
(float): number of rooms of the offercst_totalCosts
(float): total cost of the offercst_affordable
(boolean): is flat affordable
-
Fetches aggregated affordability data for Berlin and for its so called Ortsteile (medium sized administratative districts).
-
Request
GET
/api/affordabilityWoRL/berlin/:income/:rooms
income
(integer): income to use to calculate affordabilityrooms
(integer): number of rooms to use to filter offers
-
Response
-
berlinData
: data for Berlin totalberlin_totalFlats
(integer): count of total flats for the filter params used in the requestberlin_affordableFlats
(integer): count of affordable flats for the filter params used in the requestberlin_soaf
(float): share of affordable flats for the filter params used in the request
-
resData
: data for respective Ortsteileot_id
(integer): ID of the Ortsteilot_name
(string): name of the Ortsteilot_totalFlats
(integer): count of total flats within respective Ortsteilot_affordableFlats
(integer): count of affordable flats within respective Ortsteilot_soaf
(float): share of affordable flats
-
Fetching data for Mietendeckel affordability map without Mietendeckel (zoom level 1 using bounding box)
Fetches offers data for requested bounding box.
-
Request
GET
/api/affordabilityWoRL/:bbox/:income/:rooms
bbox
(string): string setting the bounding boxNW latitude, NW longitude, SE latitude, SE longitude
e.g.52.501750,13.358173,52.510788,13.40023
rooms
(integer): number of rooms to use to filter offersincome
: income to use to calculate affordability
-
Response
-
resData
: data for respective bounding boxgeo_lon
(float): longitude of the offergeo_lat
(float): latitude of the offerobj_flatSize
(float): flat size of the offerobj_rooms
(float): number of rooms of the offercst_totalCosts
(float): total cost of the offercst_affordable
(boolean): is flat affordable
-
Fetches aggregated affordability data for Berlin and for its so called Ortsteile (medium sized administratative districts).
-
Request
GET
/api/affordabilityWRL/berlin/:income/:rooms
income
(integer): income to use to calculate affordabilityrooms
(integer): number of rooms to use to filter offers
-
Response
-
berlinData
: data for Berlin totalberlin_totalFlats
(integer): count of total flats for the filter params used in the requestberlin_affordableFlats
(integer): count of affordable flats for the filter params used in the request with Mietendeckel appliedberlin_soaf
(float): share of affordable flats for the filter params used in the request with Mietendeckel applied
-
resData
: data for respective Ortsteileot_id
(integer): ID of the Ortsteilot_name
(string): name of the Ortsteilot_totalFlats
(integer): count of total flats within respective Ortsteilot_affordableFlats
(integer): count of affordable flats within respective Ortsteil with Mietendeckel appliedot_soaf
(float): share of affordable flats with Mietendeckel applied
-
Fetching data for Mietendeckel affordability map with Mietendeckel (zoom level 1 using bounding box)
Fetches offers data for requested bounding box.
-
Request
GET
/api/affordabilityWRL/:bbox/:income/:rooms
bbox
(string): string setting the bounding boxNW latitude, NW longitude, SE latitude, SE longitude
e.g.52.501750,13.358173,52.510788,13.40023
rooms
(integer): number of rooms to use to filter offersincome
: income to use to calculate affordability
-
Response
-
resData
: data for respective bounding boxgeo_lon
(float): longitude of the offergeo_lat
(float): latitude of the offerobj_flatSize
(float): flat size of the offerobj_rooms
(float): number of rooms of the offercst_totalCosts
(float): total cost of the offer with Mietendeckel appliedcst_affordable
(boolean): is flat affordable if Mietendeckel is applied
-
This project was funded by the German Federal Ministry of Education and Research within the Prototype Fund funding line organized by Open Knowledge Fundation.