A simple REST API that returns a list of properties with location, price, type, and image.
GET http://freeapi.gravitycoding.com/real_estate.json
Returns an array of JSON objects:
[
{
"id": 1,
"title": "Modern Apartment",
"location": "Mumbai",
"price": 125000,
"type": "Apartment",
"image": "https://source.unsplash.com/featured/?apartment,modern"
},
...
]
fetch("http://freeapi.gravitycoding.com/real_estate.json")
.then(res => res.json())
.then(data => console.log(data));
import requests
res = requests.get("http://freeapi.gravitycoding.com/real_estate.json")
print(res.json())
curl http://freeapi.gravitycoding.com/real_estate.json