Apartment24

apartment24 JSON API – Developer Guide

The API returns all currently available listings on apartment24.ch as JSON: address, rent, availability, photos, description, amenities, parking, rental terms, contact details and direct links.

Overview

Endpointhttps://apartment24.ch/api/listings.php
MethodGET (also HEAD, and OPTIONS for CORS)
ResponseJSON, UTF-8
Accessno login, no API key
CORSallowed from any origin (Access-Control-Allow-Origin: *)
Source IDquelle = your own ID (request it at b2b@apartment24.ch), otherwise 0

Source ID (quelle): the source ID tells us who sent a request. It is added to every link in the response, so applications made through these links can be attributed to you. You can request your own source ID from us at b2b@apartment24.ch. Otherwise, always use quelle=0. Use url and application_url exactly as returned; do not build your own links to our pages.

Endpoints and parameters

There are three calls. All parameters are optional and can be combined. The examples use quelle=999 as a sample; use your own source ID, or 0 if you do not have one.

CallResult
/api/listings.php?quelle=999list of available listings (field listings)
/api/listings.php?id=2520&quelle=999one listing (field listing); 404 if no longer available
/api/listings.php?locations=1cantons and cities with the number of available listings (field cantons)
ParameterValuesMeaning
quelle0–999your own source ID, added to all links; otherwise 0 (default)
langde (default), en, fr, alllanguage of texts and links; all = all three in one response
locationtext, 1–60 characterscity, district, canton (name or code, e.g. ZH) or 4-digit postcode
typesroom, apartment, parking, storage, restaurant, store, comma-separatedlisting type
max_rent_chfnumbermaximum monthly rent in CHF
available_byYYYY-MM-DDavailable on or before this date
min_roomsnumberminimum number of rooms (apartments)
min_size_m2numberminimum size in m²
balcony1 or 0only listings with a balcony
details1 (default) or 00 = basic fields only, no photos, description or terms
limit1–200, default 200listings per page
offsetfrom 0first listing of the page

Paging: the response contains total, count, offset and has_more. While has_more is true, request again with offset + count.

Each parameter may appear only once. Unknown parameters are rejected with status 400.

Response format

Every response starts with generated_at, source (the source ID used) and lang, followed by the data for the call. Fields without a value are null.

{
  "generated_at": "2026-12-04T10:15:00+01:00",
  "source": 999,
  "lang": "en",
  "total": 143, "count": 2, "offset": 0, "has_more": true,
  "listings": [
    {
      "id": 2520,
      "type": "room",
      "title": "Furnished Room",
      "street": "Musterstrasse 12", "zip": "4710", "city": "Balsthal", "canton": "SO",
      "rent_chf": 790,
      "available_now": true, "available_from": "2026-12-04",
      "url": "https://apartment24.ch/en/room/.../2520?quelle=999",
      "application_url": "https://apartment24.ch/en/tenant/application-form?inserat=2520&quelle=999",
      "images": ["https://apartment24.ch/graphics/uploads/room_2520_1.webp"],
      "description": "...",
      "features": { "furnished": true, "wifi_included": true, "bathroom": "shared" },
      "conditions": { "min_rental_months": 1, "deposit_months": 1 },
      "parking": { "private_parking_on_request": false, "parking_spaces_same_zip": [] },
      "contact": { "phone": "0800 24 77 24", "whatsapp_url": "https://wa.me/..." }
    }
  ]
}

The example is shortened. Each listing contains these fields:

FieldContent
idlisting number
typeroom, apartment, parking, storage, restaurant, store
titlelisting type as text in the chosen language
street, zip, city, canton, districtfull address; canton as a two-letter code
lat, lngcoordinates, if available
rent_chf, rent_on_requestmonthly rent in CHF; if rent_on_request is true, rent_chf is null
available_now, available_fromavailable now / available from (YYYY-MM-DD)
size_m2, rooms, floorsize, number of rooms, floor
urllink to the listing page, including your source ID
application_urllink straight to the application form, including your source ID
image_url, imagesmain image and all photos
example_photostrue = sample photos, not photos of this listing
descriptiondescription text, as on the listing page
featuresamenities: furnished, Wi-Fi, cleaning, kitchen, bathroom, fridge, balcony, terrace, washing machine, official registration possible
max_rental_untilend date if the rental is fixed-term, else null
conditionsminimum stay (1 month), notice period (14/30 days), deposit (1 month's rent, cash possible), payment in advance, what is included, plus texts on payment, minimum stay and notice
parkingprivate parking on request, public parking nearby, our available parking spaces with the same postcode
contactphone, email, WhatsApp number and whatsapp_url with a prefilled message

With details=0 only the basic fields are returned: id to lng, plus url and image_url.

All languages with lang=all: the fields title, description, url, application_url, conditions.payment_terms, conditions.min_rental_text, conditions.notice_period_text, contact.whatsapp_url and the url of parking spaces then look like this:

"title": { "de": "Möbliertes Zimmer", "en": "Furnished Room", "fr": "Chambre meublée" }

All other fields are the same in every language and stay plain values.

Errors, limits and examples

On error, the API returns an HTTP status other than 200 and this JSON (messages are in German):

{ "error": { "code": "bad_request", "message": "lang muss de, en, fr oder all sein." } }
StatuscodeWhen
400bad_requestinvalid or unknown parameter
404not_foundno listing with this id, or it is no longer available
405method_not_allowedmethod other than GET
429rate_limitedmore than 120 requests per minute per IP; header Retry-After: 60
500internal_errorerror on our side
503unavailabledata temporarily unavailable; retry later

Examples:

https://apartment24.ch/api/listings.php?quelle=999
https://apartment24.ch/api/listings.php?quelle=999&lang=all
https://apartment24.ch/api/listings.php?quelle=999&lang=en&location=Winterthur&types=room&max_rent_chf=1000
https://apartment24.ch/api/listings.php?quelle=999&location=8400&available_by=2027-01-31
https://apartment24.ch/api/listings.php?quelle=999&id=2520&lang=en
https://apartment24.ch/api/listings.php?locations=1

Quick test from the command line:

curl -s "https://apartment24.ch/api/listings.php?quelle=999&lang=en&location=Winterthur&limit=2"