You are on page 1of 7

Rental Estimation API - Requirement

OBJECTIVE: Developing an API that allows retrieving data from a web page. Giving
information about rental pricings and related rental pricing in a given zone.

SCOPE:
● The API will have one endpoints:
○ get-rent

and returns the data by scraping information from a web page.


● It's only an API, no website is needed.

CODE: should be done in Laravel 8/9. Or python with flask.

WHERE TO SCRAPE DATA: we suggest to get the data from

https://app.rentcast.io/app

HOW TO SCRAPE DATA: Response shouldn’t take more than 20 secs. IMPORTANT: Data
must be retrieved in every response, as it may vary through time.

Endpoint:

1. Get Rent

METHOD GET

api/get-rent

Parameters:

● Address: The property address, in the format of 'Street, City, State, Zip'. [required]
● propertyType: The type of the property. Supported values are: Single Family, Condo,
Townhouse, Multi-Family, Apartment. [optional]
● Bedrooms: number of bedrooms. Supported values are: Studio, 1,2,3,4,5. [optional]
● Bathrooms: number of bathrooms. Supported values are: 1,1.5,2,2.5,3,3.5. [optional]
● squareFootage: The total living area size of the property, in square feet

Query example of the user:

api/get-rent?address=5500 Grand Lake Drive, San Antonio, TX,


78244&propertyType=Single Family&bedrooms=2&bathrroms=2&squareFootage=1600
SCRAPE FROM

https://app.rentcast.io/app?address=5500%20Grand%20Lake%20Dr,%20San%20Antonio,%
20TX,%2078244&type=single-family&bedrooms=2&bathrooms=2&area=1600

This will be the data provided from the page:

Use this data to feed the following JSON object to return the data:

"rent": 1610,

"rentRangeLow": 1440
"rentRangeHigh": 1780,

"listings": [

"id": "5721-Lochmoor,-San-Antonio,-TX-78244",

"formattedAddress": "5721 Lochmoor, San Antonio, TX 78244",

"longitude": -98.350807,

"latitude": 29.479965,

"city": "San Antonio",

"state": "TX",

"zipcode": "78244",

"price": 1100,

"publishedDate": "2023-05-17T00:00:00.000Z",

"distance": 0.44983823397988565,

"daysOld": 123.81,

"correlation": 0.9332,

"address": "5721 Lochmoor",

"county": "Bexar",

"bedrooms": 2,

"bathrooms": 2,

"propertyType": "Single Family"

},

"id": "6000-Woodlake-Pkwy,-San-Antonio,-TX-78244",

"formattedAddress": "6000 Woodlake Pkwy, San Antonio, TX 78244",

"longitude": -98.347416,

"latitude": 29.480281,
"city": "San Antonio",

"state": "TX",

"zipcode": "78244",

"price": 1175,

"publishedDate": "2023-03-05T00:00:00.000Z",

"distance": 0.6191714440385638,

"daysOld": 196.81,

"correlation": 0.9071,

"address": "6000 Woodlake Pkwy",

"county": "Bexar",

"bedrooms": 2,

"bathrooms": 2,

"propertyType": "Single Family",

"squareFootage": 1043,

"yearBuilt": 1985

},

"id": "5521-Allbrook,-San-Antonio,-TX-78244",

"formattedAddress": "5521 Allbrook, San Antonio, TX 78244",

"longitude": -98.349208,

"latitude": 29.47827,

"city": "San Antonio",

"state": "TX",

"zipcode": "78244",

"price": 1545,

"publishedDate": "2023-07-19T00:00:00.000Z",
"distance": 0.3359757817097617,

"daysOld": 60.81,

"correlation": 0.8978,

"address": "5521 Allbrook",

"county": "Bexar",

"bedrooms": 3,

"bathrooms": 2,

"propertyType": "Single Family",

"squareFootage": 1589,

"lotSize": 7579,

"yearBuilt": 2000

},

"id": "6739-Quail-Lk,-San-Antonio,-TX-78244",

"formattedAddress": "6739 Quail Lk, San Antonio, TX 78244",

"longitude": -98.352692,

"latitude": 29.471943,

"city": "San Antonio",

"state": "TX",

"zipcode": "78244",

"price": 1700,

"publishedDate": "2023-04-12T00:00:00.000Z",

"distance": 0.4635008886087985,

"daysOld": 158.81,

"correlation": 0.8957,

"address": "6739 Quail Lk",


"county": "Bexar",

"bedrooms": 3,

"bathrooms": 2,

"propertyType": "Single Family",

"squareFootage": 1610,

"lotSize": 6534,

"yearBuilt": 1986

},

"id": "5114-Crestwood-Hill-Dr,-San-Antonio,-TX-78244",

"formattedAddress": "5114 Crestwood Hill Dr, San Antonio, TX 78244",

"longitude": -98.346115,

"latitude": 29.475236,

"city": "San Antonio",

"state": "TX",

"zipcode": "78244",

"price": 1725,

"publishedDate": "2023-03-21T00:00:00.000Z",

"distance": 0.5225290013327754,

"daysOld": 180.81,

"correlation": 0.893,

"address": "5114 Crestwood Hill Dr",

"county": "Bexar",

"bedrooms": 3,

"bathrooms": 2,

"propertyType": "Single Family",


"squareFootage": 1578,

"lotSize": 5619,

"yearBuilt": 2000

You might also like