Skip to content

📡 API Reference

The API is powered by FastAPI and fully documented via OpenAPI/Swagger.


🔒 Authentication

  • All endpoints require an X-Token header.
  • Value must match API_TOKEN environment variable.

screenshot_1 screenshot_2

🏡 Properties

GET /properties/

  • Returns list of all properties.

ENDPOINT

GET /properties/{id}/floor-plans

  • Returns floor plans for a given property.
  • 404 if not found.

ENDPOINTS

📊 Analytics

GET /analytics/top/{x}/most-affordable

  • Returns top x cheapest floor plans.

ENDPOINT

GET /analytics/top/{x}/most-expensive

  • Returns top x most expensive floor plans. ENDPOINT

GET /analytics/this-weeks-listings

  • Listings added in last 7 days.

ENDPOINT

GET /analytics/search

  • Search by filters:
  • city
  • min_bedrooms
  • max_base_rent
  • year_built

FAST API ENDPOINTS analytics


🔮 Predictions

GET /predict/rent

  • Input: bedrooms, bathrooms, sqft, state, year_built
  • Output: predicted rent price.

ENDPOINT

Example: ```bash curl -X GET "http://localhost:8000/predict/rent?bedrooms=2&bathrooms=1&sqft=800&state=CA&year_built=2010" \ -H "X-Token: your_api_token"