Public API for accessing property listings in Saint Martin. Integrate our real estate data directly into your website.
All requests to /properties endpoints require a valid API key sent via the x-api-key header. Contact us to obtain your key.
curl -H "x-api-key: YOUR_API_KEY" https://listings.4u-realestate.org/properties
Without a valid API key, all requests will return a 401 Unauthorized error.
Contact us at contact@4u-realestate.org to obtain your key.
Retrieve a paginated list of published properties. Supports full-text search, filtering, and sorting.
| Name | Type | Description |
|---|---|---|
| page | number | Page number (default: 1) |
| limit | number | Results per page (default: 20, max: 100) |
| search | string | Full-text search on title & description |
| featured | boolean | Filter featured properties |
| project | string | Filter by project name |
| propertyType | string | Filter by type (apartments, villas, penthouses...) |
| purpose | string | Filter by purpose (for-rent, for-sale, vacation-rentals...) |
| city | string | Filter by city |
| area | string | Filter by area/neighborhood |
| country | string | Filter by country |
| minPrice | number | Minimum price |
| maxPrice | number | Maximum price |
| minBedrooms | number | Minimum bedrooms |
| maxBedrooms | number | Maximum bedrooms |
| language | string | Language filter (en, fr) |
| sort | string | price_asc, price_desc, newest, oldest (default: title) |
curl -H "x-api-key: YOUR_KEY" \ "https://listings.4u-realestate.org/properties?page=1&limit=10&purpose=vacation-rentals"
{
"success": true,
"properties": [ { "title": "...", "price": 150, ... } ],
"total": 179,
"page": 1,
"limit": 10,
"totalPages": 18
}
Retrieve properties marked as featured (highlighted listings).
| Name | Type | Description |
|---|---|---|
| limit | number | Max results (default: 10, max: 50) |
| purpose | string | Filter by purpose |
curl -H "x-api-key: YOUR_KEY" \ "https://listings.4u-realestate.org/properties/featured?limit=6"
Get aggregated stats: total count, available purposes, property types, and cities.
{
"success": true,
"stats": {
"totalProperties": 179,
"purposes": ["for-rent", "for-sale", "vacation-rentals"],
"propertyTypes": ["apartments", "villas", "penthouses"],
"cities": ["Simpson Bay", "Maho"]
}
}
| Name | Type | Description |
|---|---|---|
| slug | string | URL slug of the property (required) |
curl -H "x-api-key: YOUR_KEY" \ "https://listings.4u-realestate.org/properties/by-slug/luxury-2br-apartment-ocean-view"
| Name | Type | Description |
|---|---|---|
| lodgifyId | number | Lodgify rental ID (required) |
curl -H "x-api-key: YOUR_KEY" \ "https://listings.4u-realestate.org/properties/by-lodgify/499029"
Retrieve the complete details of a single property by its MongoDB ID.
curl -H "x-api-key: YOUR_KEY" \ "https://listings.4u-realestate.org/properties/664f1a2b3c4d5e6f7a8b9c0d"
const API_URL = 'https://listings.4u-realestate.org';
const API_KEY = 'YOUR_API_KEY';
const headers = { 'x-api-key': API_KEY };
// List properties
const res = await fetch(`${API_URL}/properties?limit=10&purpose=vacation-rentals`, { headers });
const data = await res.json();
console.log(`Total: ${data.total} properties`);
data.properties.forEach(p => {
console.log(` ${p.title} - $${p.price}/${p.priceUnit}`);
});
// Get single property
const detail = await fetch(`${API_URL}/properties/${data.properties[0]._id}`, { headers });
const property = await detail.json();
$API_URL = 'https://listings.4u-realestate.org';
$API_KEY = 'YOUR_API_KEY';
$ch = curl_init("$API_URL/properties?limit=10&purpose=vacation-rentals");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'x-api-key: ' . $API_KEY,
'Accept: application/json'
]);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);
echo "Total: " . $data['total'] . " properties\n";
foreach ($data['properties'] as $p) {
echo " {$p['title']} - ${$p['price']}/{$p['priceUnit']}\n";
}
import requests
API_URL = 'https://listings.4u-realestate.org'
API_KEY = 'YOUR_API_KEY'
HEADERS = {'x-api-key': API_KEY}
# List properties
res = requests.get(f'{API_URL}/properties', params={
'limit': 10, 'purpose': 'vacation-rentals'
}, headers=HEADERS)
data = res.json()
print(f"Total: {data['total']} properties")
for p in data['properties']:
print(f" {p['title']} - ${p['price']}/{p['priceUnit']}")
# List properties curl -s -H "x-api-key: YOUR_KEY" \ "https://listings.4u-realestate.org/properties?limit=10" | jq . # Featured curl -s -H "x-api-key: YOUR_KEY" \ "https://listings.4u-realestate.org/properties/featured?limit=6" | jq . # Stats curl -s -H "x-api-key: YOUR_KEY" \ "https://listings.4u-realestate.org/properties/stats" | jq . # By slug curl -s -H "x-api-key: YOUR_KEY" \ "https://listings.4u-realestate.org/properties/by-slug/my-property" | jq . # By ID curl -s -H "x-api-key: YOUR_KEY" \ "https://listings.4u-realestate.org/properties/PROPERTY_ID" | jq .
| Field | Type | Description |
|---|---|---|
| _id | string | Unique MongoDB ID |
| title / title_fr | string | Property title (EN / FR) |
| slug | string | URL-friendly identifier |
| description / description_fr | string | Full HTML description (EN / FR) |
| shortDescription | string | Short summary |
| status | string | Always "published" on public API |
| featured | boolean | Highlighted listing |
| price | number | Property price |
| priceUnit | string | per_night, per_month, total |
| currency | string | Currency code (USD) |
| surface | number | Area in sqm |
| bedrooms | number | Number of bedrooms |
| bathrooms | number | Number of bathrooms |
| featuredImage | object | Main image {url, alt} |
| gallery | array | All images [{url, alt, order}] |
| address | object | Location {street, city, country, lat, lng} |
| rentalId | number | Lodgify rental ID |
| purposes | array | Property purposes taxonomy |
| propertyTypes | array | Property types taxonomy |
| Code | Meaning | Solution |
|---|---|---|
| 401 | Missing or invalid API key | Add a valid x-api-key header |
| 403 | API key disabled or expired | Contact admin to reactivate |
| 404 | Property not found | Check the ID or slug |
| 429 | Rate limit exceeded | Wait and retry, cache results |
| 500 | Server error | Contact contact@4u-realestate.org |