Stream EstateStream Estate
Guides

Filtrage

Filtrer avec POST /properties — modes classic et advanced

Le body de POST /properties est une union discriminée par deux champs :

  • searchMode"classic" (champs plats) ou "advanced" (arbre criteria récursif)
  • paginationType"page" (offset) ou "cursor" (curseur, voir Pagination)

Mode classic

Tous les filtres sont combinés en AND. C'est le mode recommandé pour 95 % des cas.

ChampTypeValeurs
searchModestring"classic"
paginationTypestring"page" ou "cursor"
transactionTypestring | string[]SELL, RENT
propertyTypesstring[]FLAT, HOUSE, BUILDING, LAND, PARKING, OTHER
pricePriceRangeDTO | null{ gte, lte } en euros
areaAreaRangeDTO | null{ gte, lte } en m²
roomsIntRangeDTO | null{ gte, lte }
bedroomsIntRangeDTO | null{ gte, lte }
cityIdsinteger[]IDs de communes (voir Geo)
districtIdsinteger[]IDs de districts
hasParkingboolean | null
hasBalconyboolean | null
hasGardenboolean | null
hasCellarboolean | null
sizeinteger1–100
page ou cursorinteger / stringselon paginationType

Exemple

curl -X POST "https://api-v2.stream.estate/properties" \
  -H "X-API-Key: <votre_clé>" \
  -H "Content-Type: application/json" \
  -d '{
    "searchMode": "classic",
    "paginationType": "page",
    "transactionType": "SELL",
    "propertyTypes": ["FLAT", "HOUSE"],
    "price": { "gte": 200000, "lte": 600000 },
    "area": { "gte": 50 },
    "rooms": { "gte": 3, "lte": 5 },
    "cityIds": [75056],
    "hasBalcony": true,
    "page": 1,
    "size": 20
  }'

Mode advanced

Pour composer des filtres en AND/OR arbitraires, utilisez un arbre criteria (CriteriaNodeDTO).

{
  "searchMode": "advanced",
  "paginationType": "page",
  "page": 1,
  "size": 20,
  "criteria": { /* arbre récursif AND/OR — voir la référence API */ }
}

Réponse

Les deux modes renvoient le même PropertySearchResponseDTO :

{
  "items": [ /* résultats */ ],
  "totalItems": 1847,
  "searchAfter": [...],
  "pitId": "...",
  "hasNextPage": true
}

Sur cette page