npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

real-estate-listing-schema

v2.4.0

Published

A standardized JSON schema especially designed for real estate listings

Downloads

406

Readme

RealEstateListing Schema

Here is an example of a valid RealEstateListing object:

{
  "listingId": "728030085",
  "url": "https://www.somerealestatewebsite.com/apartments/no-commission-apartment-for-investment-also-suitable-for-personal-use-728030085/",
  "title": "(No commission) apartment for investment / also suitable for personal use",
  "description": "Selling renovated 38m^2 apartment on the 2nd floor with elevator and loggia. The apartment also includes...",
  "propertyType": "apartment",
  "address": {
    "street": "Raiffeisenstraße 54a",
    "postalCode": "8010",
    "city": "Graz",
    "state": "Styria",
    "country": "Austria",
    "countryCode": "AT"
  },
  "coordinates": { "latitude": 47.05104, "longitude": 15.44788 },
  "monetaryDetails": {
    "purchasingPrice": 169000,
    "previousPurchasingPrice": null,
    "purchasingPricePerM2": 3520.83,
    "rent": null,
    "previousRent": null,
    "rentPerM2": null,
    "currencyCode": "EUR",
    "isCommissionFree": true,
    "estMonthlyOperatingCosts": null
  },
  "features": {
    "livingArea": 48,
    "plotArea": null,
    "yearBuilt": null,
    "bedrooms": null,
    "bathrooms": null,
    "hasGarage": true,
    "hasCarport": false,
    "hasParkingSpace": false,
    "hasBalcony": false,
    "hasTerrace": false,
    "hasGarden": false,
    "hasLoggia": true,
    "hasPool": false,
    "hasStorageRoom": false,
    "isBarrierFree": false,
    "hasBuiltInKitchen": true,
    "hasElevator": true,
    "hasBasementCompartment": true,
    "hasAirConditioning": false
  },
  "contactDetails": { "name": null, "phone": null, "email": null },
  "images": [
    "https://cache.somerealestatewebsite.com/1927743998.jpg",
    "https://cache.somerealestatewebsite.com/1133143014.jpg",
    "https://cache.somerealestatewebsite.com/1951786924.jpg",
    "https://cache.somerealestatewebsite.com/1593453202.jpg",
    "https://cache.somerealestatewebsite.com/96308128.jpg",
    "https://cache.somerealestatewebsite.com/3060419.jpg",
    "https://cache.somerealestatewebsite.com/120863053.jpg",
    "https://cache.somerealestatewebsite.com/567083695.jpg",
    "https://cache.somerealestatewebsite.com/726985358.jpg"
  ],
  "snapshotDate": "2024-03-16T14:47:08.558Z",
  "scrapedFrom": "https://www.somerealestatewebsite.com/apartments/",
  "publishedAt": null,
  "updatedAt": null
}

Motivation

This repository proposes a standardized JSON schema especially designed for real estate listings.

The schema is intended to be used for data exchange between different systems and applications, such as real estate websites, property management software, and other real estate-related services.

  • The schema is based on the JSON Schema standard and is designed to be flexible, extensible and intuitive to use.
  • Potential RealEstateListing data can be validated against the schema to ensure that it is well-formed. see: Validate JSON data against the schema
  • Validated RealEstateListing data is serializable and can be converted to and from JSON and can be used in REST APIs.
  • Validated RealEstateListing data can easily be converted to and from a tabular format (flattenObject or unflattenObject) for use in databases or spreadsheets.

Usage

There are multiple ways to use the schema in your project. E.g.:

via download

The most straight forward way is to download or copy&paste the schema file directly into your project:

curl -o schema.json https://raw.githubusercontent.com/michaelhaar/real-estate-listing-schema/main/schema.json

and then use your favorite JSON schema validator to validate your data against the schema.

via npm

Alternatively, the schema is also available as an npm package. It can be installed using npm::

npm install real-estate-listing-schema

and then used in your project like this:

import { realEstateListingSchema, RealEstateListing } from "real-estate-listing-schema";

// use your favorite JSON schema validator to validate your data against the schema

The index.test.ts file contains a simple example of how to use the schema with the ajv JSON schema validator.

Versioning

This repository follows the Semantic Versioning standard.